Begin Pirate Captain AI implementation.

master
sigonasr2 2 months ago
parent da2640fbc1
commit c16dccc623
  1. 15
      Adventures in Lestoria/Pirate_Captain.cpp
  2. 37
      Adventures in Lestoria/assets/config/Monsters.txt

@ -34,7 +34,7 @@ Portions of this software are copyright
Project (www.freetype.org). Please see LICENSE_FT.txt for more information. Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
All rights reserved. All rights reserved.
*/ */
#pragma endregion #pragma endregion
#include "MonsterStrategyHelpers.h" #include "MonsterStrategyHelpers.h"
#include "util.h" #include "util.h"
@ -47,5 +47,18 @@ using A=Attribute;
INCLUDE_game INCLUDE_game
void Monster::STRATEGY::PIRATE_CAPTAIN(Monster&m,float fElapsedTime,std::string strategy){ void Monster::STRATEGY::PIRATE_CAPTAIN(Monster&m,float fElapsedTime,std::string strategy){
enum PhaseName{
INIT,
MOVE,
};
switch(m.phase){
case INIT:{
m.F(A::TARGET_TIMER)=
m.phase=MOVE;
}break;
case MOVE:{
GOBLIN_DAGGER(m,fElapsedTime,"Goblin Dagger");
}break;
}
} }

@ -1396,6 +1396,43 @@ Monsters
# Setting this to true means every four rows indicates one animation, the ordering of the directions is: NORTH, EAST, SOUTH, WEST # Setting this to true means every four rows indicates one animation, the ordering of the directions is: NORTH, EAST, SOUTH, WEST
4-Way Spritesheet = True 4-Way Spritesheet = True
#### Script Override ####
# The Pirate Captain normally behaves as the Pirate, which also borrows from Goblin Dagger.
## Goblin Dagger Overrides ##
# Distance from player to run to before swinging weapon.
Attack Spacing = 100
# Number of pixels from the dagger's center that the player would be hit by.
Dagger Hit Radius = 16
# Number of pixels of reach the dagger stab has.
Dagger Stab Distance = 4
# Number of pixels of reach the dagger slash has from the monster.
Dagger Slash Distance = 12
# Slash Attack windup time
Slash Windup Time = 0.2s
# Stab Attack windup time
Stab Windup Time = 0.2s
# Amount of time where nothing happens after an attack.
Attack Recovery Time = 0.6s
Dagger Stab Image = "pirate_dagger.png"
Dagger Slash Image = "pirate_slash.png"
# Offset for the dagger stab effect per direction from the monster's center.
Dagger Up Offset = -6,-5.5
Dagger Down Offset = -5,-1
Dagger Right Offset = 9,0
Dagger Left Offset = -8,-2
########
Animations Animations
{ {

Loading…
Cancel
Save