diff --git a/Adventures in Lestoria/Monster.cpp b/Adventures in Lestoria/Monster.cpp index 19612fc4..be28091a 100644 --- a/Adventures in Lestoria/Monster.cpp +++ b/Adventures in Lestoria/Monster.cpp @@ -1256,11 +1256,7 @@ const float Monster::GetCollisionDamage()const{ //Sets the strategy death function that runs when a monster dies. // The function should return false to indicate the event is over. If the event should keep running, return true. -//Arguments are: -// GameEvent& - The death event itself. -// Monster& - The monster reference -// const std::string& - The strategy name. -void Monster::SetStrategyDeathFunction(std::functionfunc){ +void Monster::SetStrategyDeathFunction(std::functionfunc){ strategyDeathFunc=func; } diff --git a/Adventures in Lestoria/Monster.h b/Adventures in Lestoria/Monster.h index fffbf220..3eff672b 100644 --- a/Adventures in Lestoria/Monster.h +++ b/Adventures in Lestoria/Monster.h @@ -320,6 +320,7 @@ private: float stunTimer{}; int accumulatedCurseOfDeathDamage{}; vf2d addedVel{}; + std::weak_ptrattachedTarget; //A monster attached to another monster can then use this to alter behaviors based on the state of that other monster. struct STRATEGY{ static std::string ERR; diff --git a/Adventures in Lestoria/Parrot.cpp b/Adventures in Lestoria/Parrot.cpp index be9908ee..e449799a 100644 --- a/Adventures in Lestoria/Parrot.cpp +++ b/Adventures in Lestoria/Parrot.cpp @@ -47,5 +47,9 @@ using A=Attribute; INCLUDE_game void Monster::STRATEGY::PARROT(Monster&m,float fElapsedTime,std::string strategy){ + HAWK(m,fElapsedTime,"Hawk"); + m.SetStrategyDeathFunction([](GameEvent&event,Monster&monster,const std::string&strategyName){ + return true; + }); } \ No newline at end of file diff --git a/Adventures in Lestoria/Pirate_Captain.cpp b/Adventures in Lestoria/Pirate_Captain.cpp index 58b0e840..03817e5d 100644 --- a/Adventures in Lestoria/Pirate_Captain.cpp +++ b/Adventures in Lestoria/Pirate_Captain.cpp @@ -71,6 +71,7 @@ void Monster::STRATEGY::PIRATE_CAPTAIN(Monster&m,float fElapsedTime,std::string switch(m.phase){ case INIT:{ m.F(A::TARGET_TIMER)=ConfigFloat("Shooting Frequency"); + m.F(A::WAIT_TIMER)=ConfigFloat(""); m.mounted_animation=Animate2D::Animation{}; for(bool firstAnimation=true;const std::string&animation:Config("Imposed Monster Animations").GetValues()){ m.mounted_animation.value().AddState(animation,ANIMATION_DATA.at(animation)); diff --git a/Adventures in Lestoria/assets/config/Monsters.txt b/Adventures in Lestoria/assets/config/Monsters.txt index e4e88315..e49a824f 100644 --- a/Adventures in Lestoria/assets/config/Monsters.txt +++ b/Adventures in Lestoria/assets/config/Monsters.txt @@ -1699,11 +1699,10 @@ Monsters # Animations must be defined in the same order as they are in their sprite sheets # The First Four animations must represent a standing, walking, attack, and death animation. Their names are up to the creator. IDLE = 4, 0.2, Repeat - SWIM = 4, 0.15, Repeat - SAND ATTACK = 6, 0.2, OneShot + FLYING = 4, 0.15, Repeat + ATTACKING = 2, 0.3, Repeat DEATH = 4, 0.15, OneShot - BURROW = 6, 0.1, OneShot - EMERGE = 5, 0.1, OneShot + ATTACK = 2, 0.3, Repeat } # Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity