generated from sigonasr2/CPlusPlusProjectTemplate
Display cast times
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
d706dbe3f2
commit
4a9877c534
Binary file not shown.
11
main.cpp
11
main.cpp
@ -349,6 +349,8 @@ class Entity{
|
|||||||
Object* obj;
|
Object* obj;
|
||||||
std::vector<Battle::Move*> moveSet;
|
std::vector<Battle::Move*> moveSet;
|
||||||
int selectedTarget = 0;
|
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.
|
//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(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){}
|
: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);
|
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});
|
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));
|
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 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++) {
|
||||||
@ -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_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_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::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_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_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});
|
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()
|
int main()
|
||||||
{
|
{
|
||||||
|
std::vector<std::string> list = {"Item1","Item2"};
|
||||||
SeasonI demo;
|
SeasonI demo;
|
||||||
if (demo.Construct(WIDTH, HEIGHT, 4, 4,false,false,true))
|
if (demo.Construct(WIDTH, HEIGHT, 4, 4,false,false,true))
|
||||||
demo.Start();
|
demo.Start();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user