PP count checking

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent 40242b7067
commit ca941fbbb3
  1. BIN
      C++ProjectTemplate
  2. 13
      main.cpp

Binary file not shown.

@ -780,10 +780,12 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
POWER_GRADE_CURSOR[-CURRENT_TURN-1]=std::clamp(POWER_GRADE_CURSOR[-CURRENT_TURN-1]-1,0,(int)(BATTLE_MOVELIST_DISPLAY[POWER_SELECTION_CURSOR[-CURRENT_TURN-1]].size())-1);
}
if (ACTIONKEYPRESSED) {
if (PARTY_MEMBER_STATS[PARTY_MEMBER_ID[-CURRENT_TURN-1]]->GetPP()>=BATTLE_MOVELIST_DISPLAY[POWER_SELECTION_CURSOR[-CURRENT_TURN-1]][POWER_GRADE_CURSOR[-CURRENT_TURN-1]]->PPCost) {
PARTY_MEMBER_STATS[PARTY_MEMBER_ID[-CURRENT_TURN-1]]->selectedMove=BATTLE_MOVELIST_DISPLAY[POWER_SELECTION_CURSOR[-CURRENT_TURN-1]][POWER_GRADE_CURSOR[-CURRENT_TURN-1]];
SetupTargetSelect();
}
}
}
}break;
case BattleState::TARGET_SELECT:{
if (LeftPressed()) {
@ -1277,8 +1279,8 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
DrawStringPropDecal({12,static_cast<float>(12*counter+8+displayYOffset)},name);
}
for (int i=0;i<moves.size();i++) {
if (BATTLE_STATE==BattleState::GRADE_SELECT&&POWER_SELECTION_CURSOR[-CURRENT_TURN-1]==counter) {
Pixel drawCol;
if (BATTLE_STATE==BattleState::GRADE_SELECT&&POWER_SELECTION_CURSOR[-CURRENT_TURN-1]==counter) {
if (POWER_GRADE_CURSOR[-CURRENT_TURN-1]==i) {
if (PARTY_MEMBER_STATS[PARTY_MEMBER_ID[-CURRENT_TURN-1]]->GetPP()>=moves[i]->PPCost) {
drawCol=WHITE;
@ -1292,11 +1294,16 @@ This is a test message that lets us trigger straight from a cutscene! Cool!)"),
drawCol=DARK_RED;
}
}
DrawFancyStringDecal({static_cast<float>(8+WIDTH/4+12+i*8),static_cast<float>(12*counter+8+displayYOffset)},std::wstring(1,moves[i]->grade),drawCol);
} else {
DrawFancyStringDecal({static_cast<float>(8+WIDTH/4+12+i*8),static_cast<float>(12*counter+8+displayYOffset)},std::wstring(1,moves[i]->grade));
drawCol=WHITE;
if (PARTY_MEMBER_STATS[PARTY_MEMBER_ID[-CURRENT_TURN-1]]->GetPP()>=moves[i]->PPCost) {
drawCol=WHITE;
} else {
drawCol=RED;
}
}
DrawFancyStringDecal({static_cast<float>(8+WIDTH/4+12+i*8),static_cast<float>(12*counter+8+displayYOffset)},std::wstring(1,moves[i]->grade),drawCol);
}
}
++counter;
}

Loading…
Cancel
Save