Implement mounted monster behavior and animations that run separately from the main monster itself. Added Goblin Boar Rider AI and Goblin Bow (while on Boar Rider) AI. Added spawn of submonster on death of main mounted monster. Release Build 9199.
if(internal_mounted_animState.has_value()^mounted_animation.has_value())ERR("WARNING! The internal mounted animation state and the mounted animation variables are not matching! They should both either be on or both be off! THIS SHOULD NOT BE HAPPENING!");
if(!MONSTER_DATA.count(std::string(monsterName)))ERR(std::format("WARNING! Monster {} specified in DeathSpawnInfo does not exist! Please provide a proper monster name.",monsterName));
if(!MONSTER_DATA.count(std::string(monsterName)))ERR(std::format("WARNING! Monster {} specified in DeathSpawnInfo does not exist! Please provide a proper monster name.",monsterName));
//Returns true when damage is actually dealt. Provide whether or not the attack is on the upper level or not. Monsters must be on the same level to get hit by it. (there is a death check and level check here.)
//If you need to hurt multiple enemies try AiL::HurtEnemies()
@ -236,6 +229,7 @@ private:
floatprevFacingDirectionAngle=0.f;//Keeps track of the angle of the previous target to ensure four-way sprite facing changes don't happen too early or spastically.
floatlastFacingDirectionChange=0.f;//How much time has passed since the last facing direction change. Used to ensure another facing direction change doesn't happen too quickly. Probably allowing one every quarter second is good enough.
std::vector<DeathSpawnInfo>deathData;//Data that contains further actions and information when this monster dies. Mostly used to spawn sub-monsters from a defeated monster.
# How long it takes to prepare the attack once an attack is queued.
Attack Windup Time = 1.0s
Arrow Spd = 350
Arrow Hitbox Radius = 8
# The perception level indicates how accurate the bow user's shots become over time. Perception can be between 0-90. A perception level of 90 should never miss. This doesn't necessarily mean lower numbers will miss, just that it doesn't auto-correct for error as much.
Starting Perception Level = 0
# Every shot taken, the bow user's perception level will increase by this amount.
Perception Level Increase = 2.5
Maximum Perception Level = 45
#######################
# END Goblin Bow Stuff
#######################
###################
### Boar Stuff
###################
Closein Range = 700
Backpedal Range = 400
# Number of times the boar scratches the ground before charging.
# The amount of time this takes is also dependent on the animation speed (extra animation 0)
Ground Scratch Count = 2
Charge Movespeed = 130%
Charge Distance = 900
# Amount of time to wait after charging before returning to Move Phase.