Display cast times

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent d706dbe3f2
commit 4a9877c534
  1. BIN
      C++ProjectTemplate
  2. 11
      main.cpp

Binary file not shown.

@ -349,6 +349,8 @@ class Entity{
Object* obj;
std::vector<Battle::Move*> moveSet;
int selectedTarget = 0;
int selectedMove = -1; //The index of the selected move.
int channelTimeRemaining = 0; //The amount of channel time left until move can be performed.
//Used for initializing players.
Entity(int HP,int maxHP,int PP,int maxPP,int baseAtk,std::array<int,4>resistances,int speed,std::vector<Battle::Move*>moveSet,int damageReduction=0,bool smart=false,bool dumb=false)
:Entity(nullptr,HP,maxHP,PP,maxPP,baseAtk,resistances,speed,moveSet,damageReduction,smart,dumb){}
@ -1604,6 +1606,12 @@ goes on a very long time, I hope you can understand this is only for testing pur
label = std::to_string(BATTLE_MOVELIST_DISPLAY[POWER_SELECTION_CURSOR[-CURRENT_TURN-1]][POWER_GRADE_CURSOR[-CURRENT_TURN-1]]->range);
DrawStringPropDecal({rangeBoxPos.x+textStartingOffset.x+(WIDTH/6)-8-GetTextSizeProp(label).x*(std::min((double)((WIDTH/6)-8)/GetTextSizeProp(label).x,1.5)),rangeBoxPos.y+textStartingOffset.y+8},label,WHITE,{std::min((double)((WIDTH/6)-8)/GetTextSizeProp(label).x,1.5),1.5});
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));
vd2d channelTimeBoxPos = {WIDTH-WIDTH/3-1,HEIGHT/4+HEIGHT/8+3};
DrawStringPropDecal(channelTimeBoxPos+textStartingOffset,"Cast",WHITE,{0.7,0.8});
label = std::to_string((float)BATTLE_MOVELIST_DISPLAY[POWER_SELECTION_CURSOR[-CURRENT_TURN-1]][POWER_GRADE_CURSOR[-CURRENT_TURN-1]]->channelTime/60).erase(3);
DrawStringPropDecal({channelTimeBoxPos.x+textStartingOffset.x+(WIDTH/6)-8-GetTextSizeProp(label).x*(std::min((double)((WIDTH/6)-8)/GetTextSizeProp(label).x,1.5)),channelTimeBoxPos.y+textStartingOffset.y+8},label,WHITE,{std::min((double)((WIDTH/6)-8)/GetTextSizeProp(label).x,1.5),1.5});
DrawDialogBox({WIDTH-WIDTH/3-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 displayLimit=0;
for (int i=0;i<BATTLE_MOVELIST_DISPLAY.size();i++) {
@ -2059,7 +2067,7 @@ goes on a very long time, I hope you can understand this is only for testing pur
MOVELIST[BattleMoveName::METEORRAIN_B]=new Battle::Move("Meteor Rain","Causes fiery rocks to fall from the skies. Chance to burn trees.",BETA,110,30, 22,6,0,false,{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,200,50, 47,6,0,false,{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,390,60, 98,6,0,false,{0,0,20,0});
MOVELIST[BattleMoveName::PKFREEZE_A]=new Battle::Move("PK Freeze","A powerful chilling attack causing frostbite and slow.",ALPHA,80,10, 4,1,0,false,{0,0,20,0});
MOVELIST[BattleMoveName::PKFREEZE_A]=new Battle::Move("PK Freeze","A powerful chilling attack causing frostbite and slow.",ALPHA,80,10, 4,1,0,false,{0,0,20,10});
MOVELIST[BattleMoveName::PKFREEZE_B]=new Battle::Move("PK Freeze","A powerful chilling attack causing frostbite and slow.",BETA,120,20, 8,1,0,false,{0,0,20,0});
MOVELIST[BattleMoveName::PKFREEZE_G]=new Battle::Move("PK Freeze","A powerful chilling attack causing frostbite and slow.",GAMMA,240,40, 12,1,0,false,{0,0,20,0});
MOVELIST[BattleMoveName::PKFREEZE_O]=new Battle::Move("PK Freeze","A powerful chilling attack causing frostbite and slow.",OMEGA,480,50, 22,1,0,false,{0,0,20,0});
@ -2672,6 +2680,7 @@ goes on a very long time, I hope you can understand this is only for testing pur
int main()
{
std::vector<std::string> list = {"Item1","Item2"};
SeasonI demo;
if (demo.Construct(WIDTH, HEIGHT, 4, 4,false,false,true))
demo.Start();

Loading…
Cancel
Save