For a while I've been trying to create the smartest baddies Era has ever seen-- something that could effectively simulate player reactions and styles. These baddies, in which I titled "smartbaddy", have a wide range of player-like responses and actions.
Below are the current variables implemented with an explanation to each.
PHP Code:
//Basic baddy stuff ---------------------------------------------------------------------------------------------------------------------------------
this.baddyMustDie2Continue = true; //Does the baddy have to die to continue into any rooms? (true/false)
this.baddyCanAlert = false; //The baddy can alert the other baddies in the level (true/false)
this.baddyDeathMessages = {"DRATS", "Ow!"}; //Random selection of messages the baddy says upon death
this.baddyAlertMessages = {"I see you!", "Spotted!"}; //Random selection of messages the baddy says upon contact
this.baddyMode = "projectile"; //-- "projectile" or "melee"
this.baddyRespawnSecs = 60; //Time for baddy to respawn
this.baddySpeed = 0.39; //Baddy run speed
this.baddyRadius = 14; //Distance it takes for baddy to see you
this.baddyReflexTime = 4; //Increase to make the baddy react to movements slower (MUST BE AN INTEGER)
this.baddyMaxHp = 140; //Maximum HP
this.baddyHp = 140; //Start HP
this.baddyDefaultDir = 2; // 0 = up, 1 = left, 2 = down, 3 = right
this.baddyIdleGani = "era_deagle-idle";
this.baddyWalkGani = "era_deagle-walk";
this.baddyDefaultGani = "sit"; //The gani shown before combat
//Baddy melee control ---------------------------------------------------------------------------------------------------------------------------------
this.baddyMeleeSpeed = 0.78; //How fast their melee hits
this.baddyMeleeFreeze = 0.3; //Freeze time of melee
this.baddyMeleeDamage = 5; //Amount of melee damage done
this.baddyMeleeAni = "era_knife_stab1";
//Baddy projectile control ----------------------------------------------------------------------------------------------------------------------------------
this.baddyMaxProjectileDist = 12; //Distance the baddy tries to stay at when shooting at a player
this.baddyProjectileSpeed = 1.54; //Speed of their projectile weapon
this.baddyProjectileFreeze = 0.34; //Freeze of projectile weapon
this.baddyProjectileDamage = 25; //Projectile damage
this.baddyProjectileSpread = 0.05; //Projectile weapon's spread
this.baddyProjectileXModifier = {0, -0.8, 0, 2}; //Sets the projectile's X offset {up, left, down, right}
this.baddyProjectileYModifier = {-0.8, -0.5, 0.5, 0}; //Sets the projectile's Y offset {up, left, down, right}
this.baddyProjectileAni = "era_deagle-fire";