-
Notifications
You must be signed in to change notification settings - Fork 0
/
Base Habilities vs enemy.txt
84 lines (54 loc) · 2.45 KB
/
Base Habilities vs enemy.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/////-------------------------------------///////
IN ENEMI CODEC "PLAYER ATTACKS"
//// /*TITLE HABILITY*/
// Calculate AD dmg
Armour/*HABILITY*/ = armour - (global.playerPenArm*global.playerPenArm/*HABILITY*/)
if (Armour/*HABILITY*/ < 0) { Armour/*HABILITY*/ = 0; }
ADdmg/*HABILITY*/ = (global.playerAD*global.playerAD/*HABILITY*/) - Armour/*HABILITY*/
if (ADdmg/*HABILITY*/ < 0) { ADdmg/*HABILITY*/ = 0; }
// Calculate AP dmg
ResAP/*HABILITY*/ = resAP - (global.playerPenAP*global.playerPenAP/*HABILITY*/)
if (ResAPVDash < 0) { ResAPVDash = 0; }
APdmg/*HABILITY*/ = (global.playerAP*global.playerAP/*HABILITY*/) - ResAP/*HABILITY*/
if (APdmg/*HABILITY*/ < 0) { APdmg/*HABILITY*/ = 0; }
// Calculate total dmg
player/*HABILITY*/dmg = (
ADdmg/*HABILITY*/
+ APdmg/*HABILITY*/
+ (global.playerTrueAD*global.playerTrueAD/*HABILITY*/)
+ (global.playerTrueAP*global.playerTrueAP/*HABILITY*/)
);
if (notRandom_nearPlayer = 1) && (player/*HABILITY*/ = 1){
/*HABILITY*/Hit = 1;
}
if (/*HABILITY*/Hit = 1){
// Movment
hsp += (sign(x-obj_player.x) * movDmgFromPLayer);
vsp -= (movDmgFromPLayer/8)
//Calculate critic
if (irandom(100) < (global.playerCritickProbability*global.playerCritickProbability/*HABILITY*/) ) {
criticDamage = (global.playerCritickDamage*global.playerCritickDamage/*HABILITY*/);
} else { criticDamage = 1; }
//Dmg
ehp -= (/*HABILITY*/dmg * criticDamage);
//Disable Dmg
/*HABILITY*/Hit = 0;
}
/////-------------------------------------///////
IN CREATE PLAYER
// /*TITLE HABILITY*/
globalvar player/*HABILITY*/; player/*HABILITY*/ = 0;
globalvar playerAD/*HABILITY*/; playerAD/*HABILITY*/ = /*value*/;
globalvar playerPenArm/*HABILITY*/; playerPenArm/*HABILITY*/ = /*value*/;
globalvar playerTrueAD/*HABILITY*/; playerTrueAD/*HABILITY*/ = /*value*/;
globalvar playerAP/*HABILITY*/; playerAP/*HABILITY*/ = /*value*/;
globalvar playerPenAP/*HABILITY*/; playerPenAP/*HABILITY*/ = /*value*/;
globalvar playerTrueAP/*HABILITY*/; playerTrueAP/*HABILITY*/ = /*value*/;
globalvar playerCritickProbability/*HABILITY*/; playerCritickProbability/*HABILITY*/ = /*value*/; // In % [percentage]
globalvar playerCritickDamage/*HABILITY*/; playerCritickDamage/*HABILITY*/ = /*value*/;
/////-------------------------------------///////
IN CREATE ENEMY
Armour/*HABILITY*/ = 0;
ADdmg/*HABILITY*/ = 0;
ResAP/*HABILITY*/ = 0;
APdmg/*HABILITY*/ = 0;