@ -1329,13 +1329,16 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
label = label . replace ( label . find ( L " $USER " ) , 5 , transform_to < std : : wstring > ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > obj - > name ) ) ;
}
if ( label . find ( L " $POWER " ) ! = std : : string : : npos ) {
label = label . replace ( label . find ( L " $POWER " ) , 6 , transform_to < std : : wstring > ( ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade ! = 0 ) ? std : : wstring ( 1 , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade ) : L " " ) ) ;
label = label . replace ( label . find ( L " $POWER " ) , 6 , transform_to < std : : wstring > ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > name ) + L " " + ( ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade ! = 0 ) ? std : : wstring ( 1 , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade ) : L " " ) ) ;
}
if ( label . find ( L " $ITEM " ) ! = std : : string : : npos ) {
label = label . replace ( label . find ( L " $ITEM " ) , 5 , transform_to < std : : wstring > ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > equipment [ EquipSlot : : WEAPON ] - > name ) ) ;
}
}
DrawFancyStringDecal ( { 2 , 2 } , Wrap ( label , ScreenWidth ( ) - 2 , false , { 1 , 2 } ) , WHITE , { 1 , 2 } ) ;
vd2d text = { 2 , 2 } ;
vd2d shadowOffset = { 1 , 1 } ;
DrawFancyStringDecal ( text + shadowOffset , Wrap ( label , ScreenWidth ( ) - 2 , false , { 1 , 2 } ) , BLACK , { 1 , 2 } ) ;
DrawFancyStringDecal ( text , Wrap ( label , ScreenWidth ( ) - 2 , false , { 1 , 2 } ) , WHITE , { 1 , 2 } ) ;
}
if ( BATTLE_STATE ! = BattleState : : MOVE_CAMERA ) {
SetDrawTarget ( layer : : INTERFACE ) ;
@ -1874,6 +1877,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
MOVELIST [ BattleMoveName : : BASH ] = new Battle : : Move ( " Bash " , " Regular attack. " , 5 , 5 , ㅍ 0 , 1 , 0 , false , { 0 , 0 , 0 , 0 } ) ;
MOVELIST [ BattleMoveName : : BASH_CHANGE ] = new Battle : : Move ( MOVELIST [ BattleMoveName : : BASH ] - > name , " Regular attack. " , MOVELIST [ BattleMoveName : : BASH ] - > baseDmg , MOVELIST [ BattleMoveName : : BASH ] - > randomDmg , ㅍ MOVELIST [ BattleMoveName : : BASH ] - > PPCost , MOVELIST [ BattleMoveName : : BASH ] - > range , MOVELIST [ BattleMoveName : : BASH ] - > composition , L " $USER equipped the $ITEM instead and attacks. " , MOVELIST [ BattleMoveName : : BASH ] - > eff , MOVELIST [ BattleMoveName : : BASH ] - > pctDamage , MOVELIST [ BattleMoveName : : BASH ] - > properties ) ;
MOVELIST [ BattleMoveName : : DEFEND ] = new Battle : : Move ( " Defend " , " Defend. " , 0 , 0 , ㅍ 0 , 1 , 5 * 60 , true , { 0 , 0 , 0 , 0 } ) ;
MOVELIST [ BattleMoveName : : EQUIP_ARMOR ] = new Battle : : Move ( " Defend " , " Defend. " , 0 , 0 , ㅍ 0 , 1 , 5 * 60 , true , { 0 , 0 , 0 , 0 } ) ;
MOVELIST [ BattleMoveName : : HAILSTORM_A ] = new Battle : : Move ( " Hailstorm " , " Causes heavy ice rocks to crash " , ALPHA , 40 , 20 , ㅍ 4 , 4 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HAILSTORM_B ] = new Battle : : Move ( " Hailstorm " , " Causes heavy ice rocks to crash " , BETA , 80 , 20 , ㅍ 12 , 4 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HAILSTORM_G ] = new Battle : : Move ( " Hailstorm " , " Causes heavy ice rocks to crash " , GAMMA , 120 , 20 , ㅍ 28 , 4 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
@ -2713,77 +2717,81 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
}
if ( CURRENT_EFFECT = = nullptr & & BATTLE_ANIMATION_TIMER = = 90 | | CURRENT_EFFECT ! = nullptr & & BATTLE_ANIMATION_TIMER > CURRENT_EFFECT - > maxLifeTime ) {
if ( CURRENT_TURN < 0 ) {
if ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > friendly ) {
if ( PARTY_MEMBER_STATS [ - PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget - 1 ] - > GetHP ( ) > 0 ) {
for ( auto & ent : GetEntitiesInRange ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget , PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > channelPos , PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove ) ) {
int healAmt = PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > baseDmg +
( ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > randomDmg > 0 ) ? rand ( ) % PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > randomDmg : 0 )
+ PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > baseAtk ;
if ( ent - > GetHP ( ) > 0 ) {
std : : cout < < PARTY_MEMBER_OBJ [ - CURRENT_TURN - 1 ] - > name < < " uses " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > name < < " " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > grade < < " on " < < ent - > obj - > name < < " recovering " < < healAmt < < " health. \n " ;
ent - > AddHP ( healAmt ) ;
int memberID = getMemberIDComparingObject ( ent - > obj ) ;
vi2d box = { ( 128 - 32 * PARTY_MEMBER_COUNT ) + memberID * 64 + 29 , 170 } ;
DAMAGE_NUMBERS . push_back ( new DamageNumber ( - healAmt , box + cameraPos ) ) ;
if ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget ! = NO_TARGET ) {
if ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > friendly ) {
if ( PARTY_MEMBER_STATS [ - PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget - 1 ] - > GetHP ( ) > 0 ) {
for ( auto & ent : GetEntitiesInRange ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget , PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > channelPos , PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove ) ) {
int healAmt = PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > baseDmg +
( ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > randomDmg > 0 ) ? rand ( ) % PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > randomDmg : 0 )
+ PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > baseAtk ;
if ( ent - > GetHP ( ) > 0 ) {
std : : cout < < PARTY_MEMBER_OBJ [ - CURRENT_TURN - 1 ] - > name < < " uses " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > name < < " " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > grade < < " on " < < ent - > obj - > name < < " recovering " < < healAmt < < " health. \n " ;
ent - > AddHP ( healAmt ) ;
int memberID = getMemberIDComparingObject ( ent - > obj ) ;
vi2d box = { ( 128 - 32 * PARTY_MEMBER_COUNT ) + memberID * 64 + 29 , 170 } ;
DAMAGE_NUMBERS . push_back ( new DamageNumber ( - healAmt , box + cameraPos ) ) ;
}
}
} else {
std : : cout < < PARTY_MEMBER_OBJ [ - CURRENT_TURN - 1 ] - > name < < " uses " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > name < < " " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > grade < < " on " < < PARTY_MEMBER_OBJ [ - PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget - 1 ] - > name < < " but it failed. \n " ;
}
} else {
std : : cout < < PARTY_MEMBER_OBJ [ - CURRENT_TURN - 1 ] - > name < < " uses " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > name < < " " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > grade < < " on " < < PARTY_MEMBER_OBJ [ - PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget - 1 ] - > name < < " but it failed. \n " ;
}
} else {
if ( BATTLE_ENCOUNTER - > objs [ PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget ] - > GetHP ( ) > 0 ) {
//Enemies have their health directly set.
for ( auto & ent : GetEntitiesInRange ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget , PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > channelPos , PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove ) ) {
int dmgAmt = CalculateDamage ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] , ent ) ;
if ( ent - > GetHP ( ) > 0 ) {
std : : cout < < PARTY_MEMBER_OBJ [ - CURRENT_TURN - 1 ] - > name < < " uses " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > name < < " " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > grade < < " on " < < ent - > obj - > name < < " dealing " < < dmgAmt < < " health. \n " ;
ent - > _SetDirectHP ( ent - > GetHP ( ) - dmgAmt ) ;
ent - > obj - > blinkFrames = 35 ;
if ( ent - > GetHP ( ) < = 0 ) {
ent - > obj - > dead = true ;
if ( BATTLE_ENCOUNTER - > objs [ PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget ] - > GetHP ( ) > 0 ) {
//Enemies have their health directly set.
for ( auto & ent : GetEntitiesInRange ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget , PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > channelPos , PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove ) ) {
int dmgAmt = CalculateDamage ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] , ent ) ;
if ( ent - > GetHP ( ) > 0 ) {
std : : cout < < PARTY_MEMBER_OBJ [ - CURRENT_TURN - 1 ] - > name < < " uses " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > name < < " " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > grade < < " on " < < ent - > obj - > name < < " dealing " < < dmgAmt < < " health. \n " ;
ent - > _SetDirectHP ( ent - > GetHP ( ) - dmgAmt ) ;
ent - > obj - > blinkFrames = 35 ;
if ( ent - > GetHP ( ) < = 0 ) {
ent - > obj - > dead = true ;
}
DAMAGE_NUMBERS . push_back ( new DamageNumber ( dmgAmt , ent - > obj - > GetPosWithOrigin ( ) ) ) ;
}
DAMAGE_NUMBERS . push_back ( new DamageNumber ( dmgAmt , ent - > obj - > GetPosWithOrigin ( ) ) ) ;
}
}
} else {
std : : cout < < PARTY_MEMBER_OBJ [ - CURRENT_TURN - 1 ] - > name < < " uses " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > name < < " " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > grade < < " on " < < BATTLE_ENCOUNTER - > objs [ PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget ] - > obj - > name < < " but it failed. \n " ;
} else {
std : : cout < < PARTY_MEMBER_OBJ [ - CURRENT_TURN - 1 ] - > name < < " uses " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > name < < " " < < PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > grade < < " on " < < BATTLE_ENCOUNTER - > objs [ PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget ] - > obj - > name < < " but it failed. \n " ;
}
}
}
} else {
if ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > friendly ) {
if ( BATTLE_ENCOUNTER - > objs [ BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget ] - > GetHP ( ) > 0 ) {
for ( auto & ent : GetEntitiesInRange ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > channelPos , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove ) ) {
int healAmt = BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > baseDmg +
( ( rand ( ) % BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > randomDmg > 0 ) ? rand ( ) % BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > randomDmg : 0 )
+ BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > baseAtk ;
if ( ent - > GetHP ( ) > 0 ) {
std : : cout < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > obj - > name < < " uses " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > name < < " " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade < < " on " < < ent - > obj - > name < < " recovering " < < healAmt < < " health. \n " ;
ent - > AddHP ( healAmt ) ;
DAMAGE_NUMBERS . push_back ( new DamageNumber ( - healAmt , ent - > obj - > GetPosWithOrigin ( ) ) ) ;
if ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget ! = - NO_TARGET ) {
if ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > friendly ) {
if ( BATTLE_ENCOUNTER - > objs [ BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget ] - > GetHP ( ) > 0 ) {
for ( auto & ent : GetEntitiesInRange ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > channelPos , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove ) ) {
int healAmt = BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > baseDmg +
( ( rand ( ) % BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > randomDmg > 0 ) ? rand ( ) % BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > randomDmg : 0 )
+ BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > baseAtk ;
if ( ent - > GetHP ( ) > 0 ) {
std : : cout < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > obj - > name < < " uses " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > name < < " " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade < < " on " < < ent - > obj - > name < < " recovering " < < healAmt < < " health. \n " ;
ent - > AddHP ( healAmt ) ;
DAMAGE_NUMBERS . push_back ( new DamageNumber ( - healAmt , ent - > obj - > GetPosWithOrigin ( ) ) ) ;
}
}
} else {
std : : cout < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > obj - > name < < " uses " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > name < < " " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade < < " on " < < BATTLE_ENCOUNTER - > objs [ BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget ] - > obj - > name < < " but it failed. \n " ;
}
} else {
std : : cout < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > obj - > name < < " uses " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > name < < " " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade < < " on " < < BATTLE_ENCOUNTER - > objs [ BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget ] - > obj - > name < < " but it failed. \n " ;
}
} else {
if ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget - 1 ] ] - > GetHP ( ) > 0 ) {
for ( auto & ent : GetEntitiesInRange ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > channelPos , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove ) ) {
int dmgAmt = CalculateDamage ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] , ent ) ;
if ( ent - > GetHP ( ) > 0 ) {
std : : cout < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > obj - > name < < " uses " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > name < < " " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade < < " on " < < ent - > obj - > name < < " dealing " < < dmgAmt < < " health. \n " ;
ent - > SubtractHP ( dmgAmt ) ;
if ( ent - > GetTargetHP ( ) < 0 ) {
BATTLE_HIT_SCREENSHAKE = 75 ;
} else {
BATTLE_HIT_SCREENSHAKE = 25 ;
if ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget - 1 ] ] - > GetHP ( ) > 0 ) {
for ( auto & ent : GetEntitiesInRange ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > channelPos , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove ) ) {
int dmgAmt = CalculateDamage ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] , ent ) ;
if ( ent - > GetHP ( ) > 0 ) {
std : : cout < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > obj - > name < < " uses " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > name < < " " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade < < " on " < < ent - > obj - > name < < " dealing " < < dmgAmt < < " health. \n " ;
ent - > SubtractHP ( dmgAmt ) ;
if ( ent - > GetTargetHP ( ) < 0 ) {
BATTLE_HIT_SCREENSHAKE = 75 ;
} else {
BATTLE_HIT_SCREENSHAKE = 25 ;
}
int memberID = getMemberIDComparingObject ( ent - > obj ) ;
vi2d box = { ( 128 - 32 * PARTY_MEMBER_COUNT ) + memberID * 64 + 29 , 170 } ;
DAMAGE_NUMBERS . push_back ( new DamageNumber ( dmgAmt , box + cameraPos ) ) ;
}
int memberID = getMemberIDComparingObject ( ent - > obj ) ;
vi2d box = { ( 128 - 32 * PARTY_MEMBER_COUNT ) + memberID * 64 + 29 , 170 } ;
DAMAGE_NUMBERS . push_back ( new DamageNumber ( dmgAmt , box + cameraPos ) ) ;
}
} else {
std : : cout < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > obj - > name < < " uses " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > name < < " " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade < < " on " < < PARTY_MEMBER_OBJ [ - BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget - 1 ] - > name < < " but it failed. \n " ;
}
} else {
std : : cout < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > obj - > name < < " uses " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > name < < " " < < BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > grade < < " on " < < PARTY_MEMBER_OBJ [ - BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget - 1 ] - > name < < " but it failed. \n " ;
}
}
}
@ -2792,6 +2800,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
//Turn's done!
if ( CURRENT_TURN < 0 ) {
PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove = nullptr ;
PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget = NO_TARGET ;
PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > atb = 0 ;
BATTLE_STATE = BattleState : : WAIT ;
if ( previousEquip [ - CURRENT_TURN - 1 ] ! = - 1 ) {
@ -2800,9 +2809,9 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
printf ( " Equipped item: %s \n " , PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > equipment [ PrevEquip - > stats . equip ] - > name . c_str ( ) ) ;
previousEquip [ - CURRENT_TURN - 1 ] = - 1 ;
}
CURRENT_TURN = - 99 ;
} else {
BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove = nullptr ;
BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget = NO_TARGET ;
BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > atb = 0 ;
BATTLE_STATE = BattleState : : WAIT ;
}
@ -2830,6 +2839,8 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ i ] ] - > _SetDirectPP ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ i ] ] - > GetTargetPP ( ) ) ;
}
}
CURRENT_TURN = - 99 ;
}
} break ;
case BattleState : : SELECT_ACTION :