diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 7756f27..c54d72c 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/main.cpp b/main.cpp index 6ef65a4..19a8794 100644 --- a/main.cpp +++ b/main.cpp @@ -745,16 +745,16 @@ goes on a very long time, I hope you can understand this is only for testing pur bool moved=false; vd2d movementComponents = {0,0}; if (UpHeld()) { - movementComponents.y-=NAN; + movementComponents.y-=1; } if (DownHeld()) { - movementComponents.y+=NAN; + movementComponents.y+=1; } if (LeftHeld()) { - movementComponents.x-=NAN; + movementComponents.x-=1; } if (RightHeld()) { - movementComponents.x+=NAN; + movementComponents.x+=1; } if (movementComponents.mag()>0) { if (PARTY_MEMBER_OBJ[0]->SmoothMove(movementComponents)) { @@ -1560,6 +1560,13 @@ goes on a very long time, I hope you can understand this is only for testing pur } } cameraPos+=screenShakeOffset; + + std::vector attackedAllies; + + if (CURRENT_TURN>=0&&BATTLE_STATE==BattleState::WAIT_ANIMATION&&BATTLE_ENCOUNTER->objs[CURRENT_TURN]->selectedTarget<0) { + attackedAllies=GetEntitiesInRange(BATTLE_ENCOUNTER->objs[CURRENT_TURN]->selectedTarget,BATTLE_ENCOUNTER->objs[CURRENT_TURN]->channelPos,BATTLE_ENCOUNTER->objs[CURRENT_TURN]->selectedMove); + } + for (int i=0;i=0&&BATTLE_STATE==BattleState::WAIT_ANIMATION&&BATTLE_ENCOUNTER->objs[CURRENT_TURN]->selectedTarget==-i-1) { + bool underAttack=false; + for (int j=0;jobj==PARTY_MEMBER_OBJ[i]) { + underAttack=true; + break; + } + } + if (CURRENT_TURN>=0&&BATTLE_STATE==BattleState::WAIT_ANIMATION&&underAttack) { drawCheckerboardBox(box,{59,59},Pixel(180,159,194),Pixel(200,179,214),{6,6},RED,DARK_RED); } else { drawCheckerboardBox(box,{59,59},Pixel(180,159,194),Pixel(200,179,214),{6,6}); @@ -2035,7 +2049,7 @@ goes on a very long time, I hope you can understand this is only for testing pur void SetupMoveList() { 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","An attack",40,10,ㅍ 0,1,0,false,{0,0,0,0}); - MOVELIST[BattleMoveName::TESTMOVE3]=new Battle::Move("Test Move 3","An attack",25,5,ㅍ 0,1,0,false,{0,0,20,0}); + MOVELIST[BattleMoveName::TESTMOVE3]=new Battle::Move("Test Move 3","An attack",25,5,ㅍ 0,3,0,false,{0,0,20,0}); MOVELIST[BattleMoveName::BASH]=new Battle::Move("Bash","Regular attack.",5,5,ㅍ 0,1,0,false,{0,0,0,0}); MOVELIST[BattleMoveName::HAILSTORM_A]=new Battle::Move("Hailstorm","Causes heavy ice rocks to crash",ALPHA,40,20,ㅍ 4,4,0,false,{0,0,20,0}); MOVELIST[BattleMoveName::HAILSTORM_B]=new Battle::Move("Hailstorm","Causes heavy ice rocks to crash",BETA,80,20,ㅍ 12,4,0,false,{0,0,20,0});