| Name | Author | Game Mode | Rating | |||||
|---|---|---|---|---|---|---|---|---|
| NpcBunnies | Cranky | Mutator | N/A | |||||
namespace npcMonsterAdjustments
{
const int SPECIAL_NONE = 0;
const int SPECIAL_CHARGE = 1;
const int SPECIAL_QUEEN_WIND = 2;
const int SPECIAL_BUBBA_SPIN = 3;
const int SPECIAL_TURTLE_BITE = 4;
const int SPECIAL_PROJECTILE = 5;
const int DEFAULT_ANIM_SPEED = 8;
class MonsterDef
{
string name;
string aliases;
int eventID;
int animSet;
int idleAnim;
int idleFrameCount;
int idleXOffset;
int idleYOffset;
int walkingAnim;
int walkingFrameCount;
int walkingXOffset;
int walkingYOffset;
int shootingAnim;
int shootingFrameCount;
int shootingXOffset;
int shootingYOffset;
int specialAnim;
int specialFrameCount;
int specialXOffset;
int specialYOffset;
int specialType;
bool canFly;
float scale;
int offsetY;
int cooldown;
int direction;
int idleSpeed;
int walkingSpeed;
int shootingSpeed;
int specialSpeed;
int rotation;
}
array<MonsterDef> monsters;
array<int> cachedNpcMonsterType;
array<int> cachedNpcMonsterIndex;
array<int> lastSeenFireTick;
array<int> shootingStarted;
array<int> shootingUntil;
array<bool> shootingQueued;
void AddMonster(
const string &in name, const string &in aliases, int eventID, int animSet,
int idleAnim, int idleFrameCount, int idleXOffset, int idleYOffset,
int walkingAnim, int walkingFrameCount, int walkingXOffset, int walkingYOffset,
int shootingAnim, int shootingFrameCount, int shootingXOffset, int shootingYOffset,
int specialAnim, int specialFrameCount, int specialXOffset, int specialYOffset,
int specialType, bool canFly, float scale = 1.0, int offsetY = 0,
int cooldown = 70, int direction = 1,
int idleSpeed = 8, int walkingSpeed = 8,
int shootingSpeed = 8, int specialSpeed = 8,
int rotation = 0
)
{
MonsterDef def;
def.name = name;
def.aliases = aliases;
def.eventID = eventID;
def.animSet = animSet;
def.idleAnim = idleAnim;
def.idleFrameCount = idleFrameCount;
def.idleXOffset = idleXOffset;
def.idleYOffset = idleYOffset;
def.walkingAnim = walkingAnim;
def.walkingFrameCount = walkingFrameCount;
def.walkingXOffset = walkingXOffset;
def.walkingYOffset = walkingYOffset;
def.shootingAnim = shootingAnim;
def.shootingFrameCount = shootingFrameCount;
def.shootingXOffset = shootingXOffset;
def.shootingYOffset = shootingYOffset;
def.specialAnim = specialAnim;
def.specialFrameCount = specialFrameCount;
def.specialXOffset = specialXOffset;
def.specialYOffset = specialYOffset;
def.specialType = specialType;
def.canFly = canFly;
def.scale = scale;
def.offsetY = offsetY + 4;
def.cooldown = cooldown;
def.direction = direction;
def.idleSpeed = idleSpeed;
def.walkingSpeed = walkingSpeed;
def.shootingSpeed = shootingSpeed;
def.specialSpeed = specialSpeed;
def.rotation = rotation;
monsters.insertLast(def);
}
void InitializeMonsterTable()
{
if(monsters.length > 0) return;
// Monster display is controlled here. Each entry has four animation groups:
// idle, walking, shooting, and special. Every group has anim, frame count,
// x offset, and y offset. Optional idleSpeed/walkingSpeed/shootingSpeed/
// specialSpeed values replace the jjGameTicks divisor directly.
AddMonster(
name: "bat", aliases: "bat,bats", eventID: OBJECT::BAT, animSet: ANIM::BAT,
idleAnim: 1, idleFrameCount: 1, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 8, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 8, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "bee", aliases: "bee,bumbee", eventID: OBJECT::BEE, animSet: ANIM::BUMBEE,
idleAnim: 0, idleFrameCount: 2, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 2, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 2, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 2, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "beeboy", aliases: "beeboy,bee boy", eventID: OBJECT::BEEBOY, animSet: ANIM::BEEBOY,
idleAnim: 0, idleFrameCount: 4, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 4, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 4, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 4, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "bees", aliases: "bees,swarm", eventID: OBJECT::BEES, animSet: ANIM::BEES,
idleAnim: 0, idleFrameCount: 4, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 4, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 4, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 4, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "butterfly", aliases: "butterfly,evilbutterfly", eventID: OBJECT::BUTTERFLY, animSet: ANIM::BUTTERFLY,
idleAnim: 0, idleFrameCount: 12, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 12, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 12, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 12, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "crab", aliases: "crab", eventID: OBJECT::CRAB, animSet: ANIM::UTERUS,
idleAnim: 7, idleFrameCount: 8, idleXOffset: 0, idleYOffset: 4,
walkingAnim: 7, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: 4,
shootingAnim: 7, shootingFrameCount: 8, shootingXOffset: 0, shootingYOffset: 4,
specialAnim: 7, specialFrameCount: 8, specialXOffset: 0, specialYOffset: 4,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "demon", aliases: "demon", eventID: OBJECT::DEMON, animSet: ANIM::DEMON,
idleAnim: 0, idleFrameCount: 15, idleXOffset: 0, idleYOffset: 2,
walkingAnim: 2, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: 2,
shootingAnim: 2, shootingFrameCount: 8, shootingXOffset: 0, shootingYOffset: 2,
specialAnim: 2, specialFrameCount: 8, specialXOffset: 0, specialYOffset: 2,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "doggydogg", aliases: "doggydogg,dog,doggy", eventID: OBJECT::DOGGYDOGG, animSet: ANIM::DOG,
idleAnim: 1, idleFrameCount: 8, idleXOffset: 0, idleYOffset: 4,
walkingAnim: 1, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: 4,
shootingAnim: 0, shootingFrameCount: 5, shootingXOffset: 0, shootingYOffset: 4,
specialAnim: 0, specialFrameCount: 5, specialXOffset: 0, specialYOffset: 4,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "dragon", aliases: "dragon", eventID: OBJECT::DRAGON, animSet: ANIM::DRAGON,
idleAnim: 1, idleFrameCount: 1, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 2, walkingFrameCount: 3, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 8, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 8, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_PROJECTILE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "dragonfly", aliases: "dragonfly,dragfly", eventID: OBJECT::DRAGONFLY, animSet: ANIM::DRAGFLY,
idleAnim: 0, idleFrameCount: 4, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 4, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 4, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 4, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "fatchick", aliases: "fatchick,fat chick", eventID: OBJECT::FATCHICK, animSet: ANIM::FATCHK,
idleAnim: 1, idleFrameCount: 12, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 1, walkingFrameCount: 12, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 12, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 12, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "fencer", aliases: "fencer", eventID: OBJECT::FENCER, animSet: ANIM::FENCER,
idleAnim: 1, idleFrameCount: 13, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 5, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 5, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 5, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1, idleSpeed: 5
);
AddMonster(
name: "fish", aliases: "fish", eventID: OBJECT::FISH, animSet: ANIM::FISH,
idleAnim: 1, idleFrameCount: 6, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 1, walkingFrameCount: 6, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 6, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 6, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "hatter", aliases: "hatter", eventID: OBJECT::HATTER, animSet: ANIM::HATTER,
idleAnim: 4, idleFrameCount: 12, idleXOffset: 0, idleYOffset: -8,
walkingAnim: 4, walkingFrameCount: 12, walkingXOffset: 0, walkingYOffset: -8,
shootingAnim: 2, shootingFrameCount: 22, shootingXOffset: 0, shootingYOffset: -8,
specialAnim: 2, specialFrameCount: 22, specialXOffset: 0, specialYOffset: -8,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "helmut", aliases: "helmut", eventID: OBJECT::HELMUT, animSet: ANIM::HELMUT,
idleAnim: 0, idleFrameCount: 4, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 1, walkingFrameCount: 10, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 1, shootingFrameCount: 10, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 4, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "labrat", aliases: "labrat,rat", eventID: OBJECT::LABRAT, animSet: ANIM::LABRAT,
idleAnim: 1, idleFrameCount: 8, idleXOffset: 0, idleYOffset: 4,
walkingAnim: 2, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: 4,
shootingAnim: 0, shootingFrameCount: 8, shootingXOffset: 0, shootingYOffset: 4,
specialAnim: 0, specialFrameCount: 8, specialXOffset: 0, specialYOffset: 4,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "floatlizard", aliases: "floatlizard,flyinglizard", eventID: OBJECT::FLOATLIZARD, animSet: ANIM::LIZARD,
idleAnim: 2, idleFrameCount: 4, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 2, walkingFrameCount: 4, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 13, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 13, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "xmaslizard", aliases: "xmaslizard,christmaslizard", eventID: OBJECT::XMASLIZARD, animSet: ANIM::XLIZARD,
idleAnim: 4, idleFrameCount: 12, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 4, walkingFrameCount: 12, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 4, shootingFrameCount: 12, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 4, specialFrameCount: 12, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "xmasfloatlizard", aliases: "xmasfloatlizard,xmasfloatlz,xmasflyinglizard,christmasfloatlizard", eventID: OBJECT::XMASFLOATLIZARD, animSet: ANIM::XLIZARD,
idleAnim: 4, idleFrameCount: 12, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 4, walkingFrameCount: 12, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 4, shootingFrameCount: 12, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 4, specialFrameCount: 12, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "lizard", aliases: "lizard", eventID: OBJECT::LIZARD, animSet: ANIM::LIZARD,
idleAnim: 4, idleFrameCount: 12, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 4, walkingFrameCount: 12, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 4, shootingFrameCount: 12, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 4, specialFrameCount: 12, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "standmonkey", aliases: "standmonkey,standingmonkey", eventID: OBJECT::STANDMONKEY, animSet: ANIM::MONKEY,
idleAnim: 2, idleFrameCount: 13, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 6, walkingFrameCount: 14, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 5, shootingFrameCount: 13, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 5, specialFrameCount: 13, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_PROJECTILE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "monkey", aliases: "monkey", eventID: OBJECT::MONKEY, animSet: ANIM::MONKEY,
idleAnim: 2, idleFrameCount: 13, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 6, walkingFrameCount: 14, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 5, shootingFrameCount: 13, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 5, specialFrameCount: 13, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_PROJECTILE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "normturtle", aliases: "normturtle,normalturtle,turtle", eventID: OBJECT::NORMTURTLE, animSet: ANIM::TURTLE,
idleAnim: 1, idleFrameCount: 11, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 7, walkingFrameCount: 12, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 11, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 2, specialFrameCount: 7, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_TURTLE_BITE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "xmasnormturtle", aliases: "xmasnormturtle,xmasturtle,christmasturtle,xmasnormalturtle", eventID: OBJECT::XMASNORMTURTLE, animSet: ANIM::XTURTLE,
idleAnim: 1, idleFrameCount: 11, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 7, walkingFrameCount: 12, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 11, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 2, specialFrameCount: 7, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_TURTLE_BITE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "tubeturtle", aliases: "tubeturtle,tube turtle", eventID: OBJECT::TUBETURTLE, animSet: ANIM::TUBETURT,
idleAnim: 0, idleFrameCount: 8, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 8, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 8, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_PROJECTILE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "tufturtle", aliases: "tufturtle,tufturt,tuf turtle", eventID: OBJECT::TUFTURT, animSet: ANIM::TUFTUR,
idleAnim: 0, idleFrameCount: 10, idleXOffset: 0, idleYOffset: -8,
walkingAnim: 0, walkingFrameCount: 10, walkingXOffset: 0, walkingYOffset: -8,
shootingAnim: 0, shootingFrameCount: 10, shootingXOffset: 0, shootingYOffset: -8,
specialAnim: 0, specialFrameCount: 10, specialXOffset: 0, specialYOffset: -8,
specialType: SPECIAL_TURTLE_BITE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "rapier", aliases: "rapier,ghost", eventID: OBJECT::RAPIER, animSet: ANIM::RAPIER,
idleAnim: 2, idleFrameCount: 8, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 8, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 1, specialFrameCount: 16, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "raven", aliases: "raven", eventID: OBJECT::RAVEN, animSet: ANIM::RAVEN,
idleAnim: 1, idleFrameCount: 6, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 1, walkingFrameCount: 6, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 2, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 2, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "skeleton", aliases: "skeleton", eventID: OBJECT::SKELETON, animSet: ANIM::SKELETON,
idleAnim: 2, idleFrameCount: 16, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 2, walkingFrameCount: 16, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 2, shootingFrameCount: 16, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 2, specialFrameCount: 16, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "spark", aliases: "spark", eventID: OBJECT::SPARK, animSet: ANIM::SPARK,
idleAnim: 0, idleFrameCount: 5, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 5, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 5, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 5, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: -1
);
AddMonster(
name: "floatsucker", aliases: "floatsucker,floating sucker", eventID: OBJECT::FLOATSUCKER, animSet: ANIM::SUCKER,
idleAnim: 4, idleFrameCount: 8, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 4, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 4, shootingFrameCount: 8, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 4, specialFrameCount: 8, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "sucker", aliases: "sucker", eventID: OBJECT::SUCKER, animSet: ANIM::SUCKER,
idleAnim: 6, idleFrameCount: 12, idleXOffset: 0, idleYOffset: 10,
walkingAnim: 6, walkingFrameCount: 12, walkingXOffset: 0, walkingYOffset: 10,
shootingAnim: 6, shootingFrameCount: 12, shootingXOffset: 0, shootingYOffset: 10,
specialAnim: 6, specialFrameCount: 12, specialXOffset: 0, specialYOffset: 10,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "cat", aliases: "cat", eventID: OBJECT::CAT, animSet: ANIM::ZDOG,
idleAnim: 1, idleFrameCount: 8, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 1, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 5, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 5, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "pacmanghost", aliases: "pacmanghost,pacman,ghost", eventID: OBJECT::PACMANGHOST, animSet: ANIM::ZSPARK,
idleAnim: 0, idleFrameCount: 5, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 5, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 5, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 5, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: -1
);
AddMonster(
name: "moth", aliases: "moth", eventID: OBJECT::MOTH, animSet: ANIM::MOTH,
idleAnim: 0, idleFrameCount: 8, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 8, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 8, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1
);
AddMonster(
name: "xmasbilsy", aliases: "xmasbilsy,christmasbilsy", eventID: OBJECT::XMASBILSY, animSet: ANIM::XBILSY,
idleAnim: 4, idleFrameCount: 8, idleXOffset: 0, idleYOffset: -16,
walkingAnim: 4, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: -16,
shootingAnim: 0, shootingFrameCount: 18, shootingXOffset: 0, shootingYOffset: -16,
specialAnim: 2, specialFrameCount: 17, specialXOffset: 0, specialYOffset: -16,
specialType: SPECIAL_PROJECTILE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 90, direction: 1
);
AddMonster(
name: "bilsy", aliases: "bilsy", eventID: OBJECT::BILSY, animSet: ANIM::BILSBOSS,
idleAnim: 4, idleFrameCount: 8, idleXOffset: 0, idleYOffset: -16,
walkingAnim: 4, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: -16,
shootingAnim: 0, shootingFrameCount: 18, shootingXOffset: 0, shootingYOffset: -16,
specialAnim: 2, specialFrameCount: 17, specialXOffset: 0, specialYOffset: -16,
specialType: SPECIAL_PROJECTILE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 90, direction: 1
);
AddMonster(
name: "bolly", aliases: "bolly", eventID: OBJECT::BOLLY, animSet: ANIM::BOSS,
idleAnim: 1, idleFrameCount: 8, idleXOffset: 0, idleYOffset: -16,
walkingAnim: 1, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: -16,
shootingAnim: 1, shootingFrameCount: 8, shootingXOffset: 0, shootingYOffset: -16,
specialAnim: 1, specialFrameCount: 8, specialXOffset: 0, specialYOffset: -16,
specialType: SPECIAL_CHARGE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 90, direction: 1
);
AddMonster(
name: "bubba", aliases: "bubba", eventID: OBJECT::BUBBA, animSet: ANIM::BUBBA,
idleAnim: 1, idleFrameCount: 4, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 2, walkingFrameCount: 9, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 16, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 6, specialFrameCount: 12, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_BUBBA_SPIN, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 95, direction: 1
);
AddMonster(
name: "queen", aliases: "queen", eventID: OBJECT::QUEEN, animSet: ANIM::QUEEN,
idleAnim: 3, idleFrameCount: 9, idleXOffset: 0, idleYOffset: -4,
walkingAnim: 5, walkingFrameCount: 4, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 16, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 6, specialFrameCount: 12, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_QUEEN_WIND, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 120, direction: -1
);
AddMonster(
name: "robot", aliases: "robot", eventID: OBJECT::ROBOT, animSet: ANIM::ROBOT,
idleAnim: 4, idleFrameCount: 4, idleXOffset: 0, idleYOffset: -8,
walkingAnim: 15, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: -8,
shootingAnim: 2, shootingFrameCount: 6, shootingXOffset: 0, shootingYOffset: -8,
specialAnim: 3, specialFrameCount: 4, specialXOffset: 0, specialYOffset: -8,
specialType: SPECIAL_PROJECTILE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 90, direction: 1
);
AddMonster(
name: "rocketturtle", aliases: "rocketturtle,rocket turtle", eventID: OBJECT::ROCKETTURTLE, animSet: ANIM::ROCKTURT,
idleAnim: 0, idleFrameCount: 6, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 6, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 1, shootingFrameCount: 6, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 3, specialFrameCount: 6, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_PROJECTILE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 90, direction: 1
);
AddMonster(
name: "tufboss", aliases: "tufboss,turtleboss,schwarzenguard", eventID: OBJECT::TUFBOSS, animSet: ANIM::TUFBOSS,
idleAnim: 4, idleFrameCount: 4, idleXOffset: 0, idleYOffset: -4,
walkingAnim: 5, walkingFrameCount: 11, walkingXOffset: 0, walkingYOffset: -4,
shootingAnim: 0, shootingFrameCount: 19, shootingXOffset: 0, shootingYOffset: -4,
specialAnim: 0, specialFrameCount: 19, specialXOffset: 0, specialYOffset: -4,
specialType: SPECIAL_TURTLE_BITE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 90, direction: 1
);
AddMonster(
name: "tweedle", aliases: "tweedle,tweedleboss", eventID: OBJECT::TWEEDLEBOSS, animSet: ANIM::TWEEDLE,
idleAnim: 6, idleFrameCount: 11, idleXOffset: 0, idleYOffset: -8,
walkingAnim: 8, walkingFrameCount: 12, walkingXOffset: 0, walkingYOffset: -8,
shootingAnim: 3, shootingFrameCount: 15, shootingXOffset: 0, shootingYOffset: -8,
specialAnim: 1, specialFrameCount: 11, specialXOffset: 0, specialYOffset: -8,
specialType: SPECIAL_CHARGE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 90, direction: 1
);
AddMonster(
name: "uterus", aliases: "uterus", eventID: OBJECT::UTERUS, animSet: ANIM::UTERUS,
idleAnim: 3, idleFrameCount: 8, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 8, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 3, shootingFrameCount: 8, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 3, specialFrameCount: 8, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_PROJECTILE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 90, direction: 1, rotation: 256
);
AddMonster(
name: "witch", aliases: "witch", eventID: OBJECT::WITCH, animSet: ANIM::WITCH,
idleAnim: 0, idleFrameCount: 11, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 11, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 11, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 11, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_PROJECTILE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 90, direction: 1
);
AddMonster(
name: "devildevan", aliases: "devildevan,devil devan,devildevan boss,devil devan boss", eventID: OBJECT::DEVILDEVAN, animSet: ANIM::DEVILDEVAN,
idleAnim: 0, idleFrameCount: 11, idleXOffset: 0, idleYOffset: 0,
walkingAnim: 0, walkingFrameCount: 11, walkingXOffset: 0, walkingYOffset: 0,
shootingAnim: 0, shootingFrameCount: 11, shootingXOffset: 0, shootingYOffset: 0,
specialAnim: 0, specialFrameCount: 11, specialXOffset: 0, specialYOffset: 0,
specialType: SPECIAL_PROJECTILE, canFly: true, scale: 1.0, offsetY: 0,
cooldown: 90, direction: 1
);
int monitorX = 0;
int monitorY = 0;
int monitorFrames = 10;
int monitorSpeed = 8;
AddMonster(
name: "watershield", aliases: "water,water shield,watershield,bubble,bubble shield,bubbleshield", eventID: OBJECT::WATERSHIELD, animSet: ANIM::PICKUPS,
idleAnim: 10, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY,
walkingAnim: 10, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY,
shootingAnim: 10, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY,
specialAnim: 10, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY,
specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed,
shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed
);
AddMonster(
name: "fireshield", aliases: "fire,fire shield,fireshield", eventID: OBJECT::FIRESHIELD, animSet: ANIM::PICKUPS,
idleAnim: 31, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY,
walkingAnim: 31, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY,
shootingAnim: 31, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY,
specialAnim: 31, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY,
specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed,
shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed
);
AddMonster(
name: "lightningshield", aliases: "lightning,lightning shield,lightningshield,electric,electric shield,electricshield", eventID: OBJECT::LIGHTNINGSHIELD, animSet: ANIM::PICKUPS,
idleAnim: 51, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY,
walkingAnim: 51, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY,
shootingAnim: 51, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY,
specialAnim: 51, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY,
specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed,
shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed
);
AddMonster(
name: "morphmonitor", aliases: "morph,morphmonitor,morph monitor", eventID: OBJECT::MORPH, animSet: ANIM::PICKUPS,
idleAnim: 70, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY,
walkingAnim: 70, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY,
shootingAnim: 70, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY,
specialAnim: 70, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY,
specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed,
shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed
);
AddMonster(
name: "birdmonitor", aliases: "bird,birdmonitor,bird monitor,birdmorph,bird morph", eventID: OBJECT::BIRDMORPH, animSet: ANIM::PICKUPS,
idleAnim: 69, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY,
walkingAnim: 69, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY,
shootingAnim: 69, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY,
specialAnim: 69, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY,
specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0,
cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed,
shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed
);
AddMonster(name: "blasterpowerup", aliases: "blaster,blasterpowerup,blaster powerup", eventID: OBJECT::BLASTERPOWERUP, animSet: ANIM::PICKUPS, idleAnim: 60, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY, walkingAnim: 60, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY, shootingAnim: 60, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY, specialAnim: 60, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY, specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0, cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed, shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed);
AddMonster(name: "bouncerpowerup", aliases: "bouncer,bouncerpowerup,bouncer powerup", eventID: OBJECT::BOUNCERPOWERUP, animSet: ANIM::PICKUPS, idleAnim: 61, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY, walkingAnim: 61, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY, shootingAnim: 61, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY, specialAnim: 61, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY, specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0, cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed, shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed);
AddMonster(name: "icepowerup", aliases: "ice,freezer,icepowerup,ice powerup,freezer powerup", eventID: OBJECT::ICEPOWERUP, animSet: ANIM::PICKUPS, idleAnim: 62, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY, walkingAnim: 62, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY, shootingAnim: 62, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY, specialAnim: 62, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY, specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0, cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed, shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed);
AddMonster(name: "seekerpowerup", aliases: "seeker,seekerpowerup,seeker powerup", eventID: OBJECT::SEEKERPOWERUP, animSet: ANIM::PICKUPS, idleAnim: 63, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY, walkingAnim: 63, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY, shootingAnim: 63, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY, specialAnim: 63, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY, specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0, cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed, shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed);
AddMonster(name: "rfpowerup", aliases: "rf,rfpowerup,rf powerup", eventID: OBJECT::RFPOWERUP, animSet: ANIM::PICKUPS, idleAnim: 64, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY, walkingAnim: 64, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY, shootingAnim: 64, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY, specialAnim: 64, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY, specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0, cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed, shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed);
AddMonster(name: "toasterpowerup", aliases: "toaster,toasterpowerup,toaster powerup", eventID: OBJECT::TOASTERPOWERUP, animSet: ANIM::PICKUPS, idleAnim: 65, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY, walkingAnim: 65, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY, shootingAnim: 65, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY, specialAnim: 65, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY, specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0, cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed, shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed);
AddMonster(name: "gun8powerup", aliases: "gun8,pepper,gun8powerup,gun8 powerup,pepper powerup", eventID: OBJECT::GUN8POWERUP, animSet: ANIM::PICKUPS, idleAnim: 66, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY, walkingAnim: 66, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY, shootingAnim: 66, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY, specialAnim: 66, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY, specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0, cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed, shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed);
AddMonster(name: "gun9powerup", aliases: "gun9,electro,gun9powerup,gun9 powerup,electro powerup", eventID: OBJECT::GUN9POWERUP, animSet: ANIM::PICKUPS, idleAnim: 67, idleFrameCount: monitorFrames, idleXOffset: monitorX, idleYOffset: monitorY, walkingAnim: 67, walkingFrameCount: monitorFrames, walkingXOffset: monitorX, walkingYOffset: monitorY, shootingAnim: 67, shootingFrameCount: monitorFrames, shootingXOffset: monitorX, shootingYOffset: monitorY, specialAnim: 67, specialFrameCount: monitorFrames, specialXOffset: monitorX, specialYOffset: monitorY, specialType: SPECIAL_NONE, canFly: false, scale: 1.0, offsetY: 0, cooldown: 70, direction: 1, idleSpeed: monitorSpeed, walkingSpeed: monitorSpeed, shootingSpeed: monitorSpeed, specialSpeed: monitorSpeed);
}
int EventIDFromNpcType(int type)
{
switch(type)
{
case npcBunniesAnimations::NpcMonster::Bat: return OBJECT::BAT;
case npcBunniesAnimations::NpcMonster::Bee: return OBJECT::BEE;
case npcBunniesAnimations::NpcMonster::BeeBoy: return OBJECT::BEEBOY;
case npcBunniesAnimations::NpcMonster::Bees: return OBJECT::BEES;
case npcBunniesAnimations::NpcMonster::Butterfly: return OBJECT::BUTTERFLY;
case npcBunniesAnimations::NpcMonster::Crab: return OBJECT::CRAB;
case npcBunniesAnimations::NpcMonster::Demon: return OBJECT::DEMON;
case npcBunniesAnimations::NpcMonster::DoggyDogg: return OBJECT::DOGGYDOGG;
case npcBunniesAnimations::NpcMonster::Dragon: return OBJECT::DRAGON;
case npcBunniesAnimations::NpcMonster::Dragonfly: return OBJECT::DRAGONFLY;
case npcBunniesAnimations::NpcMonster::FatChick: return OBJECT::FATCHICK;
case npcBunniesAnimations::NpcMonster::Fencer: return OBJECT::FENCER;
case npcBunniesAnimations::NpcMonster::Fish: return OBJECT::FISH;
case npcBunniesAnimations::NpcMonster::Hatter: return OBJECT::HATTER;
case npcBunniesAnimations::NpcMonster::Helmut: return OBJECT::HELMUT;
case npcBunniesAnimations::NpcMonster::LabRat: return OBJECT::LABRAT;
case npcBunniesAnimations::NpcMonster::Lizard: return OBJECT::LIZARD;
case npcBunniesAnimations::NpcMonster::FloatLizard: return OBJECT::FLOATLIZARD;
case npcBunniesAnimations::NpcMonster::XmasLizard: return OBJECT::XMASLIZARD;
case npcBunniesAnimations::NpcMonster::XmasFloatLizard: return OBJECT::XMASFLOATLIZARD;
case npcBunniesAnimations::NpcMonster::Monkey: return OBJECT::MONKEY;
case npcBunniesAnimations::NpcMonster::StandMonkey: return OBJECT::STANDMONKEY;
case npcBunniesAnimations::NpcMonster::NormalTurtle: return OBJECT::NORMTURTLE;
case npcBunniesAnimations::NpcMonster::XmasNormalTurtle: return OBJECT::XMASNORMTURTLE;
case npcBunniesAnimations::NpcMonster::TubeTurtle: return OBJECT::TUBETURTLE;
case npcBunniesAnimations::NpcMonster::TufTurtle: return OBJECT::TUFTURT;
case npcBunniesAnimations::NpcMonster::Rapier: return OBJECT::RAPIER;
case npcBunniesAnimations::NpcMonster::Raven: return OBJECT::RAVEN;
case npcBunniesAnimations::NpcMonster::Skeleton: return OBJECT::SKELETON;
case npcBunniesAnimations::NpcMonster::Spark: return OBJECT::SPARK;
case npcBunniesAnimations::NpcMonster::Sucker: return OBJECT::SUCKER;
case npcBunniesAnimations::NpcMonster::FloatSucker: return OBJECT::FLOATSUCKER;
case npcBunniesAnimations::NpcMonster::Cat: return OBJECT::CAT;
case npcBunniesAnimations::NpcMonster::PacmanGhost: return OBJECT::PACMANGHOST;
case npcBunniesAnimations::NpcMonster::Moth: return OBJECT::MOTH;
case npcBunniesAnimations::NpcMonster::Witch: return OBJECT::WITCH;
case npcBunniesAnimations::NpcBoss::Bilsy: return OBJECT::BILSY;
case npcBunniesAnimations::NpcBoss::XmasBilsy: return OBJECT::XMASBILSY;
case npcBunniesAnimations::NpcBoss::Bolly: return OBJECT::BOLLY;
case npcBunniesAnimations::NpcBoss::Bubba: return OBJECT::BUBBA;
case npcBunniesAnimations::NpcBoss::DevilDevan: return OBJECT::DEVILDEVAN;
case npcBunniesAnimations::NpcBoss::Queen: return OBJECT::QUEEN;
case npcBunniesAnimations::NpcBoss::Robot: return OBJECT::ROBOT;
case npcBunniesAnimations::NpcBoss::RocketTurtle: return OBJECT::ROCKETTURTLE;
case npcBunniesAnimations::NpcBoss::TufBoss: return OBJECT::TUFBOSS;
case npcBunniesAnimations::NpcBoss::Tweedle: return OBJECT::TWEEDLEBOSS;
case npcBunniesAnimations::NpcBoss::Uterus: return OBJECT::UTERUS;
case npcBunniesAnimations::NpcObject::WaterShield: return OBJECT::WATERSHIELD;
case npcBunniesAnimations::NpcObject::FireShield: return OBJECT::FIRESHIELD;
case npcBunniesAnimations::NpcObject::LightningShield: return OBJECT::LIGHTNINGSHIELD;
case npcBunniesAnimations::NpcObject::MorphMonitor: return OBJECT::MORPH;
case npcBunniesAnimations::NpcObject::BirdMonitor: return OBJECT::BIRDMORPH;
case npcBunniesAnimations::NpcObject::BlasterPowerup: return OBJECT::BLASTERPOWERUP;
case npcBunniesAnimations::NpcObject::BouncerPowerup: return OBJECT::BOUNCERPOWERUP;
case npcBunniesAnimations::NpcObject::IcePowerup: return OBJECT::ICEPOWERUP;
case npcBunniesAnimations::NpcObject::SeekerPowerup: return OBJECT::SEEKERPOWERUP;
case npcBunniesAnimations::NpcObject::RFPowerup: return OBJECT::RFPOWERUP;
case npcBunniesAnimations::NpcObject::ToasterPowerup: return OBJECT::TOASTERPOWERUP;
case npcBunniesAnimations::NpcObject::Gun8Powerup: return OBJECT::GUN8POWERUP;
case npcBunniesAnimations::NpcObject::Gun9Powerup: return OBJECT::GUN9POWERUP;
}
return -1;
}
int FindByEventID(int eventID)
{
InitializeMonsterTable();
for(uint i = 0; i < monsters.length; i++)
if(monsters[i].eventID == eventID)
return int(i);
return -1;
}
int FindByNpcType(int type)
{
return FindByEventID(EventIDFromNpcType(type));
}
int CachedMonsterIndexForNpc(npcBunniesCore::npcBunny &in npc)
{
if(npc.id < 0) return FindByNpcType(npc.type);
while(int(cachedNpcMonsterType.length) <= npc.id)
{
cachedNpcMonsterType.insertLast(0);
cachedNpcMonsterIndex.insertLast(-1);
}
if(cachedNpcMonsterType[npc.id] != npc.type)
{
cachedNpcMonsterType[npc.id] = npc.type;
cachedNpcMonsterIndex[npc.id] = FindByNpcType(npc.type);
}
return cachedNpcMonsterIndex[npc.id];
}
void LoadMonsterAnim(int index)
{
if(index < 0 || index >= int(monsters.length)) return;
int animSet = monsters[index].animSet;
if(animSet >= 0 && jjAnimSets[animSet].firstAnim == 0)
jjAnimSets[animSet].load();
}
int SafeAnimSpeed(int speed)
{
return speed <= 0 ? DEFAULT_ANIM_SPEED : speed;
}
int AnimationDuration(int frameCount, int speed)
{
int count = frameCount <= 0 ? 1 : frameCount;
return count * SafeAnimSpeed(speed);
}
void EnsureNpcShootingState(int npcID)
{
if(npcID < 0) return;
while(int(lastSeenFireTick.length) <= npcID)
{
lastSeenFireTick.insertLast(-9999);
shootingStarted.insertLast(-9999);
shootingUntil.insertLast(-9999);
shootingQueued.insertLast(false);
}
}
bool UpdateNpcShootingAnimation(npcBunniesCore::npcBunny &in npc, MonsterDef &in def)
{
if(npc.id < 0 || def.shootingAnim < 0) return false;
EnsureNpcShootingState(npc.id);
int duration = AnimationDuration(def.shootingFrameCount, def.shootingSpeed);
if(npc.fightingLastFireTick > lastSeenFireTick[npc.id])
{
lastSeenFireTick[npc.id] = npc.fightingLastFireTick;
if(shootingUntil[npc.id] > jjGameTicks)
{
shootingQueued[npc.id] = true;
}
else
{
shootingStarted[npc.id] = npc.fightingLastFireTick;
if(shootingStarted[npc.id] < 0 || shootingStarted[npc.id] > jjGameTicks) shootingStarted[npc.id] = jjGameTicks;
shootingUntil[npc.id] = shootingStarted[npc.id] + duration;
shootingQueued[npc.id] = false;
}
}
if(shootingUntil[npc.id] <= jjGameTicks && shootingQueued[npc.id])
{
shootingStarted[npc.id] = jjGameTicks;
shootingUntil[npc.id] = jjGameTicks + duration;
shootingQueued[npc.id] = false;
}
return shootingUntil[npc.id] > jjGameTicks;
}
int StateAnim(MonsterDef &in def, bool shooting, bool walking)
{
if(shooting && def.shootingAnim >= 0) return def.shootingAnim;
if(walking && def.walkingAnim >= 0) return def.walkingAnim;
return def.idleAnim;
}
int StateFrameCount(MonsterDef &in def, bool shooting, bool walking)
{
int count = def.idleFrameCount;
if(shooting) count = def.shootingFrameCount;
else if(walking) count = def.walkingFrameCount;
return count <= 0 ? 1 : count;
}
int StateFrame(MonsterDef &in def, bool shooting, bool walking, int shootingStartTick)
{
int count = StateFrameCount(def, shooting, walking);
if(shooting)
{
int elapsed = jjGameTicks - shootingStartTick;
if(elapsed < 0) elapsed = 0;
return (elapsed / SafeAnimSpeed(def.shootingSpeed)) % count;
}
if(walking) return (jjGameTicks / SafeAnimSpeed(def.walkingSpeed)) % count;
return (jjGameTicks / SafeAnimSpeed(def.idleSpeed)) % count;
}
int StateXOffset(MonsterDef &in def, bool shooting, bool walking)
{
if(shooting) return def.shootingXOffset;
if(walking) return def.walkingXOffset;
return def.idleXOffset;
}
int StateYOffset(MonsterDef &in def, bool shooting, bool walking)
{
if(shooting) return def.shootingYOffset;
if(walking) return def.walkingYOffset;
return def.idleYOffset;
}
bool DrawNpcMonster(npcBunniesCore::npcBunny &in npc, jjOBJ@ obj, bool shooting, bool walking)
{
if(!npcBunniesCore::ENABLE_NPC_MONSTER_DRAWING) return true;
int index = CachedMonsterIndexForNpc(npc);
if(index < 0) return false;
LoadMonsterAnim(index);
MonsterDef def = monsters[index];
if(def.animSet < 0 || jjAnimSets[def.animSet].firstAnim == 0) return false;
shooting = UpdateNpcShootingAnimation(npc, def);
int shootingStartTick = shooting && npc.id >= 0 && npc.id < int(shootingStarted.length) ? shootingStarted[npc.id] : jjGameTicks;
float npcScale = npcBunniesCore::NpcSizeScale(npc.sizeMode);
float scaleX = def.scale * npcScale * (obj.direction >= 0 ? 1 : -1) * def.direction;
float scaleY = def.scale * npcScale;
float x = obj.xPos + StateXOffset(def, shooting, walking) * (scaleX >= 0 ? 1 : -1);
float y = obj.yPos + npcBunniesCore::NpcSizeDrawYOffset(npc.sizeMode) + def.offsetY + StateYOffset(def, shooting, walking);
int anim = StateAnim(def, shooting, walking);
int frame = StateFrame(def, shooting, walking, shootingStartTick);
if(def.rotation != 0)
{
int rotation = scaleX >= 0 ? (1024 - def.rotation) % 1024 : def.rotation;
jjDrawRotatedSprite(x, y, def.animSet, anim, frame, rotation, scaleX, scaleY, SPRITE::NORMAL, 0, 4, 4, -1);
}
else
jjDrawResizedSprite(x, y, def.animSet, anim, frame, scaleX, scaleY, SPRITE::NORMAL, 0, 4, 4, -1);
if(npcBunniesCore::ENABLE_NPC_ACCESSORIES && npcBunniesAccessories::NpcAccessories::NpcHasDrawableAccessory(npc)) npcBunniesAccessories::NpcAccessories::Draw(npc, x, y, def.animSet, anim, frame, scaleX >= 0 ? 1 : -1, 1, def.scale * npcScale);
return true;
}
bool GetWalkingUiAnimation(int npcType, npcBunniesAnimations::NpcUiAnimation &inout icon)
{
int index = FindByNpcType(npcType);
if(index < 0) return false;
LoadMonsterAnim(index);
MonsterDef def = monsters[index];
if(def.animSet < 0 || jjAnimSets[def.animSet].firstAnim == 0) return false;
npcBunniesAnimations::SetNpcUiAnimation(icon, def.animSet, def.walkingAnim >= 0 ? def.walkingAnim : def.idleAnim, 0, def.walkingFrameCount <= 0 ? 1 : def.walkingFrameCount, SafeAnimSpeed(def.walkingSpeed), SPRITE::NORMAL, 0, def.walkingXOffset, def.offsetY + def.walkingYOffset);
return true;
}
}
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.