EVENT_DEATH for boss and killall function
This commit is contained in:
parent
4cafb89125
commit
131fbd7b26
3 changed files with 9 additions and 0 deletions
|
@ -125,6 +125,7 @@ void process_boss(Boss *boss) {
|
|||
if(boss->current->type != AT_Move && boss->dmg >= boss->current->dmglimit)
|
||||
time = boss->current->timeout + 1;
|
||||
if(time > boss->current->timeout) {
|
||||
boss->current->rule(boss, EVENT_DEATH);
|
||||
boss->dmg = boss->current->dmglimit + 1;
|
||||
boss->current++;
|
||||
if(boss->current - boss->attacks < boss->acount)
|
||||
|
|
|
@ -69,6 +69,12 @@ void draw_enemies(Enemy *enemies) {
|
|||
e->draw_rule(e, global.frames - e->birthtime);
|
||||
}
|
||||
|
||||
void killall(Enemy **enemies) {
|
||||
Enemy *e;
|
||||
|
||||
for(e = enemies; e; e = e->next)
|
||||
e->hp = 0;
|
||||
}
|
||||
|
||||
int enemy_flare(Projectile *p, int t) { // a[0] timeout, a[1] velocity, a[2] ref to enemy
|
||||
if(t >= creal(p->args[0]) || REF(p->args[2]) == NULL) {
|
||||
|
|
|
@ -57,6 +57,8 @@ void delete_enemies(Enemy **enemies);
|
|||
|
||||
void process_enemies(Enemy **enemies);
|
||||
|
||||
void killall(Enemy **enemies);
|
||||
|
||||
void Fairy(Enemy*, int t);
|
||||
void Swirl(Enemy*, int t);
|
||||
void BigFairy(Enemy*, int t);
|
||||
|
|
Loading…
Reference in a new issue