|
|
|
@ -167,11 +167,21 @@ class Object{ |
|
|
|
|
Move(move); |
|
|
|
|
return true; |
|
|
|
|
} else |
|
|
|
|
if (move.x!=0&&!Collision({originPos.x+move.x,originPos.y})) { |
|
|
|
|
Move({move.x,0}); |
|
|
|
|
return true; |
|
|
|
|
} else |
|
|
|
|
if (move.y!=0&&!Collision({originPos.x,originPos.y+move.y})) { |
|
|
|
|
Move({0,move.y}); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
if (move.x>0) { |
|
|
|
|
for (int i=0;i<wiggleRoom;i++) { //Search Up.
|
|
|
|
|
if (!Collision({originPos.x+move.x,originPos.y-i})) { |
|
|
|
|
//There is potentially to move up-right here, so we will do so.
|
|
|
|
|
Move({0,-1}); |
|
|
|
|
originPos.y+=-1; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -198,7 +208,7 @@ class Object{ |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else
|
|
|
|
|
} |
|
|
|
|
if (move.y>0) { |
|
|
|
|
for (int i=0;i<wiggleRoom;i++) { //Search Left.
|
|
|
|
|
if (!Collision({originPos.x-i,originPos.y+move.y})) { |
|
|
|
@ -902,27 +912,22 @@ goes on a very long time, I hope you can understand this is only for testing pur |
|
|
|
|
case GameState::GAME_WORLD:{ |
|
|
|
|
if (PlayerCanMove()) { |
|
|
|
|
bool moved=false; |
|
|
|
|
vd2d movementComponents = {0,0}; |
|
|
|
|
if (UpHeld()) { |
|
|
|
|
if (PARTY_MEMBER_OBJ[0]->SmoothMove({0,-1})) { |
|
|
|
|
UpdatePlayerTrail({0,-1}); |
|
|
|
|
moved=true; |
|
|
|
|
} |
|
|
|
|
movementComponents.y-=1; |
|
|
|
|
} |
|
|
|
|
if (DownHeld()) { |
|
|
|
|
if (PARTY_MEMBER_OBJ[0]->SmoothMove({0,1})) { |
|
|
|
|
UpdatePlayerTrail({0,1}); |
|
|
|
|
moved=true; |
|
|
|
|
} |
|
|
|
|
movementComponents.y+=1; |
|
|
|
|
} |
|
|
|
|
if (LeftHeld()) { |
|
|
|
|
if (PARTY_MEMBER_OBJ[0]->SmoothMove({-1,0})) { |
|
|
|
|
UpdatePlayerTrail({-1,0}); |
|
|
|
|
moved=true; |
|
|
|
|
} |
|
|
|
|
movementComponents.x-=1; |
|
|
|
|
} |
|
|
|
|
if (RightHeld()) { |
|
|
|
|
if (PARTY_MEMBER_OBJ[0]->SmoothMove({1,0})) { |
|
|
|
|
UpdatePlayerTrail({1,0}); |
|
|
|
|
movementComponents.x+=1; |
|
|
|
|
} |
|
|
|
|
if (movementComponents.mag()>0) { |
|
|
|
|
if (PARTY_MEMBER_OBJ[0]->SmoothMove(movementComponents)) { |
|
|
|
|
UpdatePlayerTrail(movementComponents); |
|
|
|
|
moved=true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1487,7 +1492,7 @@ goes on a very long time, I hope you can understand this is only for testing pur |
|
|
|
|
if (POWER_GRADE_CURSOR[-CURRENT_TURN-1]==i) {
|
|
|
|
|
DrawFancyStringDecal({8+WIDTH/4+4+i*8,12*counter+8+displayYOffset},std::wstring(1,moves[i]->grade)); |
|
|
|
|
} else { |
|
|
|
|
DrawFancyStringDecal({8+WIDTH/4+4+i*8,12*counter+8+displayYOffset},std::wstring(1,moves[i]->grade),VERY_DARK_GREY); |
|
|
|
|
DrawFancyStringDecal({8+WIDTH/4+4+i*8,12*counter+8+displayYOffset},std::wstring(1,moves[i]->grade),DARK_GREY); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
DrawFancyStringDecal({8+WIDTH/4+4+i*8,12*counter+8+displayYOffset},std::wstring(1,moves[i]->grade)); |
|
|
|
@ -1863,7 +1868,6 @@ goes on a very long time, I hope you can understand this is only for testing pur |
|
|
|
|
void SetupPartyMemberStats() { |
|
|
|
|
for (int i=0;i<7;i++) { |
|
|
|
|
PARTY_MEMBER_STATS[i]=new Entity(120,120,30,30,8,{0,0,0,0},4,{MOVELIST[BattleMoveName::TESTMOVE1]}); |
|
|
|
|
printf("HP:%d Max HP:%d",PARTY_MEMBER_STATS[i]->HP,PARTY_MEMBER_STATS[i]->maxHP); |
|
|
|
|
} |
|
|
|
|
PARTY_MEMBER_STATS[PLAYER]->moveSet={ |
|
|
|
|
MOVELIST[BattleMoveName::HAILSTORM_A], |
|
|
|
|