forked from jacobabrennan/CasualQuest-DM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintelligence.dm
89 lines (89 loc) · 1.79 KB
/
intelligence.dm
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
84
85
86
87
88
89
game/map/mover/intelligence{
parent_type = /datum
proc{
intelligence(){}
}
freezer{
var{
time = 0
}
New(var/_time = 0){
time = _time
}
intelligence(var/game/map/mover/mover){
if(time-- <= 0){
if(istype(mover, /game/hero)){
mover.icon_state = initial(mover.icon_state)
}
Del()
}
}
}
cast{
var{
time = 0
}
New(var/_time = 0){
time = _time
}
intelligence(var/game/map/mover/mover){
mover.icon_state = "cast"
if(time-- <= 0){
mover.icon_state = initial(mover.icon_state)
Del()
}
}
}
slow{
var{
time = 0
}
New(var/_time = 0){
time = _time
}
intelligence(var/game/map/mover/mover){
if(time-- <= 0){
Del()
}
switch(time){
if(64 to 128){}
if(64 to 96){}// if(!(time % 4)){ mover.behavior()}}
if(32 to 63){ if(!(time % 4)){ mover.behavior()}}
if( 0 to 31){ if(!(time % 3)){ mover.behavior()}}
}
}
}
afk_check{
var{
waves = 0
}
intelligence(var/game/map/mover/mover){
var/game/hero/H = mover
if(!istype(H)){ finish()}
if(H.player){
if(EAST & (H.player.key_state | H.player.key_pressed)){ finish()}
if(WEST & (H.player.key_state | H.player.key_pressed)){ finish()}
if(NORTH & (H.player.key_state | H.player.key_pressed)){ finish()}
if(SOUTH & (H.player.key_state | H.player.key_pressed)){ finish()}
if(PRIMARY & H.player.key_pressed){ finish()}
if(SECONDARY & H.player.key_pressed){ finish()}
if(TERTIARY & H.player.key_pressed){ finish()}
if(QUATERNARY & H.player.key_pressed){ finish()}
}
}
proc{
finish(){
Del()
}
increase_afk(var/game/hero/who, var/amount = 1){
waves += amount
if(waves >= AFK_WAVES){
if(who.player){
who.player.spectate()
Del()
}
}
}
}
}
}