|
|
|
@ -172,6 +172,9 @@ std::vector<std::string> MESSAGE_BOX_CHOICE_LIST={}; |
|
|
|
|
bool waitingForChoice=false; |
|
|
|
|
int MESSAGE_BOX_DIALOG_CHOICE_CURSOR=0; |
|
|
|
|
Object*INTERACTING_WITH=nullptr; |
|
|
|
|
std::vector<std::pair<Item*,int>> SHOP_ITEMS={}; |
|
|
|
|
int MONEY=0; |
|
|
|
|
int ENEMY_MONEY_SUM=0; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
[Choice1,Choice2,Choice3] |
|
|
|
@ -387,6 +390,10 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
GAME_STATE=GameState::GAME_WORLD; |
|
|
|
|
CLOSE_OVERWORLD_WINDOW=false; |
|
|
|
|
} |
|
|
|
|
if (INTERACTING_WITH!=nullptr) { |
|
|
|
|
INTERACTING_WITH->DialogClosed(); |
|
|
|
|
INTERACTING_WITH=nullptr; |
|
|
|
|
} |
|
|
|
|
if (HEALING_OVERWORLD_MEMBERS) { |
|
|
|
|
if (HEALING_OVERWORLD_MEMBER==0||HEALING_OVERWORLD_MEMBER==2) { |
|
|
|
|
DisplayMessageBox(""); |
|
|
|
@ -871,7 +878,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
//DisplayMessageBox("Not implemented yet.");
|
|
|
|
|
BATTLE_STATE=BattleState::MOVE_SELECT; |
|
|
|
|
SELECTED_MOVE_SQUARE={0,0}; |
|
|
|
|
PopulateMovementGrid(PARTY_MEMBER_STATS[PARTY_MEMBER_ID[-CURRENT_TURN-1]]->obj->GetPosWithOrigin(),CalculateSpeedGridMovementAmount(PARTY_MEMBER_STATS[PARTY_MEMBER_ID[-CURRENT_TURN-1]]->speed)); |
|
|
|
|
PopulateMovementGrid(PARTY_MEMBER_STATS[PARTY_MEMBER_ID[-CURRENT_TURN-1]]->obj->GetPosWithOrigin(),CalculateSpeedGridMovementAmount(PARTY_MEMBER_STATS[PARTY_MEMBER_ID[-CURRENT_TURN-1]]->stats.speed)); |
|
|
|
|
}break; |
|
|
|
|
case 5:{ //Run selected.
|
|
|
|
|
DisplayMessageBox("Not implemented yet."); |
|
|
|
@ -1496,23 +1503,23 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
target->AddPP(item->stats.ppRecovery); |
|
|
|
|
}break; |
|
|
|
|
case ItemAction::ATKINCREASE:{ |
|
|
|
|
target->baseAtk+=item->stats.atkIncrease; |
|
|
|
|
target->stats.baseAtk+=item->stats.atkIncrease; |
|
|
|
|
target->boosts[boost::ATK]+=item->stats.atkIncrease; |
|
|
|
|
}break; |
|
|
|
|
case ItemAction::HPINCREASE:{ |
|
|
|
|
target->maxHP+=item->stats.hpIncrease; |
|
|
|
|
target->stats.maxHP+=item->stats.hpIncrease; |
|
|
|
|
target->AddHP(item->stats.hpIncrease); |
|
|
|
|
vi2d box = {(128-32*PARTY_MEMBER_COUNT)+OVERWORLD_TARGET_SELECTION*64+29,170}; |
|
|
|
|
DAMAGE_NUMBERS.push_back(new DamageNumber(-item->stats.hpIncrease,box+cameraPos)); |
|
|
|
|
target->boosts[boost::HP]+=item->stats.hpIncrease; |
|
|
|
|
}break; |
|
|
|
|
case ItemAction::PPINCREASE:{ |
|
|
|
|
target->maxPP+=item->stats.ppIncrease; |
|
|
|
|
target->stats.maxPP+=item->stats.ppIncrease; |
|
|
|
|
target->AddPP(item->stats.ppIncrease); |
|
|
|
|
target->boosts[boost::PP]+=item->stats.ppIncrease; |
|
|
|
|
}break; |
|
|
|
|
case ItemAction::SPDINCREASE:{ |
|
|
|
|
target->speed+=item->stats.spdIncrease; |
|
|
|
|
target->stats.speed+=item->stats.spdIncrease; |
|
|
|
|
target->boosts[boost::SPD]+=item->stats.spdIncrease; |
|
|
|
|
}break; |
|
|
|
|
case ItemAction::LEARNMOVE:{ |
|
|
|
@ -1916,7 +1923,8 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
case GameState::OVERWORLD_EQUIP_MENU: |
|
|
|
|
case GameState::OVERWORLD_EQUIP_PLAYER_MENU: |
|
|
|
|
case GameState::OVERWORLD_STATUS_MENU: |
|
|
|
|
case GameState::OVERWORLD_TARGET_MENU:{ |
|
|
|
|
case GameState::OVERWORLD_TARGET_MENU: |
|
|
|
|
case GameState::SHOPKEEPER_MENU:{ |
|
|
|
|
DrawGameWorld(); |
|
|
|
|
if (GAME_STATE!=GameState::GAME_WORLD&&GAME_STATE!=GameState::OVERWORLD_TARGET_MENU) { |
|
|
|
|
SetDrawTarget(layer::INTERFACE); |
|
|
|
@ -2034,17 +2042,17 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
DrawStringPropDecal({(float)(WIDTH-8-GetTextSizeProp(displayStr2).x),(float)drawPos.y},displayStr2); |
|
|
|
|
drawPos.y+=12; |
|
|
|
|
displayStr1 = "HP: "; |
|
|
|
|
displayStr2 = std::to_string(member->maxHP); |
|
|
|
|
displayStr2 = std::to_string(member->stats.maxHP); |
|
|
|
|
DrawStringPropDecal({(float)(drawPos.x-GetTextSizeProp(displayStr1).x),(float)drawPos.y},displayStr1); |
|
|
|
|
DrawStringPropDecal({(float)(WIDTH-8-GetTextSizeProp(displayStr2).x),(float)drawPos.y},displayStr2); |
|
|
|
|
drawPos.y+=12; |
|
|
|
|
displayStr1 = "PP: "; |
|
|
|
|
displayStr2 = std::to_string(member->maxPP); |
|
|
|
|
displayStr2 = std::to_string(member->stats.maxPP); |
|
|
|
|
DrawStringPropDecal({(float)(drawPos.x-GetTextSizeProp(displayStr1).x),(float)drawPos.y},displayStr1); |
|
|
|
|
DrawStringPropDecal({(float)(WIDTH-8-GetTextSizeProp(displayStr2).x),(float)drawPos.y},displayStr2); |
|
|
|
|
drawPos.y+=12; |
|
|
|
|
displayStr1 = "SPD: "; |
|
|
|
|
displayStr2 = std::to_string(member->speed); |
|
|
|
|
displayStr2 = std::to_string(member->stats.speed); |
|
|
|
|
DrawStringPropDecal({(float)(drawPos.x-GetTextSizeProp(displayStr1).x),(float)drawPos.y},displayStr1); |
|
|
|
|
DrawStringPropDecal({(float)(WIDTH-8-GetTextSizeProp(displayStr2).x),(float)drawPos.y},displayStr2); |
|
|
|
|
} |
|
|
|
@ -2195,7 +2203,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
int newAttack=0; |
|
|
|
|
int newDefense=0; |
|
|
|
|
CalculateChangeInEquipmentStats(i,ITEM_SELECTION_CURSOR,equipAttack,equipDefense,newAttack,newDefense); |
|
|
|
|
DrawStringPropDecal({(float)4+WIDTH*(1.0F/8),(float)(HEIGHT/2+4+12+i*10)},std::to_string(PARTY_MEMBER_STATS[PARTY_MEMBER_ID[i]]->baseAtk+newAttack),(newAttack>equipAttack)?GREEN:(newAttack<equipAttack)?RED:WHITE,{0.5,1}); |
|
|
|
|
DrawStringPropDecal({(float)4+WIDTH*(1.0F/8),(float)(HEIGHT/2+4+12+i*10)},std::to_string(PARTY_MEMBER_STATS[PARTY_MEMBER_ID[i]]->stats.baseAtk+newAttack),(newAttack>equipAttack)?GREEN:(newAttack<equipAttack)?RED:WHITE,{0.5,1}); |
|
|
|
|
DrawStringPropDecal({(float)4+WIDTH*(1.0F/4),(float)(HEIGHT/2+4+12+i*10)},std::to_string(newDefense),(newDefense>equipDefense)?GREEN:(newDefense<equipDefense)?RED:WHITE,{0.5,1}); |
|
|
|
|
if (newAttack!=equipAttack) {DrawRotatedDecal({(float)4+WIDTH*(1.0F/4)-14,(float)(HEIGHT/2+4+12+i*10+2+((newAttack<equipAttack)?4:0))},SPRITES["cursor.png"],newAttack>equipAttack?-M_PI_2:M_PI_2,{4,4},{0.5,0.5},newAttack>equipAttack?GREEN:RED);} |
|
|
|
|
if (newDefense!=equipDefense) {DrawRotatedDecal({(float)4+WIDTH*(3.0F/8)-14,(float)(HEIGHT/2+4+12+i*10+2+((newDefense<equipDefense)?4:0))},SPRITES["cursor.png"],newDefense>equipDefense?-M_PI_2:M_PI_2,{4,4},{0.5,0.5},newDefense>equipDefense?GREEN:RED);} |
|
|
|
@ -2655,7 +2663,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
|
|
|
|
|
void SetupPartyMemberStats() { |
|
|
|
|
for (int i=0;i<7;i++) { |
|
|
|
|
PARTY_MEMBER_STATS[i]=new Entity(120,120,30,30,8,{0,0,0,0},8,{MOVELIST[BattleMoveName::TESTMOVE1]}); |
|
|
|
|
PARTY_MEMBER_STATS[i]=new Entity({HP:120,maxHP:120,PP:30,maxPP:30,baseAtk:8,speed:8,resistances:{0,0,0,0}},{MOVELIST[BattleMoveName::TESTMOVE1]}); |
|
|
|
|
} |
|
|
|
|
PARTY_MEMBER_STATS[PLAYER]->statusEffects[Property::MUSHROOMIZED]=4; |
|
|
|
|
PARTY_MEMBER_STATS[PLAYER]->moveSet={ |
|
|
|
@ -2944,32 +2952,38 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
std::vector<Entity*>{ |
|
|
|
|
new Entity(new Standard_Obj( |
|
|
|
|
NPC1_4,"Test Obj",3,2,ANIMATIONS["player.png"]), |
|
|
|
|
ㅎ 70,ㅎ 70,ㅍ 10,ㅍ 10,아 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{ |
|
|
|
|
{HP:70,maxHP:70,PP:10,maxPP:10,baseAtk:14,speed:5,resistances:{0,0,0,0}},std::vector<Battle::Move*>{ |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE1], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE2], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE3], |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
{}, |
|
|
|
|
돈 0), |
|
|
|
|
new Entity(new Standard_Obj( |
|
|
|
|
NPC1_4,"Test Obj 2",1,3,ANIMATIONS["player.png"]), |
|
|
|
|
ㅎ 70,ㅎ 70,ㅍ 10,ㅍ 10,아 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{ |
|
|
|
|
{HP:70,maxHP:70,PP:10,maxPP:10,baseAtk:14,speed:5,resistances:{0,0,0,0}},std::vector<Battle::Move*>{ |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE1], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE2], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE3], |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
{}, |
|
|
|
|
돈 0), |
|
|
|
|
new Entity(new Standard_Obj( |
|
|
|
|
NPC1_4,"Test Obj 3",2,2,ANIMATIONS["player.png"]), |
|
|
|
|
ㅎ 70,ㅎ 70,ㅍ 10,ㅍ 10,아 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{ |
|
|
|
|
{HP:70,maxHP:70,PP:10,maxPP:10,baseAtk:14,speed:5,resistances:{0,0,0,0}},std::vector<Battle::Move*>{ |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE1], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE2], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE3], |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
{}, |
|
|
|
|
돈 0), |
|
|
|
|
}));//ENCOUNTER_1
|
|
|
|
|
ENCOUNTER_LIST.push_back(new Encounter(encounter::ENCOUNTER_2,{0,0},std::array<vd2d,4>{vd2d |
|
|
|
|
{grid(1,1)},{grid(2,2)},{grid(3,2)},{grid(4,2)}}, |
|
|
|
|
std::vector<Entity*>{ |
|
|
|
|
new Entity(new Standard_Obj( |
|
|
|
|
NPC1_4,"Test Obj",1,4,ANIMATIONS["player.png"],{2,2},GREEN,20), |
|
|
|
|
ㅎ 70,ㅎ 70,ㅍ 10,ㅍ 10,아 14,std::array<int,4>{0,0,0,0},5,std::vector<Battle::Move*>{ |
|
|
|
|
{HP:70,maxHP:70,PP:10,maxPP:10,baseAtk:14,speed:5,resistances:{0,0,0,0}},std::vector<Battle::Move*>{ |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE1], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE2], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE3], |
|
|
|
@ -2978,10 +2992,11 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
ITEMLIST[ItemName::EGG], |
|
|
|
|
ITEMLIST[ItemName::PIZZA], |
|
|
|
|
ITEMLIST[ItemName::MIRACLE_FOOD_LUNCH], |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
돈 35), |
|
|
|
|
new Entity(new Standard_Obj( |
|
|
|
|
NPC1_4,"Test Obj 2",1,2,ANIMATIONS["player.png"],{2,2},GREEN,20), |
|
|
|
|
ㅎ 70,ㅎ 70,ㅍ 10,ㅍ 10,아 14,std::array<int,4>{0,0,0,0},5,std::vector<Battle::Move*>{ |
|
|
|
|
{HP:70,maxHP:70,PP:10,maxPP:10,baseAtk:14,speed:5,resistances:{0,0,0,0}},std::vector<Battle::Move*>{ |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE1], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE2], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE3], |
|
|
|
@ -2990,10 +3005,11 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
ITEMLIST[ItemName::EGG], |
|
|
|
|
ITEMLIST[ItemName::PIZZA], |
|
|
|
|
ITEMLIST[ItemName::MIRACLE_FOOD_LUNCH], |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
돈 35), |
|
|
|
|
new Entity(new Standard_Obj( |
|
|
|
|
NPC1_4,"Test Obj 3",2,1,ANIMATIONS["player.png"],{2,2},GREEN,20), |
|
|
|
|
ㅎ 70,ㅎ 70,ㅍ 10,ㅍ 10,아 14,std::array<int,4>{0,0,0,0},5,std::vector<Battle::Move*>{ |
|
|
|
|
{HP:70,maxHP:70,PP:10,maxPP:10,baseAtk:14,speed:5,resistances:{0,0,0,0}},std::vector<Battle::Move*>{ |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE1], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE2], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE3], |
|
|
|
@ -3002,43 +3018,52 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
ITEMLIST[ItemName::EGG], |
|
|
|
|
ITEMLIST[ItemName::PIZZA], |
|
|
|
|
ITEMLIST[ItemName::MIRACLE_FOOD_LUNCH], |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
돈 35), |
|
|
|
|
}));//ENCOUNTER_2
|
|
|
|
|
ENCOUNTER_LIST.push_back(new Encounter(encounter::ENCOUNTER_3,{0,0},std::array<vd2d,4>{vd2d |
|
|
|
|
{grid(1,1)},{grid(2,2)},{grid(3,2)},{grid(4,2)}}, |
|
|
|
|
std::vector<Entity*>{ |
|
|
|
|
new Entity(new Standard_Obj( |
|
|
|
|
NPC1_4,"Test Obj",1,2,ANIMATIONS["player.png"],{1,1},MAGENTA), |
|
|
|
|
ㅎ 70,ㅎ 70,ㅍ 10,ㅍ 10,아 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{ |
|
|
|
|
{HP:70,maxHP:70,PP:10,maxPP:10,baseAtk:14,speed:5,resistances:{0,0,0,0}},std::vector<Battle::Move*>{ |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE1], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE2], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE3], |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
{}, |
|
|
|
|
돈 0), |
|
|
|
|
}));//ENCOUNTER_3
|
|
|
|
|
ENCOUNTER_LIST.push_back(new Encounter(encounter::ENCOUNTER_4,{0,0},std::array<vd2d,4>{vd2d |
|
|
|
|
{grid(1,2)},{grid(2,2)},{grid(3,2)},{grid(4,2)}}, |
|
|
|
|
std::vector<Entity*>{ |
|
|
|
|
new Entity(new Standard_Obj( |
|
|
|
|
NPC1_4,"Test Obj",6,2,ANIMATIONS["player.png"],{1,1},MAGENTA), |
|
|
|
|
ㅎ 70,ㅎ 70,ㅍ 10,ㅍ 10,아 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{ |
|
|
|
|
{HP:70,maxHP:70,PP:10,maxPP:10,baseAtk:14,speed:5,resistances:{0,0,0,0}},std::vector<Battle::Move*>{ |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE1], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE2], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE3], |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
{}, |
|
|
|
|
돈 0), |
|
|
|
|
new Entity(new Standard_Obj( |
|
|
|
|
NPC1_4,"Test Obj",7,2,ANIMATIONS["player.png"],{1,1},MAGENTA), |
|
|
|
|
ㅎ 70,ㅎ 70,ㅍ 10,ㅍ 10,아 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{ |
|
|
|
|
{HP:70,maxHP:70,PP:10,maxPP:10,baseAtk:14,speed:5,resistances:{0,0,0,0}},std::vector<Battle::Move*>{ |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE1], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE2], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE3], |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
{}, |
|
|
|
|
돈 0), |
|
|
|
|
new Entity(new Standard_Obj( |
|
|
|
|
NPC1_4,"Test Obj",3,5,ANIMATIONS["player.png"],{1,1},MAGENTA), |
|
|
|
|
ㅎ 70,ㅎ 70,ㅍ 10,ㅍ 10,아 14,std::array<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{ |
|
|
|
|
{HP:70,maxHP:70,PP:10,maxPP:10,baseAtk:14,speed:5,resistances:{0,0,0,0}},std::vector<Battle::Move*>{ |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE1], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE2], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE3], |
|
|
|
|
}), |
|
|
|
|
}, |
|
|
|
|
{}, |
|
|
|
|
돈 0), |
|
|
|
|
}));//ENCOUNTER_4
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3281,7 +3306,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
for (int i=0;i<ENCOUNTER_LIST[id]->objs.size();i++) { |
|
|
|
|
Entity*ent=ENCOUNTER_LIST[id]->objs[i]; |
|
|
|
|
Object*newObj=new Standard_Obj(ent->obj->id,ent->obj->name,ent->obj->GetPos(),ent->obj->spr,ent->obj->GetScale(),ent->obj->color,ent->obj->animationSpd,ent->obj->temp); |
|
|
|
|
ents.push_back(new Entity(newObj,ent->GetHP(),ent->maxHP,ent->GetPP(),ent->maxPP,ent->baseAtk,ent->resistances,ent->speed,ent->moveSet,ent->inventory,ent->equipment,ent->damageReduction,ent->smart,ent->dumb)); |
|
|
|
|
ents.push_back(new Entity(newObj,{ent->GetHP(),ent->GetPP(),ent->GetTargetHP(),ent->GetTargetPP(),ent->stats.maxHP,ent->stats.maxPP,ent->stats.baseAtk,ent->stats.speed,ent->stats.resistances,ent->stats.damageReduction,ent->stats.smart,ent->stats.dumb},ent->moveSet,ent->inventory,ent->money,ent->equipment)); |
|
|
|
|
} |
|
|
|
|
Encounter*data=new Encounter(id,pos,ENCOUNTER_LIST[id]->playerPos,ents,chance); |
|
|
|
|
data->chance=chance; |
|
|
|
@ -3478,7 +3503,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} else { |
|
|
|
|
PARTY_MEMBER_STATS[PARTY_MEMBER_ID[i]]->atb+=PARTY_MEMBER_STATS[PARTY_MEMBER_ID[i]]->speed; |
|
|
|
|
PARTY_MEMBER_STATS[PARTY_MEMBER_ID[i]]->atb+=PARTY_MEMBER_STATS[PARTY_MEMBER_ID[i]]->stats.speed; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
@ -3535,7 +3560,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} else { |
|
|
|
|
BATTLE_ENCOUNTER->objs[i]->atb+=BATTLE_ENCOUNTER->objs[i]->speed; |
|
|
|
|
BATTLE_ENCOUNTER->objs[i]->atb+=BATTLE_ENCOUNTER->objs[i]->stats.speed; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
@ -3575,21 +3600,21 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
target->AddPP(BATTLE_CUSTOM_ITEM->stats.ppRecovery); |
|
|
|
|
}break; |
|
|
|
|
case ItemAction::ATKINCREASE:{ |
|
|
|
|
target->baseAtk+=BATTLE_CUSTOM_ITEM->stats.atkIncrease; |
|
|
|
|
target->stats.baseAtk+=BATTLE_CUSTOM_ITEM->stats.atkIncrease; |
|
|
|
|
target->boosts[boost::ATK]+=BATTLE_CUSTOM_ITEM->stats.atkIncrease; |
|
|
|
|
}break; |
|
|
|
|
case ItemAction::HPINCREASE:{ |
|
|
|
|
target->maxHP+=BATTLE_CUSTOM_ITEM->stats.hpIncrease; |
|
|
|
|
target->stats.maxHP+=BATTLE_CUSTOM_ITEM->stats.hpIncrease; |
|
|
|
|
target->AddHP(BATTLE_CUSTOM_ITEM->stats.hpIncrease); |
|
|
|
|
target->boosts[boost::HP]+=BATTLE_CUSTOM_ITEM->stats.hpIncrease; |
|
|
|
|
}break; |
|
|
|
|
case ItemAction::PPINCREASE:{ |
|
|
|
|
target->maxPP+=BATTLE_CUSTOM_ITEM->stats.ppIncrease; |
|
|
|
|
target->stats.maxPP+=BATTLE_CUSTOM_ITEM->stats.ppIncrease; |
|
|
|
|
target->AddPP(BATTLE_CUSTOM_ITEM->stats.ppIncrease); |
|
|
|
|
target->boosts[boost::PP]+=BATTLE_CUSTOM_ITEM->stats.ppIncrease; |
|
|
|
|
}break; |
|
|
|
|
case ItemAction::SPDINCREASE:{ |
|
|
|
|
target->speed+=BATTLE_CUSTOM_ITEM->stats.spdIncrease; |
|
|
|
|
target->stats.speed+=BATTLE_CUSTOM_ITEM->stats.spdIncrease; |
|
|
|
|
target->boosts[boost::SPD]+=BATTLE_CUSTOM_ITEM->stats.spdIncrease; |
|
|
|
|
}break; |
|
|
|
|
case ItemAction::LEARNMOVE:{ |
|
|
|
@ -3750,6 +3775,10 @@ 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()); |
|
|
|
|
} |
|
|
|
|
ENEMY_MONEY_SUM=0; |
|
|
|
|
for (int i=0;i<BATTLE_ENCOUNTER->objs.size();i++) { |
|
|
|
|
ENEMY_MONEY_SUM+=BATTLE_ENCOUNTER->objs[i]->money; |
|
|
|
|
} |
|
|
|
|
BATTLE_STATE=BattleState::ENEMY_SPOILS; |
|
|
|
|
BATTLE_ROLLING_COUNTER_WAITTIME=0; |
|
|
|
|
} |
|
|
|
@ -3791,7 +3820,13 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
BATTLE_SPOILS_MESSAGE+=BATTLE_SPOILS_LIST[0]->name+"."; |
|
|
|
|
PARTY_INVENTORY.push_back(BATTLE_SPOILS_LIST[0]); |
|
|
|
|
BATTLE_SPOILS_LIST.erase(BATTLE_SPOILS_LIST.begin()); |
|
|
|
|
} else { |
|
|
|
|
} else
|
|
|
|
|
if (ENEMY_MONEY_SUM>0) { |
|
|
|
|
BATTLE_SPOILS_MESSAGE="You gained $"+std::to_string(ENEMY_MONEY_SUM)+"."; |
|
|
|
|
MONEY+=ENEMY_MONEY_SUM; |
|
|
|
|
ENEMY_MONEY_SUM=0; |
|
|
|
|
} else |
|
|
|
|
{ |
|
|
|
|
BATTLE_STATE=BattleState::MOVE_CAMERA_BACK; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -4212,7 +4247,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
} |
|
|
|
|
int attackerDamage = (attacker->selectedMove->baseDmg+ |
|
|
|
|
((attacker->selectedMove->randomDmg>0)?rand()%attacker->selectedMove->randomDmg:0) |
|
|
|
|
+attacker->baseAtk |
|
|
|
|
+attacker->stats.baseAtk |
|
|
|
|
+equipDamage); |
|
|
|
|
finalDamage += attackerDamage; |
|
|
|
|
|
|
|
|
@ -4491,7 +4526,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
DrawDialogBox({WIDTH-WIDTH/3+WIDTH/6-1,HEIGHT/4+2},{(int)(WIDTH/6),HEIGHT/8},Pixel(70, 33, 105,220),Pixel(62, 54, 69,220),Pixel(185, 148, 255,220)); |
|
|
|
|
DrawStringPropDecal(damageBoxPos+textStartingOffset,"Damage",WHITE,{0.7,0.8}); |
|
|
|
|
if (BATTLE_MOVELIST_DISPLAY.size()>0) { |
|
|
|
|
label = (BATTLE_MOVELIST_DISPLAY[selectioncursor][gradeselectioncursor]->baseDmg!=0)?std::to_string(BATTLE_MOVELIST_DISPLAY[selectioncursor][gradeselectioncursor]->baseDmg+PARTY_MEMBER_STATS[partyMemberSlot]->baseAtk)+"~"+std::to_string(BATTLE_MOVELIST_DISPLAY[selectioncursor][gradeselectioncursor]->randomDmg+BATTLE_MOVELIST_DISPLAY[selectioncursor][gradeselectioncursor]->baseDmg+PARTY_MEMBER_STATS[partyMemberSlot]->baseAtk):"N/A"; |
|
|
|
|
label = (BATTLE_MOVELIST_DISPLAY[selectioncursor][gradeselectioncursor]->baseDmg!=0)?std::to_string(BATTLE_MOVELIST_DISPLAY[selectioncursor][gradeselectioncursor]->baseDmg+PARTY_MEMBER_STATS[partyMemberSlot]->stats.baseAtk)+"~"+std::to_string(BATTLE_MOVELIST_DISPLAY[selectioncursor][gradeselectioncursor]->randomDmg+BATTLE_MOVELIST_DISPLAY[selectioncursor][gradeselectioncursor]->baseDmg+PARTY_MEMBER_STATS[partyMemberSlot]->stats.baseAtk):"N/A"; |
|
|
|
|
DrawStringPropDecal({static_cast<float>(damageBoxPos.x+textStartingOffset.x+(WIDTH/6)-8-GetTextSizeProp(label).x*(std::min((double)((WIDTH/6)-8)/GetTextSizeProp(label).x,1.5))),static_cast<float>(damageBoxPos.y+textStartingOffset.y+8)},label,WHITE,{static_cast<float>(std::min((double)((WIDTH/6)-8)/GetTextSizeProp(label).x,1.5)),1.5}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -4607,8 +4642,8 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
} |
|
|
|
|
Entity*member=PARTY_MEMBER_STATS[PARTY_MEMBER_ID[i]]; |
|
|
|
|
|
|
|
|
|
HandleRollingCounters(i,player_rollhp_counter,player_rollhp_display,member,member->maxHP,member->GetHP(),member->GetTargetHP()); |
|
|
|
|
HandleRollingCounters(i,player_rollpp_counter,player_rollpp_display,member,member->maxPP,member->GetPP(),member->GetTargetPP(),true); |
|
|
|
|
HandleRollingCounters(i,player_rollhp_counter,player_rollhp_display,member,member->stats.maxHP,member->GetHP(),member->GetTargetHP()); |
|
|
|
|
HandleRollingCounters(i,player_rollpp_counter,player_rollpp_display,member,member->stats.maxPP,member->GetPP(),member->GetTargetPP(),true); |
|
|
|
|
|
|
|
|
|
if (player_rollwait_counter[i]==0) { |
|
|
|
|
player_rollwait_counter[i]=BATTLE_ROLLING_COUNTER_WAITTIME*13; |
|
|
|
@ -4693,7 +4728,7 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CalculateEquipmentStats(int partyMemberSlot,int&atk,int&def) { |
|
|
|
|
atk=PARTY_MEMBER_STATS[PARTY_MEMBER_ID[partyMemberSlot]]->baseAtk; |
|
|
|
|
atk=PARTY_MEMBER_STATS[PARTY_MEMBER_ID[partyMemberSlot]]->stats.baseAtk; |
|
|
|
|
def=0; |
|
|
|
|
for (int i=0;i<PARTY_MEMBER_STATS[PARTY_MEMBER_ID[partyMemberSlot]]->equipment.size();i++) { |
|
|
|
|
if (PARTY_MEMBER_STATS[PARTY_MEMBER_ID[partyMemberSlot]]->equipment[i]!=nullptr) { |
|
|
|
|