@ -307,6 +307,7 @@ namespace Battle{
class Move {
class Move {
public :
public :
std : : string name ;
std : : string name ;
std : : string desc ;
std : : array < int , 4 > composition ;
std : : array < int , 4 > composition ;
int baseDmg ; //The base damage of the attack.
int baseDmg ; //The base damage of the attack.
int randomDmg ; //Additional random roll damage to add onto the base damage.
int randomDmg ; //Additional random roll damage to add onto the base damage.
@ -315,10 +316,16 @@ namespace Battle{
//Properties order is WET, DRY, COLD, HEAT
//Properties order is WET, DRY, COLD, HEAT
int PPCost = 0 ;
int PPCost = 0 ;
int grade = 0 ; //If the name of a move name match, then the grade helps sort it into the same category on menus.
int grade = 0 ; //If the name of a move name match, then the grade helps sort it into the same category on menus.
Move ( std : : string name , int baseDmg , int randomDmg , int PPCost , std : : array < int , 4 > composition , bool pctDamage = false , std : : vector < std : : pair < Property , int > > properties = { } )
int range = 1 ; //The range of this ability in tiles.
: Move ( name , 0 , baseDmg , randomDmg , PPCost , composition , pctDamage , properties ) { } ;
int channelTime = 0 ; //The amount of frames to channel the spell.
Move ( std : : string name , int grade , int baseDmg , int randomDmg , int PPCost , std : : array < int , 4 > composition , bool pctDamage = false , std : : vector < std : : pair < Property , int > > properties = { } )
bool friendly = false ; //Target allies instead.
: name ( name ) , grade ( grade ) , randomDmg ( randomDmg ) , baseDmg ( baseDmg ) , composition ( composition ) , pctDamage ( pctDamage ) , properties ( properties ) { }
//Assumes friendly is false.
Move ( std : : string name , std : : string desc , int baseDmg , int randomDmg , int PPCost , int range , std : : array < int , 4 > composition , bool pctDamage = false , std : : vector < std : : pair < Property , int > > properties = { } )
: Move ( name , desc , 0 , baseDmg , randomDmg , PPCost , range , 0 , false , composition , pctDamage , properties ) { } ;
Move ( std : : string name , std : : string desc , int baseDmg , int randomDmg , int PPCost , int range , int channelTime , bool friendly , std : : array < int , 4 > composition , bool pctDamage = false , std : : vector < std : : pair < Property , int > > properties = { } )
: Move ( name , desc , 0 , baseDmg , randomDmg , PPCost , range , channelTime , friendly , composition , pctDamage , properties ) { } ;
Move ( std : : string name , std : : string desc , int grade , int baseDmg , int randomDmg , int PPCost , int range , int channelTime , bool friendly , std : : array < int , 4 > composition , bool pctDamage = false , std : : vector < std : : pair < Property , int > > properties = { } )
: name ( name ) , grade ( grade ) , desc ( desc ) , randomDmg ( randomDmg ) , baseDmg ( baseDmg ) , range ( range ) , friendly ( friendly ) , channelTime ( channelTime ) , composition ( composition ) , pctDamage ( pctDamage ) , properties ( properties ) { }
} ;
} ;
}
}
@ -1515,6 +1522,10 @@ goes on a very long time, I hope you can understand this is only for testing pur
if ( BATTLE_STATE = = BattleState : : POWER_SELECT | | BATTLE_STATE = = BattleState : : GRADE_SELECT ) {
if ( BATTLE_STATE = = BattleState : : POWER_SELECT | | BATTLE_STATE = = BattleState : : GRADE_SELECT ) {
SetDrawTarget ( layer : : INTERFACE ) ;
SetDrawTarget ( layer : : INTERFACE ) ;
DrawDialogBox ( { 1 , 1 } , { ( int ) ( WIDTH / 2 ) , HEIGHT / 4 } , Pixel ( 70 , 33 , 105 , 128 ) , Pixel ( 62 , 54 , 69 , 128 ) , Pixel ( 185 , 148 , 255 , 128 ) ) ;
DrawDialogBox ( { 1 , 1 } , { ( int ) ( WIDTH / 2 ) , HEIGHT / 4 } , Pixel ( 70 , 33 , 105 , 128 ) , Pixel ( 62 , 54 , 69 , 128 ) , Pixel ( 185 , 148 , 255 , 128 ) ) ;
DrawDialogBox ( { WIDTH - ( int ) ( WIDTH / 2.5 ) - 2 , 1 } , { ( int ) ( WIDTH / 2.5 ) , HEIGHT / 4 } , Pixel ( 70 , 33 , 105 , 128 ) , Pixel ( 62 , 54 , 69 , 128 ) , Pixel ( 185 , 148 , 255 , 128 ) ) ;
DrawDialogBox ( { WIDTH - WIDTH / 3 - 2 , HEIGHT / 4 + 2 } , { ( int ) ( WIDTH / 6 ) , HEIGHT / 8 } , Pixel ( 70 , 33 , 105 , 128 ) , Pixel ( 62 , 54 , 69 , 128 ) , Pixel ( 185 , 148 , 255 , 128 ) ) ;
DrawDialogBox ( { WIDTH - WIDTH / 3 + WIDTH / 6 - 1 , HEIGHT / 4 + 2 } , { ( int ) ( WIDTH / 6 ) , HEIGHT / 8 } , Pixel ( 70 , 33 , 105 , 128 ) , Pixel ( 62 , 54 , 69 , 128 ) , Pixel ( 185 , 148 , 255 , 128 ) ) ;
DrawDialogBox ( { WIDTH - WIDTH / 3 + WIDTH / 6 - 1 , HEIGHT / 4 + HEIGHT / 8 + 3 } , { ( int ) ( WIDTH / 6 ) , HEIGHT / 8 } , Pixel ( 70 , 33 , 105 , 128 ) , Pixel ( 62 , 54 , 69 , 128 ) , Pixel ( 185 , 148 , 255 , 128 ) ) ;
int counter = 0 ;
int counter = 0 ;
int displayLimit = 0 ;
int displayLimit = 0 ;
for ( int i = 0 ; i < BATTLE_MOVELIST_DISPLAY . size ( ) ; i + + ) {
for ( int i = 0 ; i < BATTLE_MOVELIST_DISPLAY . size ( ) ; i + + ) {
@ -1943,41 +1954,41 @@ goes on a very long time, I hope you can understand this is only for testing pur
}
}
void SetupMoveList ( ) {
void SetupMoveList ( ) {
MOVELIST [ BattleMoveName : : TESTMOVE1 ] = new Battle : : Move ( " Test Move 1 " , 30 , 5 , ㅍ 0 , { 0 , 0 , 0 , 0 } ) ;
MOVELIST [ BattleMoveName : : TESTMOVE1 ] = new Battle : : Move ( " Test Move 1 " , " An attack " , 30 , 5 , ㅍ 0 , 1 , 0 , false , { 0 , 0 , 0 , 0 } ) ;
MOVELIST [ BattleMoveName : : TESTMOVE2 ] = new Battle : : Move ( " Test Move 2 " , 40 , 10 , ㅍ 0 , { 0 , 0 , 0 , 0 } ) ;
MOVELIST [ BattleMoveName : : TESTMOVE2 ] = new Battle : : Move ( " Test Move 2 " , " An attack " , 40 , 10 , ㅍ 0 , 1 , 0 , false , { 0 , 0 , 0 , 0 } ) ;
MOVELIST [ BattleMoveName : : TESTMOVE3 ] = new Battle : : Move ( " Test Move 3 " , 25 , 5 , ㅍ 0 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : TESTMOVE3 ] = new Battle : : Move ( " Test Move 3 " , " An attack " , 25 , 5 , ㅍ 0 , 1 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HAILSTORM_A ] = new Battle : : Move ( " Hailstorm " , ALPHA , 25 , 5 , ㅍ 4 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HAILSTORM_A ] = new Battle : : Move ( " Hailstorm " , " Causes heavy ice rocks to crash " , ALPHA , 25 , 5 , ㅍ 4 , 10 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HAILSTORM_B ] = new Battle : : Move ( " Hailstorm " , BETA , 25 , 5 , ㅍ 12 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HAILSTORM_B ] = new Battle : : Move ( " Hailstorm " , " Causes heavy ice rocks to crash " , BETA , 25 , 5 , ㅍ 12 , 10 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HAILSTORM_G ] = new Battle : : Move ( " Hailstorm " , GAMMA , 25 , 5 , ㅍ 28 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HAILSTORM_G ] = new Battle : : Move ( " Hailstorm " , " Causes heavy ice rocks to crash " , GAMMA , 25 , 5 , ㅍ 28 , 10 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HAILSTORM_O ] = new Battle : : Move ( " Hailstorm " , OMEGA , 25 , 5 , ㅍ 69 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HAILSTORM_O ] = new Battle : : Move ( " Hailstorm " , " Causes heavy ice rocks to crash " , OMEGA , 25 , 5 , ㅍ 69 , 10 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HURRICANE_A ] = new Battle : : Move ( " Hurricane " , ALPHA , 25 , 5 , ㅍ 7 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HURRICANE_A ] = new Battle : : Move ( " Hurricane " , " Scatters seeds, causes heavy rains and winds " , ALPHA , 25 , 5 , ㅍ 7 , 14 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HURRICANE_B ] = new Battle : : Move ( " Hurricane " , BETA , 25 , 5 , ㅍ 13 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HURRICANE_B ] = new Battle : : Move ( " Hurricane " , " Scatters seeds, causes heavy rains and winds " , BETA , 25 , 5 , ㅍ 13 , 14 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HURRICANE_G ] = new Battle : : Move ( " Hurricane " , GAMMA , 25 , 5 , ㅍ 25 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HURRICANE_G ] = new Battle : : Move ( " Hurricane " , " Scatters seeds, causes heavy rains and winds " , GAMMA , 25 , 5 , ㅍ 25 , 20 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HURRICANE_O ] = new Battle : : Move ( " Hurricane " , OMEGA , 25 , 5 , ㅍ 55 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : HURRICANE_O ] = new Battle : : Move ( " Hurricane " , " Scatters seeds, causes heavy rains and winds " , OMEGA , 25 , 5 , ㅍ 55 , 20 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : METEORRAIN_A ] = new Battle : : Move ( " Meteor Rain " , ALPHA , 25 , 5 , ㅍ 10 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : METEORRAIN_A ] = new Battle : : Move ( " Meteor Rain " , " Causes fiery rocks to fall from the skies. Chance to burn trees. " , ALPHA , 25 , 5 , ㅍ 10 , 6 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : METEORRAIN_B ] = new Battle : : Move ( " Meteor Rain " , BETA , 25 , 5 , ㅍ 22 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : METEORRAIN_B ] = new Battle : : Move ( " Meteor Rain " , " Causes fiery rocks to fall from the skies. Chance to burn trees. " , BETA , 25 , 5 , ㅍ 22 , 6 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : METEORRAIN_G ] = new Battle : : Move ( " Meteor Rain " , GAMMA , 25 , 5 , ㅍ 47 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : METEORRAIN_G ] = new Battle : : Move ( " Meteor Rain " , " Causes fiery rocks to fall from the skies. Chance to burn trees. " , GAMMA , 25 , 5 , ㅍ 47 , 6 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : METEORRAIN_O ] = new Battle : : Move ( " Meteor Rain " , OMEGA , 25 , 5 , ㅍ 98 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : METEORRAIN_O ] = new Battle : : Move ( " Meteor Rain " , " Causes fiery rocks to fall from the skies. Chance to burn trees. " , OMEGA , 25 , 5 , ㅍ 98 , 6 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFREEZE_A ] = new Battle : : Move ( " PK Freeze " , ALPHA , 25 , 5 , ㅍ 4 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFREEZE_A ] = new Battle : : Move ( " PK Freeze " , " A powerful chilling attack causing frostbite and slow. " , ALPHA , 25 , 5 , ㅍ 4 , 1 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFREEZE_B ] = new Battle : : Move ( " PK Freeze " , BETA , 25 , 5 , ㅍ 8 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFREEZE_B ] = new Battle : : Move ( " PK Freeze " , " A powerful chilling attack causing frostbite and slow. " , BETA , 25 , 5 , ㅍ 8 , 1 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFREEZE_G ] = new Battle : : Move ( " PK Freeze " , GAMMA , 25 , 5 , ㅍ 12 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFREEZE_G ] = new Battle : : Move ( " PK Freeze " , " A powerful chilling attack causing frostbite and slow. " , GAMMA , 25 , 5 , ㅍ 12 , 1 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFREEZE_O ] = new Battle : : Move ( " PK Freeze " , OMEGA , 25 , 5 , ㅍ 22 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFREEZE_O ] = new Battle : : Move ( " PK Freeze " , " A powerful chilling attack causing frostbite and slow. " , OMEGA , 25 , 5 , ㅍ 22 , 1 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKSHIELD_A ] = new Battle : : Move ( " PK Shield " , ALPHA , 25 , 5 , ㅍ 12 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKSHIELD_A ] = new Battle : : Move ( " PK Shield " , " Protects against physical attacks. " , ALPHA , 25 , 5 , ㅍ 12 , 1 , 0 , true , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKSHIELD_B ] = new Battle : : Move ( " PK Shield " , BETA , 25 , 5 , ㅍ 20 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKSHIELD_B ] = new Battle : : Move ( " PK Shield " , " Protects against physical attacks. " , BETA , 25 , 5 , ㅍ 20 , 1 , 0 , true , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKSHIELD_O ] = new Battle : : Move ( " PK Shield " , OMEGA , 25 , 5 , ㅍ 59 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKSHIELD_O ] = new Battle : : Move ( " PK Shield " , " Protects against physical attacks. " , OMEGA , 25 , 5 , ㅍ 59 , 4 , 0 , true , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKSHIELD_S ] = new Battle : : Move ( " PK Shield " , SIGMA , 25 , 5 , ㅍ 80 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKSHIELD_S ] = new Battle : : Move ( " PK Shield " , " Protects against physical attacks. " , SIGMA , 25 , 5 , ㅍ 80 , 10 , 0 , true , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKLIFEUP_A ] = new Battle : : Move ( " PK Lifeup " , ALPHA , 25 , 5 , ㅍ 4 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKLIFEUP_A ] = new Battle : : Move ( " PK Lifeup " , " Restores health. " , ALPHA , 25 , 5 , ㅍ 4 , 1 , 0 , true , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKLIFEUP_B ] = new Battle : : Move ( " PK Lifeup " , BETA , 25 , 5 , ㅍ 9 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKLIFEUP_B ] = new Battle : : Move ( " PK Lifeup " , " Restores health. " , BETA , 25 , 5 , ㅍ 9 , 1 , 0 , true , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKLIFEUP_G ] = new Battle : : Move ( " PK Lifeup " , GAMMA , 25 , 5 , ㅍ 21 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKLIFEUP_G ] = new Battle : : Move ( " PK Lifeup " , " Restores health. " , GAMMA , 25 , 5 , ㅍ 21 , 3 , 0 , true , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKLIFEUP_O ] = new Battle : : Move ( " PK Lifeup " , OMEGA , 25 , 5 , ㅍ 64 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKLIFEUP_O ] = new Battle : : Move ( " PK Lifeup " , " Restores health. " , OMEGA , 25 , 5 , ㅍ 64 , 10 , 0 , true , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFUN_A ] = new Battle : : Move ( " PK Fun " , ALPHA , 25 , 5 , ㅍ 15 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFUN_A ] = new Battle : : Move ( " PK Fun " , " A very fun barrage. " , ALPHA , 25 , 5 , ㅍ 15 , 12 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFUN_B ] = new Battle : : Move ( " PK Fun " , BETA , 25 , 5 , ㅍ 30 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFUN_B ] = new Battle : : Move ( " PK Fun " , " A very fun barrage. " , BETA , 25 , 5 , ㅍ 30 , 12 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFUN_G ] = new Battle : : Move ( " PK Fun " , GAMMA , 25 , 5 , ㅍ 45 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFUN_G ] = new Battle : : Move ( " PK Fun " , " A very fun barrage. " , GAMMA , 25 , 5 , ㅍ 45 , 20 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFUN_O ] = new Battle : : Move ( " PK Fun " , OMEGA , 25 , 5 , ㅍ 90 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFUN_O ] = new Battle : : Move ( " PK Fun " , " A very fun barrage. " , OMEGA , 25 , 5 , ㅍ 90 , 30 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFIRE_A ] = new Battle : : Move ( " PK Fire " , ALPHA , 25 , 5 , ㅍ 6 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFIRE_A ] = new Battle : : Move ( " PK Fire " , " Causes extreme heat to burn foes and scorch trees " , ALPHA , 25 , 5 , ㅍ 6 , 4 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFIRE_B ] = new Battle : : Move ( " PK Fire " , BETA , 25 , 5 , ㅍ 12 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFIRE_B ] = new Battle : : Move ( " PK Fire " , " Causes extreme heat to burn foes and scorch trees " , BETA , 25 , 5 , ㅍ 12 , 6 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFIRE_G ] = new Battle : : Move ( " PK Fire " , GAMMA , 25 , 5 , ㅍ 20 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFIRE_G ] = new Battle : : Move ( " PK Fire " , " Causes extreme heat to burn foes and scorch trees " , GAMMA , 25 , 5 , ㅍ 20 , 10 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFIRE_O ] = new Battle : : Move ( " PK Fire " , OMEGA , 25 , 5 , ㅍ 32 , { 0 , 0 , 20 , 0 } ) ;
MOVELIST [ BattleMoveName : : PKFIRE_O ] = new Battle : : Move ( " PK Fire " , " Causes extreme heat to burn foes and scorch trees " , OMEGA , 25 , 5 , ㅍ 32 , 12 , 0 , false , { 0 , 0 , 20 , 0 } ) ;
}
}
void SetupAnimations ( ) {
void SetupAnimations ( ) {