Changed text logging so it doesn't spam in multiplayer. Set the tag of the spawned monster. Sped up the glow animation a bit.
This commit is contained in:
parent
994eb66981
commit
68f110a010
@ -148,17 +148,17 @@ class KiriCacodemonPlushie : HDWeapon {
|
|||||||
goto ready;
|
goto ready;
|
||||||
|
|
||||||
ready:
|
ready:
|
||||||
KCPL B 0 { A_weaponready(WRF_ALL); A_WeaponBusy(false); }
|
KCPL B 0 { A_WeaponReady(WRF_ALL); A_WeaponBusy(false); }
|
||||||
|
|
||||||
// Jump to idle and skip glowing anim if we have a monster or
|
// Jump to idle and skip glowing anim if we have a monster or
|
||||||
// spawnball out.
|
// spawnball out.
|
||||||
KCPL B 0 A_JumpIf(!(invoker.spawned_spawnball || invoker.spawned_creature), 4);
|
KCPL B 0 A_JumpIf(!(invoker.spawned_spawnball || invoker.spawned_creature), 4);
|
||||||
|
|
||||||
// Glowing animation.
|
// Glowing animation.
|
||||||
KCPL E 5;
|
KCPL E 3;
|
||||||
KCPL F 5;
|
KCPL F 3;
|
||||||
KCPL G 5;
|
KCPL G 3;
|
||||||
KCPL G 0 A_Jump(255, 2);
|
KCPL G 0 A_Jump(255, 2); // Skip idle animation.
|
||||||
|
|
||||||
// Idle animation.
|
// Idle animation.
|
||||||
KCPL B 1;
|
KCPL B 1;
|
||||||
@ -253,17 +253,21 @@ class KiriCacodemonPlushie : HDWeapon {
|
|||||||
{
|
{
|
||||||
// Refuse to feed active monsters.
|
// Refuse to feed active monsters.
|
||||||
if(invoker.spawned_creature || invoker.spawned_spawnball) {
|
if(invoker.spawned_creature || invoker.spawned_spawnball) {
|
||||||
console.printf(
|
invoker.owner.A_Log(
|
||||||
"Cannot feed blood to %s when they're not in their plushie!",
|
String.format(
|
||||||
invoker.getMonsterName());
|
"Cannot feed blood to %s when they're not in their plushie!",
|
||||||
|
invoker.getMonsterName()),
|
||||||
|
true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refuse to feed monsters that don't need any more.
|
// Refuse to feed monsters that don't need any more.
|
||||||
if(invoker.getMonsterHealth() == invoker.getMonsterMaxHealth()) {
|
if(invoker.getMonsterHealth() == invoker.getMonsterMaxHealth()) {
|
||||||
console.printf(
|
invoker.owner.A_Log(
|
||||||
"%s doesn't need any more food for now.",
|
String.format(
|
||||||
invoker.getMonsterName());
|
"%s doesn't need any more food for now.",
|
||||||
|
invoker.getMonsterName()),
|
||||||
|
true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -453,7 +457,9 @@ class KiriCacodemonPlushie : HDWeapon {
|
|||||||
if(spawned_creature) {
|
if(spawned_creature) {
|
||||||
spawned_creature.A_SpawnItemEx("TeleFog");
|
spawned_creature.A_SpawnItemEx("TeleFog");
|
||||||
spawned_creature.destroy();
|
spawned_creature.destroy();
|
||||||
A_PrintBold(String.format("%s has returned to the plushie.", getMonsterName()));
|
owner.A_Log(
|
||||||
|
String.format("%s has returned to the plushie.", getMonsterName()),
|
||||||
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adjust help text because the context changed. Now we can
|
// Adjust help text because the context changed. Now we can
|
||||||
@ -521,7 +527,7 @@ class KiriCacodemonPlushie : HDWeapon {
|
|||||||
if(fainted_monster_despawn_countdown ==
|
if(fainted_monster_despawn_countdown ==
|
||||||
KIRI_CACOPLUSHIE_FAINTED_MONSTER_COOLDOWN)
|
KIRI_CACOPLUSHIE_FAINTED_MONSTER_COOLDOWN)
|
||||||
{
|
{
|
||||||
A_PrintBold(String.format("%s has fainted!", getMonsterName()));
|
owner.A_Log(String.format("%s has fainted!", getMonsterName()), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// After some number of frames, actually despawn the
|
// After some number of frames, actually despawn the
|
||||||
@ -543,10 +549,11 @@ class KiriCacodemonPlushie : HDWeapon {
|
|||||||
// Shields were totally broken. Extremely low chance
|
// Shields were totally broken. Extremely low chance
|
||||||
// to restore shields each frame.
|
// to restore shields each frame.
|
||||||
if(frandom(0, 100) < 0.1) {
|
if(frandom(0, 100) < 0.1) {
|
||||||
A_PrintBold(
|
owner.A_Log(
|
||||||
String.format(
|
String.format(
|
||||||
"%s's shields have started charging.",
|
"%s's shields have started charging.",
|
||||||
getMonsterName()));
|
getMonsterName()),
|
||||||
|
true);
|
||||||
setMonsterShield(0);
|
setMonsterShield(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -580,10 +587,11 @@ class KiriCacodemonPlushie : HDWeapon {
|
|||||||
// spawn.
|
// spawn.
|
||||||
if(invoker.getMonsterFainted())
|
if(invoker.getMonsterFainted())
|
||||||
{
|
{
|
||||||
A_PrintBold(
|
invoker.owner.A_Log(
|
||||||
String.format(
|
String.format(
|
||||||
"%s has fainted and cannot manifest yet.",
|
"%s has fainted and cannot manifest yet.",
|
||||||
invoker.getMonsterName()));
|
invoker.getMonsterName()),
|
||||||
|
true);
|
||||||
|
|
||||||
spawn_ball.A_SpawnItemEx("TeleFog");
|
spawn_ball.A_SpawnItemEx("TeleFog");
|
||||||
|
|
||||||
@ -701,6 +709,9 @@ class KiriCacodemonPlushie : HDWeapon {
|
|||||||
// Copy player colors over.
|
// Copy player colors over.
|
||||||
spawned_thing.translation = invoker.owner.translation;
|
spawned_thing.translation = invoker.owner.translation;
|
||||||
|
|
||||||
|
// Set the name.
|
||||||
|
spawned_thing.setTag(invoker.getMonsterName());
|
||||||
|
|
||||||
// FIXME: Would prefer something to make the monster more
|
// FIXME: Would prefer something to make the monster more
|
||||||
// distinct. Other attempts were made to distinguish the
|
// distinct. Other attempts were made to distinguish the
|
||||||
// monster...
|
// monster...
|
||||||
@ -743,7 +754,9 @@ class KiriCacodemonPlushie : HDWeapon {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Tell the player we failed.
|
// Tell the player we failed.
|
||||||
console.printf("Failed to summon %s: Not enough room.", invoker.getMonsterName());
|
invoker.owner.A_Log(
|
||||||
|
String.format("Failed to summon %s: Not enough room.", invoker.getMonsterName()),
|
||||||
|
true);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user