Implement all sounds

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent bfc5015c03
commit 1816449d4d
  1. 106
      SeasonsOfLoneliness.cpp
  2. BIN
      Seasons_of_Loneliness

@ -367,7 +367,9 @@ class WEATHER_POWER{
bool appliesRadioactive=false; //Radioactive removes all trees and seeds. bool appliesRadioactive=false; //Radioactive removes all trees and seeds.
float pctDmg=0; // float pctDmg=0; //
bool dealsPctDmg=false; //If set to true, uses pctDmg and deals a % health value instead. bool dealsPctDmg=false; //If set to true, uses pctDmg and deals a % health value instead.
WEATHER_POWER(std::string name,std::string desc,Animation*icon,Animation*effect,int dmg,int dmgRoll,int range,Pixel bgcol,Pixel textcol,int effectTime,ParticleEffect*parteff) { sound::Wave*sound;
float soundSpd=1;
WEATHER_POWER(std::string name,std::string desc,Animation*icon,Animation*effect,int dmg,int dmgRoll,int range,Pixel bgcol,Pixel textcol,int effectTime,ParticleEffect*parteff,sound::Wave*sound,float soundSpd=1) {
this->description=desc; this->description=desc;
this->name=name; this->name=name;
this->anim=icon; this->anim=icon;
@ -379,6 +381,8 @@ class WEATHER_POWER{
this->textcol=textcol; this->textcol=textcol;
this->effectTime=effectTime; this->effectTime=effectTime;
this->effect=parteff; this->effect=parteff;
this->sound=sound;
this->soundSpd=soundSpd;
} }
}; };
@ -581,39 +585,39 @@ public:
ParticleEffect*MEGAFANG_EFF = new ParticleEffect({0,0},{64,64},{0,0},{64,64},{1,1},{3,3},{-5,-5},{5,5},Pixel(255,255,255,200),Pixel(255,255,255,210),40,Pixel(70, 158, 62,0)); ParticleEffect*MEGAFANG_EFF = new ParticleEffect({0,0},{64,64},{0,0},{64,64},{1,1},{3,3},{-5,-5},{5,5},Pixel(255,255,255,200),Pixel(255,255,255,210),40,Pixel(70, 158, 62,0));
ParticleEffect*END_OF_THE_CENTURY_BEAM_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{WIDTH,HEIGHT},{64,64},{8,8},{20,20},{-4,10},{4,35},Pixel(0,0,0,75),Pixel(255,255,255,210),120,Pixel(255, 255, 255,96)); ParticleEffect*END_OF_THE_CENTURY_BEAM_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{WIDTH,HEIGHT},{64,64},{8,8},{20,20},{-4,10},{4,35},Pixel(0,0,0,75),Pixel(255,255,255,210),120,Pixel(255, 255, 255,96));
ParticleEffect*RADIOACTIVE_TRANSMISSION_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{WIDTH,HEIGHT},{64,64},{5,5},{10,10},{0,0},{0,0},Pixel(70, 189, 23,196),Pixel(189, 189, 23,210),250,Pixel(0,255,0,128)); ParticleEffect*RADIOACTIVE_TRANSMISSION_EFF = new ParticleEffect({0,0},{WIDTH,HEIGHT},{WIDTH,HEIGHT},{64,64},{5,5},{10,10},{0,0},{0,0},Pixel(70, 189, 23,196),Pixel(189, 189, 23,210),250,Pixel(0,255,0,128));
WEATHER_POWER*HAILSTORM = new WEATHER_POWER("Hailstorm","Causes a flurry of hard cold rocks to be unleashed in target area. 60+1d30",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,60,30,160,Pixel(72, 160, 212,255),Pixel(93, 161, 163,255),120,HAILSTORM_EFF); WEATHER_POWER*HAILSTORM = new WEATHER_POWER("Hailstorm","Causes a flurry of hard cold rocks to be unleashed in target area. 60+1d30",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,60,30,160,Pixel(72, 160, 212,255),Pixel(93, 161, 163,255),120,HAILSTORM_EFF,&SOUND_WEATHERLIGHT);
WEATHER_POWER*HURRICANE = new WEATHER_POWER("Hurricane","Causes heavy winds, scattering seeds, heavy rain. 20+1d10",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,20,10,200,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,HURRICANE_EFF); WEATHER_POWER*HURRICANE = new WEATHER_POWER("Hurricane","Causes heavy winds, scattering seeds, heavy rain. 20+1d10",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,20,10,200,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,HURRICANE_EFF,&SOUND_WEATHERHEAVY);
WEATHER_POWER*METEOR_RAIN = new WEATHER_POWER("Meteor Rain","Causes fiery space rocks to fall on target area. 50+1d50",POWER_METEOR_SHOWER_ANIMATION,POWER_METEOR_SHOWER_ANIMATION,50,50,96,Pixel(96, 86, 153,255),Pixel(170, 103, 201,255),120,METEOR_STORM_EFF); WEATHER_POWER*METEOR_RAIN = new WEATHER_POWER("Meteor Rain","Causes fiery space rocks to fall on target area. 50+1d50",POWER_METEOR_SHOWER_ANIMATION,POWER_METEOR_SHOWER_ANIMATION,50,50,96,Pixel(96, 86, 153,255),Pixel(170, 103, 201,255),120,METEOR_STORM_EFF,&SOUND_WEATHERHEAVY);
WEATHER_POWER*METEOR_STORM = new WEATHER_POWER("Meteor Storm","Larger burning space rocks. 120+60d",POWER_METEOR_STORM_ANIMATION,POWER_METEOR_STORM_ANIMATION,120,60,140,Pixel(89, 4, 33,255),Pixel(130, 56, 1,255),120,METEOR_RAIN_EFF); WEATHER_POWER*METEOR_STORM = new WEATHER_POWER("Meteor Storm","Larger burning space rocks. 120+60d",POWER_METEOR_STORM_ANIMATION,POWER_METEOR_STORM_ANIMATION,120,60,140,Pixel(89, 4, 33,255),Pixel(130, 56, 1,255),120,METEOR_RAIN_EFF,&SOUND_WEATHERHEAVY);
WEATHER_POWER*SNOWSTORM = new WEATHER_POWER("Snowstorm","Slows down targets and causes rapid temperature drops. 15+1d10",POWER_SNOWSTORM_ANIMATION,POWER_SNOWSTORM_ANIMATION,15,10,140,Pixel(183, 196, 194,255),Pixel(222, 255, 254,255),120,SNOWSTORM_EFF); WEATHER_POWER*SNOWSTORM = new WEATHER_POWER("Snowstorm","Slows down targets and causes rapid temperature drops. 15+1d10",POWER_SNOWSTORM_ANIMATION,POWER_SNOWSTORM_ANIMATION,15,10,140,Pixel(183, 196, 194,255),Pixel(222, 255, 254,255),120,SNOWSTORM_EFF,&SOUND_WEATHERHEAVY);
WEATHER_POWER*SANDSTORM = new WEATHER_POWER("Sandstorm","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,5,10,64,Pixel(93, 161, 163,255),Pixel(72, 160, 212,255),120,SANDSTORM_EFF); WEATHER_POWER*SANDSTORM = new WEATHER_POWER("Sandstorm","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,5,10,64,Pixel(93, 161, 163,255),Pixel(72, 160, 212,255),120,SANDSTORM_EFF,&SOUND_WEATHERLIGHT,0.6);
WEATHER_POWER*SEED_STORM = new WEATHER_POWER("Seed Storm","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,-10,15,30,Pixel(93, 161, 163,255),Pixel(72, 160, 212,255),120,SEED_STORM_EFF); WEATHER_POWER*SEED_STORM = new WEATHER_POWER("Seed Storm","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,-10,15,30,Pixel(93, 161, 163,255),Pixel(72, 160, 212,255),120,SEED_STORM_EFF,&SOUND_LASERSHOOT,0.4);
WEATHER_POWER*AVALANCHE = new WEATHER_POWER("Avalanche","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,15,10,200,Pixel(93, 161, 163,255),Pixel(72, 160, 212,255),120,AVALANCHE_EFF); WEATHER_POWER*AVALANCHE = new WEATHER_POWER("Avalanche","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,15,10,200,Pixel(93, 161, 163,255),Pixel(72, 160, 212,255),120,AVALANCHE_EFF,&SOUND_WEATHERHEAVY);
WEATHER_POWER*LIGHT_STORM = new WEATHER_POWER("Light Storm","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,50,9,64,Pixel(171, 151, 53,255),Pixel(237, 237, 237,255),120,LIGHT_STORM_EFF); WEATHER_POWER*LIGHT_STORM = new WEATHER_POWER("Light Storm","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,50,9,64,Pixel(171, 151, 53,255),Pixel(237, 237, 237,255),120,LIGHT_STORM_EFF,&SOUND_SAW,0.7);
WEATHER_POWER*SEED_BULLET = new WEATHER_POWER("Seed Bullet","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,10,15,30,Pixel(57, 92, 63,255),Pixel(95, 232, 119,255),120,SEED_BULLET_EFF); WEATHER_POWER*SEED_BULLET = new WEATHER_POWER("Seed Bullet","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,10,15,30,Pixel(57, 92, 63,255),Pixel(95, 232, 119,255),120,SEED_BULLET_EFF,&SOUND_LASERSHOOT,0.8);
WEATHER_POWER*SEED_PELLET = new WEATHER_POWER("Seed Pellet","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,5,10,30,Pixel(57, 92, 63,255),Pixel(95, 232, 119,255),120,SEED_PELLET_EFF); WEATHER_POWER*SEED_PELLET = new WEATHER_POWER("Seed Pellet","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,5,10,30,Pixel(57, 92, 63,255),Pixel(95, 232, 119,255),120,SEED_PELLET_EFF,&SOUND_MSG,0.7);
WEATHER_POWER*SEED_OF_LIFE = new WEATHER_POWER("Seed of Life","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,-10,15,30,Pixel(93, 161, 163,255),Pixel(72, 160, 212,255),120,SEED_OF_LIFE_EFF); WEATHER_POWER*SEED_OF_LIFE = new WEATHER_POWER("Seed of Life","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,-10,15,30,Pixel(93, 161, 163,255),Pixel(72, 160, 212,255),120,SEED_OF_LIFE_EFF,&SOUND_WEATHERLIGHT);
WEATHER_POWER*SUMMON_MINIONS = new WEATHER_POWER("Summon Minions","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,-75,15,255,Pixel(57, 92, 63,255),Pixel(95, 232, 119,255),120,SUMMON_MINION_EFF); WEATHER_POWER*SUMMON_MINIONS = new WEATHER_POWER("Summon Minions","",POWER_HAILSTORM_ANIMATION,POWER_HAILSTORM_ANIMATION,-75,15,255,Pixel(57, 92, 63,255),Pixel(95, 232, 119,255),120,SUMMON_MINION_EFF,&SOUND_WEATHERLIGHT);
WEATHER_POWER*CONSUME_SNACK = new WEATHER_POWER("Snack","Restores 33% health for 5 turns. If battle ends before effect ends, food is not consumed.",CONSUME_SNACK_ANIMATION,CONSUME_SNACK_ANIMATION,-1001,1,200,Pixel(147, 173, 66,255),Pixel(255, 188, 3,255),120,CONSUME_SNACK_EFF); WEATHER_POWER*CONSUME_SNACK = new WEATHER_POWER("Snack","Restores 33% health for 5 turns. If battle ends before effect ends, food is not consumed.",CONSUME_SNACK_ANIMATION,CONSUME_SNACK_ANIMATION,-1001,1,200,Pixel(147, 173, 66,255),Pixel(255, 188, 3,255),120,CONSUME_SNACK_EFF,&SOUND_SELECT,0.7);
WEATHER_POWER*CONSUME_MEAL = new WEATHER_POWER("Meal","Restores all health. Increases Maximum Health by 5.",CONSUME_MEAL_ANIMATION,CONSUME_MEAL_ANIMATION,-1002,1,200,Pixel(147, 173, 66,255),Pixel(255, 188, 3,255),120,CONSUME_SNACK_EFF); WEATHER_POWER*CONSUME_MEAL = new WEATHER_POWER("Meal","Restores all health. Increases Maximum Health by 5.",CONSUME_MEAL_ANIMATION,CONSUME_MEAL_ANIMATION,-1002,1,200,Pixel(147, 173, 66,255),Pixel(255, 188, 3,255),120,CONSUME_SNACK_EFF,&SOUND_SELECT,0.7);
WEATHER_POWER*PETAL_STORM = new WEATHER_POWER("Petal Storm","Places seeds, causes minor healing. 20+1d20",PETAL_STORM_ANIMATION,PETAL_STORM_ANIMATION,20,20,110,Pixel(189, 132, 189,255),Pixel(235, 75, 235,255),120,PETAL_STORM_EFF); WEATHER_POWER*PETAL_STORM = new WEATHER_POWER("Petal Storm","Places seeds, causes minor healing. 20+1d20",PETAL_STORM_ANIMATION,PETAL_STORM_ANIMATION,20,20,110,Pixel(189, 132, 189,255),Pixel(235, 75, 235,255),120,PETAL_STORM_EFF,&SOUND_WEATHERHEAVY);
WEATHER_POWER*ACID_RAIN = new WEATHER_POWER("Acid Rain","",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,20,10,150,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,ACID_RAIN_EFF); WEATHER_POWER*ACID_RAIN = new WEATHER_POWER("Acid Rain","",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,20,10,150,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,ACID_RAIN_EFF,&SOUND_WEATHERHEAVY);
WEATHER_POWER*DROUGHT = new WEATHER_POWER("Drought","Halves healing effects for the next turn.",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,8,3,150,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,DROUGHT_EFF); WEATHER_POWER*DROUGHT = new WEATHER_POWER("Drought","Halves healing effects for the next turn.",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,8,3,150,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,DROUGHT_EFF,&SOUND_CHANGE_OPTION,0.6);
WEATHER_POWER*HEAT_WAVE = new WEATHER_POWER("Heat Wave","",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,20,12,150,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,HEAT_WAVE_EFF); WEATHER_POWER*HEAT_WAVE = new WEATHER_POWER("Heat Wave","",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,20,12,150,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,HEAT_WAVE_EFF,&SOUND_WEATHERLIGHT);
WEATHER_POWER*TORNADO = new WEATHER_POWER("Tornado","",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,30,10,150,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,TORNADO_EFF); WEATHER_POWER*TORNADO = new WEATHER_POWER("Tornado","",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,30,10,150,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,TORNADO_EFF,&SOUND_WEATHERHEAVY,0.9);
WEATHER_POWER*GUST = new WEATHER_POWER("Gust","",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,15,10,150,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,GUST_EFF); WEATHER_POWER*GUST = new WEATHER_POWER("Gust","",POWER_HURRICANE_ANIMATION,POWER_HURRICANE_ANIMATION,15,10,150,Pixel(99, 148, 132,255),Pixel(121, 132, 140,255),120,GUST_EFF,&SOUND_WEATHERLIGHT,0.9);
WEATHER_POWER*FLASH_FLOOD = new WEATHER_POWER("Flash Flood","Causes massive seed growth and heavy damage. 30+1d20",POWER_FLASHFLOOD_ANIMATION,POWER_FLASHFLOOD_ANIMATION,30,20,200,Pixel(27, 41, 87,255),Pixel(138, 161, 237,255),120,FLASH_FLOOD_EFF); WEATHER_POWER*FLASH_FLOOD = new WEATHER_POWER("Flash Flood","Causes massive seed growth and heavy damage. 30+1d20",POWER_FLASHFLOOD_ANIMATION,POWER_FLASHFLOOD_ANIMATION,30,20,200,Pixel(27, 41, 87,255),Pixel(138, 161, 237,255),120,FLASH_FLOOD_EFF,&SOUND_WEATHERHEAVY);
WEATHER_POWER*SUNNY_DAY = new WEATHER_POWER("Sunny Day","Fertilize soil, multiplying seed growth and causing trees to drop seeds. 10+1d10",POWER_SUNNYDAY_ANIMATION,POWER_SUNNYDAY_ANIMATION,10,10,200,Pixel(179, 164, 71,255),Pixel(222, 198, 44,255),120,SUNNYDAY_EFF); WEATHER_POWER*SUNNY_DAY = new WEATHER_POWER("Sunny Day","Fertilize soil, multiplying seed growth and causing trees to drop seeds. 10+1d10",POWER_SUNNYDAY_ANIMATION,POWER_SUNNYDAY_ANIMATION,10,10,200,Pixel(179, 164, 71,255),Pixel(222, 198, 44,255),120,SUNNYDAY_EFF,&SOUND_CHANGE_OPTION,0.9);
WEATHER_POWER*FIRESTORM = new WEATHER_POWER("Fire Storm","Cause devastating fires, destroying everything in sight. 65+1d40",POWER_FIRESTORM_ANIMATION,POWER_FIRESTORM_ANIMATION,65,40,145,Pixel(176, 95, 44,255),Pixel(237, 100, 14,255),120,FIRESTORM_EFF); WEATHER_POWER*FIRESTORM = new WEATHER_POWER("Fire Storm","Cause devastating fires, destroying everything in sight. 65+1d40",POWER_FIRESTORM_ANIMATION,POWER_FIRESTORM_ANIMATION,65,40,145,Pixel(176, 95, 44,255),Pixel(237, 100, 14,255),120,FIRESTORM_EFF,&SOUND_EXPLODE,0.9);
WEATHER_POWER*SOLAR_FLARE = new WEATHER_POWER("Solar Flare","A concentrated sunbeam of death. Burns down all trees. 175+1d40",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,175,40,32,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,SOLARFLARE_EFF); WEATHER_POWER*SOLAR_FLARE = new WEATHER_POWER("Solar Flare","A concentrated sunbeam of death. Burns down all trees. 175+1d40",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,175,40,32,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,SOLARFLARE_EFF,&SOUND_LASERSHOOT);
WEATHER_POWER*HIDE = new WEATHER_POWER("Hide","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,175,40,32,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,HIDE_EFF); WEATHER_POWER*HIDE = new WEATHER_POWER("Hide","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,175,40,32,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,HIDE_EFF,&SOUND_WEATHERLIGHT,0.7);
WEATHER_POWER*HYPERZAP = new WEATHER_POWER("Hyper Zap","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,175,40,32,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,HYPERZAP_EFF); WEATHER_POWER*HYPERZAP = new WEATHER_POWER("Hyper Zap","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,175,40,32,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,HYPERZAP_EFF,&SOUND_LASERSHOOT);
WEATHER_POWER*POLLINATION = new WEATHER_POWER("Pollination","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,-110,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,POLLINATION_EFF); WEATHER_POWER*POLLINATION = new WEATHER_POWER("Pollination","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,-110,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,POLLINATION_EFF,&SOUND_WEATHERLIGHT);
WEATHER_POWER*GLARE = new WEATHER_POWER("Glare","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,GLARE_EFF); WEATHER_POWER*GLARE = new WEATHER_POWER("Glare","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,GLARE_EFF,&SOUND_MSG,0.8);
WEATHER_POWER*PETRIFY = new WEATHER_POWER("Petrify","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,PETRIFY_EFF); WEATHER_POWER*PETRIFY = new WEATHER_POWER("Petrify","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,PETRIFY_EFF,&SOUND_EXPLODE,0.6);
WEATHER_POWER*MEGA_FANG = new WEATHER_POWER("Mega Fang","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,MEGAFANG_EFF); WEATHER_POWER*MEGA_FANG = new WEATHER_POWER("Mega Fang","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),120,MEGAFANG_EFF,&SOUND_EXPLODE);
WEATHER_POWER*END_OF_THE_CENTURY_BEAM = new WEATHER_POWER("End of the Century Beam","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),160,END_OF_THE_CENTURY_BEAM_EFF); WEATHER_POWER*END_OF_THE_CENTURY_BEAM = new WEATHER_POWER("End of the Century Beam","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),160,END_OF_THE_CENTURY_BEAM_EFF,&SOUND_EXPLODE);
WEATHER_POWER*RADIOACTIVE_TRANSMISSION = new WEATHER_POWER("Radioactive Transmission","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),160,RADIOACTIVE_TRANSMISSION_EFF); WEATHER_POWER*RADIOACTIVE_TRANSMISSION = new WEATHER_POWER("Radioactive Transmission","",POWER_SOLARFLARE_ANIMATION,POWER_SOLARFLARE_ANIMATION,1,10,255,Pixel(176, 53, 37,255),Pixel(217, 98, 0,255),160,RADIOACTIVE_TRANSMISSION_EFF,&SOUND_SONAR);
bool IN_BATTLE_ENCOUNTER = false; bool IN_BATTLE_ENCOUNTER = false;
int BATTLE_ENTRY_TIMER = 0; int BATTLE_ENTRY_TIMER = 0;
@ -731,7 +735,7 @@ public:
sound::Wave SONG_MAIN,SONG_BATTLE,SONG_FINALBATTLE,SONG_EXPLORE,SONG_DOME,SONG_GAMEOVER; sound::Wave SONG_MAIN,SONG_BATTLE,SONG_FINALBATTLE,SONG_EXPLORE,SONG_DOME,SONG_GAMEOVER;
sound::Wave SOUND_MSG,SOUND_CHANGE_OPTION,SOUND_ROBOTICNOISE,SOUND_SELECT,SOUND_SAW,SOUND_SONAR,SOUND_WARNING,SOUND_EXPLODE,SOUND_LASERSHOOT,SOUND_WEATHERHEAVY,SOUND_WEATHERLIGHT; sound::Wave SOUND_MSG,SOUND_CHANGE_OPTION,SOUND_ROBOTICNOISE,SOUND_SELECT,SOUND_SAW,SOUND_SONAR,SOUND_WARNING,SOUND_EXPLODE,SOUND_LASERSHOOT,SOUND_WEATHERHEAVY,SOUND_WEATHERLIGHT,SOUND_INTROFINAL;
std::queue<int> turnOrder; std::queue<int> turnOrder;
@ -821,6 +825,7 @@ public:
SOUND_LASERSHOOT = sound::Wave("./assets/laserShoot.wav"); SOUND_LASERSHOOT = sound::Wave("./assets/laserShoot.wav");
SOUND_WEATHERHEAVY = sound::Wave("./assets/weatherHeavy.wav"); SOUND_WEATHERHEAVY = sound::Wave("./assets/weatherHeavy.wav");
SOUND_WEATHERLIGHT = sound::Wave("./assets/weatherLight.wav"); SOUND_WEATHERLIGHT = sound::Wave("./assets/weatherLight.wav");
SOUND_INTROFINAL = sound::Wave("./assets/IntroFinal.wav");
//ConsoleShow(F1,false); //ConsoleShow(F1,false);
// Called once at the start, so create things here // Called once at the start, so create things here
@ -1274,6 +1279,8 @@ public:
}break; }break;
case GAME_OVER_TERMINAL:{ case GAME_OVER_TERMINAL:{
if (textInd>=CONSOLE_REF_TEXT.length()) { if (textInd>=CONSOLE_REF_TEXT.length()) {
audioFadeOut();
queueBGMPlayback=true;
fadeOut(); fadeOut();
} }
}break; }break;
@ -1651,7 +1658,11 @@ public:
GAME_FLAGS[gameflag::VISIT_BROKEN_ROVER]=true; GAME_FLAGS[gameflag::VISIT_BROKEN_ROVER]=true;
PlayCutscene(cutscene::WALK_TO_ROVER); PlayCutscene(cutscene::WALK_TO_ROVER);
} }
playMusic(&SONG_EXPLORE); if (!GAME_FLAGS[gameflag::ROCKET_LAUNCH_READY]) {
playMusic(&SONG_EXPLORE);
} else {
playMusic(&SONG_DOME);
}
}break; }break;
case cutscene::TRANSITION_CUTSCENE_2:{ case cutscene::TRANSITION_CUTSCENE_2:{
if (GAME_FLAGS[gameflag::ROCKET_LAUNCH_READY]&&!GAME_FLAGS[gameflag::COLLECTED_ITEMS_IN_DOME]) { if (GAME_FLAGS[gameflag::ROCKET_LAUNCH_READY]&&!GAME_FLAGS[gameflag::COLLECTED_ITEMS_IN_DOME]) {
@ -2298,6 +2309,9 @@ public:
} else { } else {
ref=CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->selectedMove; ref=CURRENT_ENCOUNTER.entities[BATTLE_CURRENT_TURN_ENTITY]->selectedMove;
} }
if (EFFECT_TIMER==1) {
PlaySound(ref->sound,false,ref->soundSpd);
}
PIXEL_EFFECT_TRANSPARENCY=(0.5*cos(((M_PI/(30.0*(ref->effectTime/120.0)))/2)*EFFECT_TIMER-M_PI)+0.5); PIXEL_EFFECT_TRANSPARENCY=(0.5*cos(((M_PI/(30.0*(ref->effectTime/120.0)))/2)*EFFECT_TIMER-M_PI)+0.5);
if (EFFECT_TIMER==30&&ref->name.compare("Petal Storm")==0) { if (EFFECT_TIMER==30&&ref->name.compare("Petal Storm")==0) {
int healPower=30; int healPower=30;
@ -2508,6 +2522,7 @@ public:
bool snakeFight=false; bool snakeFight=false;
bool YYFight=false; bool YYFight=false;
bool AAFight=false; bool AAFight=false;
queueBGMPlayback=true;
if (!GAME_FLAGS[gameflag::LITTLESNAKES_KILLED]) { if (!GAME_FLAGS[gameflag::LITTLESNAKES_KILLED]) {
for (int i=0;i<CURRENT_ENCOUNTER.entities.size();i++) { for (int i=0;i<CURRENT_ENCOUNTER.entities.size();i++) {
if (CURRENT_ENCOUNTER.entities[i]->name.compare("Sidewinder")==0) { if (CURRENT_ENCOUNTER.entities[i]->name.compare("Sidewinder")==0) {
@ -2533,6 +2548,8 @@ public:
} }
if (YYFight) { if (YYFight) {
GAME_FLAGS[gameflag::DEFEATED_Y_Y]=true; GAME_FLAGS[gameflag::DEFEATED_Y_Y]=true;
queueBGMPlayback=false;
stopMusic();
DisplayMessageBox(58); DisplayMessageBox(58);
StartCutscene(cutscene::A_A_ENCOUNTER); StartCutscene(cutscene::A_A_ENCOUNTER);
SHIP_COLOR=Pixel(89, 55, 36,255); SHIP_COLOR=Pixel(89, 55, 36,255);
@ -2548,12 +2565,13 @@ public:
if (AAFight) { if (AAFight) {
GAME_FLAGS[gameflag::DEFEATED_A_A]=true; GAME_FLAGS[gameflag::DEFEATED_A_A]=true;
StartCutscene(cutscene::ROVER_SAVE); StartCutscene(cutscene::ROVER_SAVE);
queueBGMPlayback=false;
playMusic(&SONG_MAIN);
for (int i=0;i<150;i++) { for (int i=0;i<150;i++) {
starpixels[i]->spd={range(-2,0),range(-0.1,0)}; starpixels[i]->spd={range(-2,0),range(-0.1,0)};
} }
} }
} }
queueBGMPlayback=true;
audioFadeOut(); audioFadeOut();
IN_BATTLE_ENCOUNTER=false; IN_BATTLE_ENCOUNTER=false;
ENCOUNTERS.erase(ENCOUNTERS.begin()+CURRENT_ENCOUNTER_IND); ENCOUNTERS.erase(ENCOUNTERS.begin()+CURRENT_ENCOUNTER_IND);
@ -2991,6 +3009,11 @@ public:
}break; }break;
case cutscene::LAUNCHPAD_OPEN:{ case cutscene::LAUNCHPAD_OPEN:{
if (MoveCameraTowardsPoint({30,35})) { if (MoveCameraTowardsPoint({30,35})) {
if (!CUTSCENE_FLAGS[0]) {
PlaySound(&SOUND_SAW,0.3);
CUTSCENE_FLAGS[0]=true;
stopMusic();
}
if (frameCount%16==0) { if (frameCount%16==0) {
PLAYER_COORDS[0]+=0.25; PLAYER_COORDS[0]+=0.25;
} else } else
@ -3031,6 +3054,7 @@ public:
DisplayMessageBox(52); DisplayMessageBox(52);
} else { } else {
GAME_FLAGS[gameflag::ROCKET_LAUNCH_READY]=true; GAME_FLAGS[gameflag::ROCKET_LAUNCH_READY]=true;
playMusic(&SONG_DOME);
fadeOut(); fadeOut();
} }
} }
@ -3090,6 +3114,10 @@ public:
}break; }break;
case cutscene::A_A_TRANSFORM:{ case cutscene::A_A_TRANSFORM:{
if (CUTSCENE_TIMER<60) { if (CUTSCENE_TIMER<60) {
if (!CUTSCENE_FLAGS[2]) {
CUTSCENE_FLAGS[2]=true;
PlaySound(&SOUND_SAW,false,0.4);
}
//89, 55, 36 //89, 55, 36
SHIP_COLOR=Pixel( SHIP_COLOR=Pixel(
std::clamp(89+(0.5*cos(M_PI/60*CUTSCENE_TIMER-M_PI)+0.5)*255,0.0,255.0), std::clamp(89+(0.5*cos(M_PI/60*CUTSCENE_TIMER-M_PI)+0.5)*255,0.0,255.0),
@ -3113,6 +3141,8 @@ public:
if (!CUTSCENE_FLAGS[1]) { if (!CUTSCENE_FLAGS[1]) {
CUTSCENE_FLAGS[1]=true; CUTSCENE_FLAGS[1]=true;
DisplayMessageBox(62); DisplayMessageBox(62);
engine.StopAll();
PlaySound(&SOUND_INTROFINAL);
} else { } else {
updatePlayerState(); updatePlayerState();
EndCutscene(); EndCutscene();
@ -4231,6 +4261,7 @@ public:
void displayPowerInfo(WEATHER_POWER*POWER){ void displayPowerInfo(WEATHER_POWER*POWER){
PlayCutscene(cutscene::NODE_COLLECT_CUTSCENE); PlayCutscene(cutscene::NODE_COLLECT_CUTSCENE);
CUTSCENE_DISPLAYED_CARD=POWER; CUTSCENE_DISPLAYED_CARD=POWER;
PlaySound(&SOUND_SELECT,0.9);
} }
void applyPixelEffect(ParticleEffect*effect,vf2d pos,float startingTransparency) { void applyPixelEffect(ParticleEffect*effect,vf2d pos,float startingTransparency) {
@ -4532,6 +4563,7 @@ public:
void GameOver() { void GameOver() {
GAME_STATE=GAME_OVER; GAME_STATE=GAME_OVER;
ResetTerminal(STORY_TEXT4+PLAYER_NAME+STORY_TEXT5); ResetTerminal(STORY_TEXT4+PLAYER_NAME+STORY_TEXT5);
playMusic(&SONG_GAMEOVER);
for (int i=0;i<CURRENT_ENCOUNTER.entities.size();i++) { for (int i=0;i<CURRENT_ENCOUNTER.entities.size();i++) {
CURRENT_ENCOUNTER.entities[i]->hp=CURRENT_ENCOUNTER.entities[i]->startingHP; CURRENT_ENCOUNTER.entities[i]->hp=CURRENT_ENCOUNTER.entities[i]->startingHP;
CURRENT_ENCOUNTER.entities[i]->spr=CURRENT_ENCOUNTER.entities[i]->startingspr; CURRENT_ENCOUNTER.entities[i]->spr=CURRENT_ENCOUNTER.entities[i]->startingspr;

Binary file not shown.
Loading…
Cancel
Save