generated from sigonasr2/CPlusPlusProjectTemplate
Fixed moveset
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
b5dfa1e7de
commit
f6627f8db7
@ -908,6 +908,10 @@ public:
|
|||||||
MOVESET_MEGAMOTH.push_back(HIDE);
|
MOVESET_MEGAMOTH.push_back(HIDE);
|
||||||
MOVESET_MEGAMOTH.push_back(HYPERZAP);
|
MOVESET_MEGAMOTH.push_back(HYPERZAP);
|
||||||
MOVESET_MEGAMOTH.push_back(POLLINATION);
|
MOVESET_MEGAMOTH.push_back(POLLINATION);
|
||||||
|
MOVESET_MEGAMOTH.push_back(GUST);
|
||||||
|
MOVESET_MEGAMOTH.push_back(GUST);
|
||||||
|
MOVESET_MEGAMOTH.push_back(GUST);
|
||||||
|
MOVESET_MEGAMOTH.push_back(GUST);
|
||||||
|
|
||||||
MOVESET_SANDWORM.push_back(SANDSTORM);
|
MOVESET_SANDWORM.push_back(SANDSTORM);
|
||||||
MOVESET_SANDWORM.push_back(HEAT_WAVE);
|
MOVESET_SANDWORM.push_back(HEAT_WAVE);
|
||||||
@ -961,10 +965,10 @@ public:
|
|||||||
ENCOUNTER_SANDWORM_1.playerY=3.5;
|
ENCOUNTER_SANDWORM_1.playerY=3.5;
|
||||||
ENCOUNTER_SANDWORM_1.map=MAP_3;
|
ENCOUNTER_SANDWORM_1.map=MAP_3;
|
||||||
//ENCOUNTERS.push_back(ENCOUNTER_X_X); //Activate at beginning of Chapter 2.
|
//ENCOUNTERS.push_back(ENCOUNTER_X_X); //Activate at beginning of Chapter 2.
|
||||||
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Megamoth",3.5,1.75,745,745,MOVESET_MEGAMOTH,{2,2}));
|
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Megamoth",3.5,1.75,745,745,MOVESET_MEGAMOTH,{2,2},true));
|
||||||
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",2,1,120,120,MOVESET_MOTH));
|
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",2,1,0,120,MOVESET_MOTH));
|
||||||
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",6,1,120,120,MOVESET_MOTH));
|
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",6,1,0,120,MOVESET_MOTH));
|
||||||
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",4,4,120,120,MOVESET_MOTH));
|
ENCOUNTER_MEGAMOTH.entities.push_back(new Entity(MOTH_DECAL,"Moth",4,4,0,120,MOVESET_MOTH));
|
||||||
ENCOUNTER_MEGAMOTH.x=195-4;
|
ENCOUNTER_MEGAMOTH.x=195-4;
|
||||||
ENCOUNTER_MEGAMOTH.y=56-3.5;
|
ENCOUNTER_MEGAMOTH.y=56-3.5;
|
||||||
ENCOUNTER_MEGAMOTH.playerX=4;
|
ENCOUNTER_MEGAMOTH.playerX=4;
|
||||||
@ -2015,6 +2019,21 @@ public:
|
|||||||
case battle::DAMAGE_RESOLUTION:{
|
case battle::DAMAGE_RESOLUTION:{
|
||||||
EFFECT_TIMER++;
|
EFFECT_TIMER++;
|
||||||
if (EFFECT_TIMER>60) {
|
if (EFFECT_TIMER>60) {
|
||||||
|
if (BATTLE_CURRENT_TURN_ENTITY==-1) {
|
||||||
|
BATTLE_DROUGHT_ACTIVE=false;
|
||||||
|
std::cout<<"Drought turned off.\n";
|
||||||
|
} else {
|
||||||
|
if (CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastSlowVal==CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->speed&&
|
||||||
|
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->speed!=0&&rand()%3==0) {
|
||||||
|
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->speed=0;
|
||||||
|
}
|
||||||
|
if (CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastHiddenVal==CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->hidden&&
|
||||||
|
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->hidden&&rand()%3==0) {
|
||||||
|
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->hidden=0;
|
||||||
|
}
|
||||||
|
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastSlowVal=CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->speed;
|
||||||
|
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastHiddenVal=CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->hidden;
|
||||||
|
}
|
||||||
if (turnOrder.empty()) {
|
if (turnOrder.empty()) {
|
||||||
bool allDead=true;
|
bool allDead=true;
|
||||||
for (auto&ent:CURRENT_ENCOUNTER.entities) {
|
for (auto&ent:CURRENT_ENCOUNTER.entities) {
|
||||||
@ -2049,21 +2068,6 @@ public:
|
|||||||
PLAYER_SELECTED_TARGET=-1;
|
PLAYER_SELECTED_TARGET=-1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (BATTLE_CURRENT_TURN_ENTITY==-1) {
|
|
||||||
BATTLE_DROUGHT_ACTIVE=false;
|
|
||||||
std::cout<<"Drought turned off.\n";
|
|
||||||
} else {
|
|
||||||
if (CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastSlowVal==CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->speed&&
|
|
||||||
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->speed!=0&&rand()%3==0) {
|
|
||||||
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->speed=0;
|
|
||||||
}
|
|
||||||
if (CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastHiddenVal==CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->hidden&&
|
|
||||||
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->hidden&&rand()%3==0) {
|
|
||||||
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->hidden=0;
|
|
||||||
}
|
|
||||||
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastSlowVal=CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->speed;
|
|
||||||
CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->lastHiddenVal=CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->hidden;
|
|
||||||
}
|
|
||||||
BATTLE_CURRENT_TURN_ENTITY=turnOrder.front();
|
BATTLE_CURRENT_TURN_ENTITY=turnOrder.front();
|
||||||
turnOrder.pop();
|
turnOrder.pop();
|
||||||
if (BATTLE_CURRENT_TURN_ENTITY==-1) {
|
if (BATTLE_CURRENT_TURN_ENTITY==-1) {
|
||||||
@ -2905,6 +2909,9 @@ public:
|
|||||||
delete OBJECTS[i];
|
delete OBJECTS[i];
|
||||||
}
|
}
|
||||||
OBJECTS.clear();
|
OBJECTS.clear();
|
||||||
|
for (int i=0;i<8;i++) {
|
||||||
|
CUTSCENE_OBJS[i]=nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
int y=0;
|
int y=0;
|
||||||
if (f.is_open()) {
|
if (f.is_open()) {
|
||||||
@ -3111,7 +3118,7 @@ public:
|
|||||||
foodCount--;
|
foodCount--;
|
||||||
}
|
}
|
||||||
PLAYER_HP=std::clamp(PLAYER_HP-finalDamage,0,PLAYER_MAXHP);
|
PLAYER_HP=std::clamp(PLAYER_HP-finalDamage,0,PLAYER_MAXHP);
|
||||||
CreateDisplayNumber(finalDamage,PLAYER_COORDS[0],PLAYER_COORDS[1],frameCount);
|
CreateDisplayNumber(finalDamage,CURRENT_ENCOUNTER.x+CURRENT_ENCOUNTER.playerX,CURRENT_ENCOUNTER.y+CURRENT_ENCOUNTER.playerY,frameCount);
|
||||||
} else {
|
} else {
|
||||||
for (int i=0;i<CURRENT_ENCOUNTER.entities.size();i++) {
|
for (int i=0;i<CURRENT_ENCOUNTER.entities.size();i++) {
|
||||||
finalDamage=power->damage+rand()%power->damageRoll*sign(power->damage);
|
finalDamage=power->damage+rand()%power->damageRoll*sign(power->damage);
|
||||||
@ -3139,7 +3146,7 @@ public:
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PLAYER_HP=std::clamp(PLAYER_HP-finalDamage,0,PLAYER_MAXHP);
|
PLAYER_HP=std::clamp(PLAYER_HP-finalDamage,0,PLAYER_MAXHP);
|
||||||
CreateDisplayNumber(finalDamage,PLAYER_COORDS[0],PLAYER_COORDS[1],frameCount);
|
CreateDisplayNumber(finalDamage,CURRENT_ENCOUNTER.x+CURRENT_ENCOUNTER.playerX,CURRENT_ENCOUNTER.y+CURRENT_ENCOUNTER.playerY,frameCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3348,12 +3355,12 @@ public:
|
|||||||
for (int i=0;i<8;i++) {
|
for (int i=0;i<8;i++) {
|
||||||
for (int j=0;j<OBJECTS.size();j++) {
|
for (int j=0;j<OBJECTS.size();j++) {
|
||||||
if (OBJECTS[j]==CUTSCENE_OBJS[i]) {
|
if (OBJECTS[j]==CUTSCENE_OBJS[i]) {
|
||||||
if (CUTSCENE_OBJS[i]->tempObj) {
|
if (CUTSCENE_OBJS[i]!=nullptr&&CUTSCENE_OBJS[i]->tempObj) {
|
||||||
OBJECTS.erase(OBJECTS.begin()+j--);
|
OBJECTS.erase(OBJECTS.begin()+j--);
|
||||||
|
delete CUTSCENE_OBJS[i];
|
||||||
std::cout<<"Erased at position "<<j<<".\n";
|
std::cout<<"Erased at position "<<j<<".\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
delete CUTSCENE_OBJS[i];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user