@ -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 ) ) ;
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 ) {
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 ) {
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 ) ) ;
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 ) {
if ( BATTLE_STATE ! = BattleState : : MOVE_CAMERA ) {
SetDrawTarget ( layer : : INTERFACE ) ;
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 ] = 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 : : 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 : : 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_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_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 } ) ;
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,6 +2717,7 @@ 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_EFFECT = = nullptr & & BATTLE_ANIMATION_TIMER = = 90 | | CURRENT_EFFECT ! = nullptr & & BATTLE_ANIMATION_TIMER > CURRENT_EFFECT - > maxLifeTime ) {
if ( CURRENT_TURN < 0 ) {
if ( CURRENT_TURN < 0 ) {
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_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > friendly ) {
if ( PARTY_MEMBER_STATS [ - PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedTarget - 1 ] - > GetHP ( ) > 0 ) {
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 ) ) {
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 ) ) {
@ -2749,7 +2754,9 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
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 " ;
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 {
} else {
if ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget ! = - NO_TARGET ) {
if ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > friendly ) {
if ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove - > friendly ) {
if ( BATTLE_ENCOUNTER - > objs [ BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget ] - > GetHP ( ) > 0 ) {
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 ) ) {
for ( auto & ent : GetEntitiesInRange ( BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > channelPos , BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove ) ) {
@ -2787,11 +2794,13 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
}
}
}
}
}
}
}
} else
} else
if ( CURRENT_EFFECT = = nullptr & & BATTLE_ANIMATION_TIMER > 120 | | CURRENT_EFFECT ! = nullptr & & BATTLE_ANIMATION_TIMER > CURRENT_EFFECT - > maxLifeTime + 30 ) {
if ( CURRENT_EFFECT = = nullptr & & BATTLE_ANIMATION_TIMER > 120 | | CURRENT_EFFECT ! = nullptr & & BATTLE_ANIMATION_TIMER > CURRENT_EFFECT - > maxLifeTime + 30 ) {
//Turn's done!
//Turn's done!
if ( CURRENT_TURN < 0 ) {
if ( CURRENT_TURN < 0 ) {
PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove = nullptr ;
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 ;
PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > atb = 0 ;
BATTLE_STATE = BattleState : : WAIT ;
BATTLE_STATE = BattleState : : WAIT ;
if ( previousEquip [ - CURRENT_TURN - 1 ] ! = - 1 ) {
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 ( ) ) ;
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 ;
previousEquip [ - CURRENT_TURN - 1 ] = - 1 ;
}
}
CURRENT_TURN = - 99 ;
} else {
} else {
BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove = nullptr ;
BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedMove = nullptr ;
BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > selectedTarget = NO_TARGET ;
BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > atb = 0 ;
BATTLE_ENCOUNTER - > objs [ CURRENT_TURN ] - > atb = 0 ;
BATTLE_STATE = BattleState : : WAIT ;
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 ( ) ) ;
PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ i ] ] - > _SetDirectPP ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ i ] ] - > GetTargetPP ( ) ) ;
}
}
}
}
CURRENT_TURN = - 99 ;
}
}
} break ;
} break ;
case BattleState : : SELECT_ACTION :
case BattleState : : SELECT_ACTION :