boss: remove AT_Immediate

Not used and not very useful
This commit is contained in:
Andrei Alexeyev 2023-06-08 01:59:52 +02:00
parent f220b99296
commit 6d92fc21cb
No known key found for this signature in database
GPG key ID: 72D26128040B9690
2 changed files with 0 additions and 30 deletions

View file

@ -138,7 +138,6 @@ static const Color *boss_healthbar_color(AttackType atype) {
[AT_Spellcard] = { 1.00, 0.00, 0.00, 1.00 },
[AT_SurvivalSpell] = { 0.00, 1.00, 0.00, 1.00 },
[AT_ExtraSpell] = { 1.00, 0.40, 0.00, 1.00 },
[AT_Immediate] = { 1.00, 1.00, 1.00, 1.00 },
};
assert(atype >= 0 && atype < sizeof(colors)/sizeof(*colors));
@ -176,12 +175,6 @@ static bool boss_should_skip_attack(Boss *boss, Attack *a) {
}
}
// Immediates are handled in a special way by process_boss,
// but may be considered skipped/nonexistent for other purposes
if(a->type == AT_Immediate) {
return true;
}
// Skip zero-length spells. Zero-length AT_Move and AT_Normal attacks are ok.
if(ATTACK_IS_SPELL(a->type) && a->timeout <= 0) {
return true;
@ -1102,12 +1095,6 @@ void process_boss(Boss **pboss) {
return;
}
if(boss->current->type == AT_Immediate) {
boss->current->endtime = global.frames;
boss->current->endtime_undelayed = global.frames;
coevent_signal_once(&boss->current->events.finished);
}
int time = global.frames - boss->current->starttime;
bool extra = boss->current->type == AT_ExtraSpell;
bool over = attack_has_finished(boss->current) && global.frames >= boss->current->endtime;
@ -1282,22 +1269,6 @@ void process_boss(Boss **pboss) {
boss->current++;
assert(boss->current != NULL);
if(boss->current->type == AT_Immediate) {
boss->current->starttime = global.frames;
coevent_signal_once(&boss->current->events.initiated);
coevent_signal_once(&boss->current->events.started);
coevent_signal_once(&boss->current->events.finished);
coevent_signal_once(&boss->current->events.completed);
COEVENT_CANCEL_ARRAY(boss->current->events);
if(dialog_is_active(global.dialog)) {
break;
}
continue;
}
if(boss_should_skip_attack(boss, boss->current)) {
COEVENT_CANCEL_ARRAY(boss->current->events);
continue;

View file

@ -44,7 +44,6 @@ typedef enum AttackType {
AT_Spellcard,
AT_SurvivalSpell,
AT_ExtraSpell,
AT_Immediate,
} AttackType;
#define ATTACK_IS_SPELL(a) ((a) == AT_Spellcard || (a) == AT_SurvivalSpell || (a) == AT_ExtraSpell)