Added simple die, to prevent swarmers spreading debris everywhere.
This commit is contained in:
parent
13344ddc06
commit
09e676d713
|
@ -11,5 +11,7 @@
|
||||||
"y" : 0
|
"y" : 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"flags" : "EF_TAKES_DAMAGE"
|
"deathType" : "DT_SIMPLE",
|
||||||
|
"flags" : "EF_TAKES_DAMAGE",
|
||||||
|
"aiFlags" : "AIF_UNLIMITED_RANGE"
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ static void die(void);
|
||||||
static void immediateDie(void);
|
static void immediateDie(void);
|
||||||
static void spinDie(void);
|
static void spinDie(void);
|
||||||
static void straightDie(void);
|
static void straightDie(void);
|
||||||
|
static void simpleDie(void);
|
||||||
static void randomizeDart(Entity *dart);
|
static void randomizeDart(Entity *dart);
|
||||||
static void randomizeDartGuns(Entity *dart);
|
static void randomizeDartGuns(Entity *dart);
|
||||||
static void loadFighterDef(char *filename);
|
static void loadFighterDef(char *filename);
|
||||||
|
@ -495,6 +496,9 @@ static void die(void)
|
||||||
case DT_INSTANT:
|
case DT_INSTANT:
|
||||||
n = 2;
|
n = 2;
|
||||||
break;
|
break;
|
||||||
|
case DT_SIMPLE:
|
||||||
|
n = 3;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self == player && battle.isEpic)
|
if (self == player && battle.isEpic)
|
||||||
|
@ -507,14 +511,15 @@ static void die(void)
|
||||||
case 0:
|
case 0:
|
||||||
self->action = spinDie;
|
self->action = spinDie;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
self->action = straightDie;
|
self->action = straightDie;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
self->action = immediateDie;
|
self->action = immediateDie;
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
self->action = simpleDie;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -572,6 +577,13 @@ static void straightDie(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void simpleDie(void)
|
||||||
|
{
|
||||||
|
self->alive = ALIVE_DEAD;
|
||||||
|
addSmallExplosion();
|
||||||
|
playBattleSound(SND_EXPLOSION_1 + rand() % 4, self->x, self->y);
|
||||||
|
}
|
||||||
|
|
||||||
void retreatEnemies(void)
|
void retreatEnemies(void)
|
||||||
{
|
{
|
||||||
Entity *e;
|
Entity *e;
|
||||||
|
|
|
@ -199,7 +199,8 @@ enum
|
||||||
{
|
{
|
||||||
DT_ANY,
|
DT_ANY,
|
||||||
DT_NO_SPIN,
|
DT_NO_SPIN,
|
||||||
DT_INSTANT
|
DT_INSTANT,
|
||||||
|
DT_SIMPLE
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
|
|
@ -82,6 +82,7 @@ void initLookups(void)
|
||||||
addLookup("DT_ANY", DT_ANY);
|
addLookup("DT_ANY", DT_ANY);
|
||||||
addLookup("DT_NO_SPIN", DT_NO_SPIN);
|
addLookup("DT_NO_SPIN", DT_NO_SPIN);
|
||||||
addLookup("DT_INSTANT", DT_INSTANT);
|
addLookup("DT_INSTANT", DT_INSTANT);
|
||||||
|
addLookup("DT_SIMPLE", DT_SIMPLE);
|
||||||
|
|
||||||
addLookup("TT_DESTROY", TT_DESTROY);
|
addLookup("TT_DESTROY", TT_DESTROY);
|
||||||
addLookup("TT_DISABLE", TT_DISABLE);
|
addLookup("TT_DISABLE", TT_DISABLE);
|
||||||
|
|
Loading…
Reference in New Issue