Page MenuHomePhorge

drgn.txt
ActivePublic

Authored by keithzg on Apr 3 2019, 5:35 PM.
Tags
None
Referenced Files
F449: raw.txt
Apr 3 2019, 5:35 PM
Subscribers
None
//Dr. Seuss once wrote, "IF." He meant, "If you give a fuck, maybe,
//JUST MAYBE, you can change this shitty world in some small way for
//the better." I might've been an writer of children's books someday,
//but instead, I decided to make this. So in lieu of The Lorax,
//let's call this The Dragon, and have my word be, "DON'T." As in,
//"Don't do something stupid like this the way I did, you jackass."
//But the truth is humans are very stubborn creatures. You probably
//won't listen to my advice and, chances are, neither will I.
//This is just an excerpt of the source code for DRAGON: A Game About
//a Dragon: http://store.steampowered.com/app/351150
//The actual file is three to four times what is shown here. But it
//works, and isn't that what matters?
//I don't know why you would ever want to use this horrendous code,
//but it is logorrhea of my own creation notwitstanding, so:
//Copyright 2012-2015 Chris Albert
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.IsolatedStorage;
using System.Xml.Serialization;
using System.Runtime.InteropServices;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Storage;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
#region using Steamworks;
using Steamworks;
#endregion
namespace AGameAboutADragon
{
/// <summary>
/// This is the main type for your game
/// </summary>
///
public class Game1 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
DrawStages drawStages;
DrawHome drawHome;
Draw2e1 draw2e1;
Draw2e4 draw2e4;
Draw4e2 draw4e2;
Draw5e1 draw5e1;
Draw6eB draw6eB;
DrawAbyss drawAbyss;
DrawSky drawSky;
DrawWorldMap drawWorldMap;
DrawStory drawStory;
DrawTitle drawTitle;
DrawCredits drawCredits;
DrawEndPage drawEndPage;
LoadDragon loadDragon;
LoadSquire loadSquire;
LoadSheep loadSheep;
LoadRam loadRam;
LoadArcher loadArcher;
LoadCD loadCD;
LoadStampede loadStampede;
LoadHandler loadHandler;
LoadSecurity loadSecurity;
LoadXbow loadXbow;
LoadSwordmaster loadSwordmaster;
LoadBone loadBone;
LoadSax loadSax;
LoadTuba loadTuba;
LoadHazmat loadHazmat;
LoadLancer loadLancer;
LoadPikeman loadPikeman;
LoadFiresoldier loadFiresoldier;
LoadFencer loadFencer;
LoadXX loadXX;
LoadSpymaster loadSpymaster;
LoadWalker loadWalker;
LoadFlier loadFlier;
LoadExplosion loadExplosion;
LoadLavaball loadLavaball;
LoadToxicball loadToxicball;
LoadNeckbird loadNeckbird;
LoadFirefloor loadFirefloor;
LoadTentacle loadTentacle;
LoadTM061 loadBoss1;
LoadCaptain loadCaptain;
LoadAlex loadAlex;
LoadBaldwin loadBaldwin;
LoadWarden loadWarden;
LoadNinja loadNinja;
LoadGeneral loadGeneral;
LoadMech loadMech;
LoadFlyss loadFlyss;
PuzzleTruck puzzleTruck;
PuzzleWater puzzleWater;
PuzzleHovercraft puzzleHovercraft;
PuzzleBoat puzzleBoat;
PuzzleFlamewall puzzleFlamewall;
PuzzleGate puzzleGate;
Puzzle4e3top puzzle4e3top;
PuzzleBramble puzzleBramble;
PuzzleCruise puzzleCruise;
PuzzleRock puzzleRock;
Puzzle5e2 puzzle5e2;
PuzzleTower puzzleTower;
LoadGust loadGust;
DrawTreasureText drawTreasureText;
DrawWater drawWater;
LoadOcean loadOcean;
LoadWaterfall loadWaterfall;
Npc1e2 npc1e2;
Npc1e3 npc1e3;
Npc2e1 npc2e1;
Npc2e2 npc2e2;
Npc2e3 npc2e3;
Npc2e4 npc2e4;
Npc3e1 npc3e1;
Npc3eB npc3eB;
Npc4e1 npc4e1;
Npc4e2 npc4e2;
Npc4e3 npc4e3;
Npc4e4 npc4e4;
Npc5e1 npc5e1;
Npc5e2 npc5e2;
PlayStageMusic playStageMusic;
PlayWorldMusic playWorldMusic;
Play5e2Top play5e2Top;
Play5e2Bottom play5e2Bottom;
PlayStoryHappy playStoryHappy;
PlayStoryEnemy playStoryEnemy;
PlayStoryWistful playStoryWistful;
PlayStoryEndingA playStoryEndingA;
PlayStoryEndingB playStoryEndingB;
PlayStoryCredits playStoryCredits;
PlayMusicBox playMusicBox;
PlayFireSFX playFireSFX;
PlayThunderSFX playThunderSFX;
PlayIceSFX playIceSFX;
PlayAcidSFX playAcidSFX;
PlayMagicSFX playMagicSFX;
PlayWaterSFX playWaterSFX;
PlayWings playWings;
LoopThunderBlast loopThunderBlast;
LoopFlame loopFlame;
LoopAcid loopAcid;
LoopFlameAtk loopFlameAtk;
LoopSpin loopSpin;
LoopLaser loopLaser;
LoopBurrow loopBurrow;
LoopFireBreathAlt loopFireBreathAlt;
LoopIceBreathAlt loopIceBreathAlt;
ContentManager stageManager;
ContentManager storyManager;
ContentManager mapManager;
ContentManager breathSFX;
ContentManager stageBGM;
ContentManager worldBGM;
ContentManager storyBGM;
Achievements achievements;
//TRACK LIST
#region SFX List
SoundEffect musicExit, musicDefeat, musicTreasure,
sfxToggle, sfxYes, sfxNo, sfxPageflip, sfxWarp, sfxCoin,
sfxJump, sfxWaterjump, sfxDamage, sfxSlash, sfxSplash,
sfxPlink, sfxEngine, sfxFreeze,
sfxSmoke,
sfxExplosion, sfxGunshot, sfxCannon, sfxThunk,
sfxThunderProj, sfxThunderBlast, sfxInvis,
sfxLaser, sfxLaserCharge, sfxChargeShort,
sfxFireball, sfxSpear, sfxNote,
sfxExpAlt, sfxArrow, sfxDash, sfxSteam, sfxThud;
#endregion
//SPRITE LIST
#region Sprite List
Texture2D hudHP, hpNumbers, hpSlash, hudBreath, breathHUD, HPBorder,
hudCurrency, optionsNumbers, //HUD sprites
campfireSS, smokeSS, //end of stage sprites
warpSS, //warp sprite
coinSS, puffSS, plinkSS, sparkleSS, keySS, splashSS, //system sprites
explosionOutSS, explosionUpSS,
allTreasureSS, acidTreasureSS,
titlePointer, //title screen sprites
whistle, hintBubble, guideBubble, guidePause,
pauseOn, pauseSwitch, pauseInstructions, exitInstructions,
breathDesc,
whiteMatteSS, blackMatteSS; //overlays
#endregion
SaveManager save;
bool titleLoad = false;
#region Title Options
int languageType = 0;
int controlType = 0;
int healthType = 0;
int optionsPointerLoc = 0;
int checkVolume = 10;
int checkSFX = 10;
int checkLanguage = 0;
int checkControl = 0;
int checkHealth = 0;
#endregion
#region All int
int hpOne, hpTen = 0;
int breathOne, breathTen = 0;
int clawOne, clawTen = 0;
int whistle1 = 0;
int whistle2 = 0;
int whistle3 = 0;
int helpOpacity = 0;
int helpCT = 0;
int jumpWait = 0;
int toggleTutorial = 0;
int tutorialPos = 0;
int pausePos = 0;
int worldMapPointerModX = 0;
int worldMapPointerModY = 0;
int saveRes = 0;
int resNow = 0;
int resMod = 0;
int fontSetting = 0;
int titleExtraCT = 0;
int titleExtraFrame = 0;
int boss1Clean = 0;
int boss2Clean = 0;
int boss3Clean = 0;
int boss4Clean = 0;
int boss5Clean = 0;
int questHPBonus = 0;
int endpageCT = 0;
int endpageFrameX = 0;
int endpageFrameY = 0;
int haveTreasure1 = 0;
int haveTreasure2 = 0;
int haveTreasure3 = 0;
int haveTreasure4 = 0;
int haveTreasure5 = 0;
int haveTreasure6 = 0;
int haveTreasure7 = 0;
int haveTreasure8 = 0;
int haveTreasure9 = 0;
int haveTreasure10 = 0;
int haveTreasure11 = 0;
int haveTreasure12 = 0;
int haveTreasure13 = 0;
int haveTreasure14 = 0;
int haveTreasure15 = 0;
int haveTreasure16 = 0;
int haveTreasure17 = 0;
int haveTreasure18 = 0;
int haveTreasure19 = 0;
int haveTreasure20 = 0;
int haveTreasure21 = 0;
int haveTreasure22 = 0;
int haveTreasure23 = 0;
int haveTreasure24 = 0;
int haveTreasure25 = 0;
int haveTreasure26 = 0;
int houseArrowCT = 0;
int houseArrowFrame = 0;
#region light
int light1X = 0;
int light2X = 0;
int light3X = 0;
int light4X = 0;
int light1Frame = 0;
int light2Frame = 0;
int light3Frame = 0;
int light4Frame = 0;
int light1CT = 0;
int light2CT = 0;
int light3CT = 0;
int light4CT = 0;
int light1Act = 0;
int light2Act = 0;
int light3Act = 0;
int light4Act = 0;
int light1Wait = 0;
int light2Wait = 0;
int light3Wait = 0;
int light4Wait = 0;
bool light1On = false;
bool light2On = false;
bool light3On = false;
bool light4On = false;
#endregion
#region 2-1 puzzle
int gateY = 0;
int gateX = 0;
int waterRisingHeight = 0;
int puzzleCT = 0;
#endregion
#region 2-2 puzzle
int fishermanCT = 0;
int fishermanFrame = 0;
int fishermanAct = 0;
int fishermanLoc = 0;
int hoverCT = 0;
int hoverFrame = 0;
int hoverAct = 0;
int hoverHP = 60;
int hoverY = 0;
int puzzleExplosionCT = 0;
int chestAct = 0;
int flyssCT = 0;
int flyssFrame = 0;
int flyssAct = 0;
int flyssWait = 0;
#endregion
#region 2-3 puzzle
int gustCT = 0;
int gustFrame = 0;
int gustAct = 0;
int gustTimer = 0;
int gustYVel = 0;
int gustYMod = 0;
int gustAttackFrame = 0;
int gustAttackCT = 0;
int defendTimer = 0;
int sheepYVel = 0;
int sheepXVel = 0;
int sheepYPos = 0;
int sheepXPos = 0;
int sheepCT = 0;
int sheepFrame = 0;
int sheepAct = 0;
#endregion
#region 2-4 puzzle
int door1CT = 0;
int door1Frame = 0;
int door2CT = 0;
int door2Frame = 0;
int fire1Wait = 0;
int fire1CT = 0;
int fire1Frame = 0;
int fire1Act = 0;
int fire1Freeze = 0;
int fire2Wait = 0;
int fire2CT = 0;
int fire2Frame = 0;
int fire2Act = 0;
int fire2Freeze = 0;
int fire3Wait = 0;
int fire3CT = 0;
int fire3Frame = 0;
int fire3Act = 0;
int fire3Freeze = 0;
int fire4Wait = 0;
int fire4CT = 0;
int fire4Frame = 0;
int fire4Act = 0;
int fire4Freeze = 0;
int fire5Wait = 0;
int fire5CT = 0;
int fire5Frame = 0;
int fire5Act = 0;
int fire5Freeze = 0;
#endregion
#region boat
int boat1X = 0;
int boat1Y = 0;
int boat2X = 0;
int boat2Y = 0;
int boat1Vel = 0;
int boat1VelCT = 0;
int boat2Vel = 0;
int boat2VelCT = 0;
#endregion
#region 3-2 puzzle
int flameWallX = 0;
int flameWallVel = 0;
int sprinklerCT = 0;
int sprinklerFrame = 0;
int sprinkler1Frozen = 0;
int sprinkler2Frozen = 0;
int sprinkler3Frozen = 0;
int sprinkler4Frozen = 0;
int sprinkler5Frozen = 0;
int sprinkler6Frozen = 0;
int sprinkler7Frozen = 0;
int sprinkler1HP = 60;
int sprinkler2HP = 60;
int sprinkler3HP = 60;
int sprinkler4HP = 60;
int sprinkler5HP = 60;
int sprinkler6HP = 60;
int sprinkler7HP = 60;
bool s3e2enemiesOn = false;
#endregion
#region 3-3 puzzles
int guardAct = 0;
int guardFrame = 0;
int guardCT = 0;
int doorYPos = 0;
int boulderHP = 420;
int boulderCT = 0;
int boulderFrame = 0;
#endregion
#region 4-1 puzzle
int gearCT = 0;
int gearFrame = 0;
int gearAct = 0;
int gearHP = 60;
int gate4e1Y = 0;
#endregion
#region 4-2 puzzle
int cannonFarFrame = 0;
int cannonFarAct = 0;
int cannonFarCT = 0;
int cannonNearFrame = 0;
int cannonNearAct = 0;
int cannonNearCT = 0;
int genAct = 0;
int wickCT = 0;
int wickFrame = 0;
int wickAct = 0;
int wickTimer = 0;
int enemyMissileFrame = 0;
int enemyMissileCT = 0;
int enemyMissileTimer = 0;
int enemyMissileX = 0;
int enemyMissileYNear = 0;
int enemyMissileYFar = 0;
int playerMissleCT = 0;
int playerMissileFrame = 0;
int playerMissileYNear = 0;
int playerMissileYFar = 0;
int starX = 0;
int starY = 0;
int starCT = 0;
int starFrame = 0;
#endregion
#region 4-3 Variables
int floor1CT = 0;
int floor1Frame = 0;
int floor1Wait = 0;
int floor1Dur = 0;
int floor1Act = 0;
int floor2CT = 0;
int floor2Frame = 0;
int floor2Wait = 0;
int floor2Dur = 0;
int floor2Act = 0;
int floor3CT = 0;
int floor3Frame = 0;
int floor3Wait = 0;
int floor3Dur = 0;
int floor3Act = 0;
int brambleHP = 180;
int brambleCT = 0;
int brambleFrame = 0;
int floodgateHP = 60;
int floodgateY = 0;
#endregion
#region 4-4 puzzle
int brambleAHP = 120;
int brambleAFreeze = 120;
int brambleACT = 0;
int brambleAFrame = 0;
int brambleBHP = 180;
int brambleBCT = 0;
int brambleBFrame = 0;
#endregion
#region 5-1
int barrierCT, barrierFrame = 0;
#endregion
#region 5-2 puzzle
int carHP = 0;
int carCT = 0;
int carFrame = 0;
int carAct = 0;
int carXVel = 0;
int carXPos = 0;
int defenderXPos = 0;
int defenderCT = 0;
int defenderFrame = 0;
int defenderAct = 0;
int defenderFreezeOpacity = 0;
int defenderFaceRMod = 0;
int spyCT = 0;
int spyFrame = 0;
int spyAct = 0;
int spyActMod = 0;
int spyHP = 1;
int spyTreasureLocMod = 0;
int spyWait = 0;
int daggerCT = 0;
int daggerFrame = 0;
int dagger1Act = 2;
int dagger2Act = 0;
int dagger3Act = 1;
int dagger1XPos = 0;
int dagger1YPos = 0;
int dagger1XVel = 0;
int dagger1YVel = 0;
int dagger2XPos = 0;
int dagger2YPos = 0;
int dagger2XVel = 0;
int dagger2YVel = 0;
int dagger3XPos = 0;
int dagger3YPos = 0;
int dagger3XVel = 0;
int dagger3YVel = 0;
bool e6Melee = false;
bool e7Melee = false;
bool e8Melee = false;
bool e6projA = false;
bool e7projA = false;
bool e8projA = false;
bool e6projB = false;
bool e7projB = false;
bool e8projB = false;
#endregion
#region 6-1 puzzle
int magicWallCT = 0;
int magicWallFrame = 0;
int wallOpacity1 = 255;
int wallOpacity2 = 255;
int wallOpacity3 = 255;
int wallColor1 = 0;
int wallColor2 = 0;
int wallColor3 = 0;
int statue1CT = 0;
int statue1Frame = 0;
int statue1HP = 120;
int statue2CT = 0;
int statue2Frame = 0;
int statue2HP = 0;
int statue3CT = 0;
int statue3Frame = 0;
int statue3HP = 0;
int torchCT = 0;
int torchFrame = 0;
int torch1Act = 0;
int torch2Act = 0;
int torch3Act = 0;
int torch4Act = 0;
int torch5Act = 0;
int torch6Act = 0;
int torch7Act = 0;
int torch8Act = 0;
int torch9Act = 0;
int torch10Act = 0;
int torch11Act = 0;
int torch12Act = 0;
int torch13Act = 0;
int torch14Act = 0;
int torch15Act = 0;
int torch16Act = 0;
int torch17Act = 0;
int waterTowerCT = 0;
int waterTowerFrame = 0;
int water1Act = 0;
int water2Act = 0;
int water1HP = 60;
int water2HP = 60;
#endregion
#region 6-B not boss
int foothold1Frame = 2;
int foothold2CT = 0;
int foothold2Frame = 0;
int foothold3CT = 0;
int foothold3Frame = 0;
int starlightCT = 0;
int starlightFrame = 0;
int starlightX = 0;
int starlightY = 0;
int alienCannon1CT = 0;
int alienCannon1Frame = 0;
int alienCannon1Act = 0;
int alienCannon1Facing = 0;
int alienCannon1Reload = 0;
int alienDolphinVelCT1 = 0;
int alienDolphinX1 = 0;
int alienDolphinY1 = 0;
int alienDolphinXVel1 = 0;
int alienDolphinYVel1 = 0;
int alienCannon2CT = 0;
int alienCannon2Frame = 0;
int alienCannon2Act = 0;
int alienCannon2Facing = 0;
int alienCannon2Reload = 0;
int alienDolphinVelCT2 = 0;
int alienDolphinX2 = 0;
int alienDolphinY2 = 0;
int alienDolphinXVel2 = 0;
int alienDolphinYVel2 = 0;
int alienCannon3CT = 0;
int alienCannon3Frame = 0;
int alienCannon3Act = 0;
int alienCannon3Facing = 0;
int alienCannon3Reload = 0;
int alienDolphinVelCT3 = 0;
int alienDolphinX3 = 0;
int alienDolphinY3 = 0;
int alienDolphinXVel3 = 0;
int alienDolphinYVel3 = 0;
int alienCannon4CT = 0;
int alienCannon4Frame = 0;
int alienCannon4Act = 0;
int alienCannon4Facing = 0;
int alienCannon4Reload = 0;
int alienDolphinVelCT4 = 0;
int alienDolphinX4 = 0;
int alienDolphinY4 = 0;
int alienDolphinXVel4 = 0;
int alienDolphinYVel4 = 0;
int dolphin1CT = 0;
int dolphin1Frame = 0;
int dolphin2CT = 0;
int dolphin2Frame = 0;
int dolphin3CT = 0;
int dolphin3Frame = 0;
int dolphin4CT = 0;
int dolphin4Frame = 0;
int dolphin1Act = 0;
int dolphin2Act = 0;
int dolphin3Act = 0;
int dolphin4Act = 0;
int e6projB_X = 0;
int e6projB_Y = 0;
int e6projBVel = 0;
int e6projC_X = 0;
int e6projC_Y = 0;
int e6projCVel = 0;
bool e6projectileB = false;
bool e6projectileC = false;
int e7projB_X = 0;
int e7projB_Y = 0;
int e7projBVel = 0;
int e7projC_X = 0;
int e7projC_Y = 0;
int e7projCVel = 0;
bool e7projectileB = false;
bool e7projectileC = false;
int e8projB_X = 0;
int e8projB_Y = 0;
int e8projBVel = 0;
int e8projC_X = 0;
int e8projC_Y = 0;
int e8projCVel = 0;
bool e8projectileB = false;
bool e8projectileC = false;
int e9projB_X = 0;
int e9projB_Y = 0;
int e9projBVel = 0;
int e9projC_X = 0;
int e9projC_Y = 0;
int e9projCVel = 0;
bool e9projectileB = false;
bool e9projectileC = false;
int e10projB_X = 0;
int e10projB_Y = 0;
int e10projBVel = 0;
int e10projC_X = 0;
int e10projC_Y = 0;
int e10projCVel = 0;
bool e10projectileB = false;
bool e10projectileC = false;
#endregion
#region Obstacles
int obs1X = 0;
int obs1Y = 0;
int obs1XVel = 0;
int obs1YVel = 0;
int obs1CT = 0;
int obs1Frame = 0;
int obs1Act = 0;
int obs1Wait = 0;
int obs1FreezeCT = 0;
int obs1FreezeColor = 0;
int obs2X = 0;
int obs2Y = 0;
int obs2XVel = 0;
int obs2YVel = 0;
int obs2CT = 0;
int obs2Frame = 0;
int obs2Act = 0;
int obs2Wait = 0;
int obs2FreezeCT = 0;
int obs2FreezeColor = 0;
int obs3X = 0;
int obs3Y = 0;
int obs3XVel = 0;
int obs3YVel = 0;
int obs3CT = 0;
int obs3Frame = 0;
int obs3Act = 0;
int obs3Wait = 0;
int obs3FreezeCT = 0;
int obs3FreezeColor = 0;
int obs4X = 0;
int obs4Y = 0;
int obs4XVel = 0;
int obs4YVel = 0;
int obs4CT = 0;
int obs4Frame = 0;
int obs4Act = 0;
int obs4Wait = 0;
int obs4FreezeCT = 0;
int obs4FreezeColor = 0;
int obs5X = 0;
int obs5Y = 0;
int obs5XVel = 0;
int obs5YVel = 0;
int obs5CT = 0;
int obs5Frame = 0;
int obs5Act = 0;
int obs5Wait = 0;
int obs5FreezeCT = 0;
int obs5FreezeColor = 0;
int obs6X = 0;
int obs6Y = 0;
int obs6XVel = 0;
int obs6YVel = 0;
int obs6CT = 0;
int obs6Frame = 0;
int obs6Act = 0;
int obs6Wait = 0;
int obs6FreezeCT = 0;
int obs6FreezeColor = 0;
int obs7X = 0;
int obs7Y = 0;
int obs7XVel = 0;
int obs7YVel = 0;
int obs7CT = 0;
int obs7Frame = 0;
int obs7Act = 0;
int obs7Wait = 0;
int obs7FreezeCT = 0;
int obs7FreezeColor = 0;
int obs8X = 0;
int obs8Y = 0;
int obs8XVel = 0;
int obs8YVel = 0;
int obs8CT = 0;
int obs8Frame = 0;
int obs8Act = 0;
int obs8Wait = 0;
int obs8FreezeCT = 0;
int obs8FreezeColor = 0;
int obs9X = 0;
int obs9Y = 0;
int obs9XVel = 0;
int obs9YVel = 0;
int obs9CT = 0;
int obs9Frame = 0;
int obs9Act = 0;
int obs9Wait = 0;
int obs9FreezeCT = 0;
int obs9FreezeColor = 0;
int obs10X = 0;
int obs10Y = 0;
int obs10XVel = 0;
int obs10YVel = 0;
int obs10CT = 0;
int obs10Frame = 0;
int obs10Act = 0;
int obs10Wait = 0;
int obs10FreezeCT = 0;
int obs10FreezeColor = 0;
#endregion
#region Wealth var
int oneNow = 0;
int tenNow = 0;
int hundNow = 0;
int thouNow = 0;
int tenkNow = 0;
int hundkNow = 0;
int oneTotal = 0;
int tenTotal = 0;
int hundTotal = 0;
int thouTotal = 0;
int tenkTotal = 0;
int hundkTotal = 0;
#endregion
#region whistle
int whistleRandom = -1;
int note1Measure = 0;
int note1Beat = 0;
int note1xPos = 0;
int note1yPos = 0;
int note1xVel = 0;
int note1yVel = -2;
int note2Measure = 0;
int note2Beat = 0;
int note2xPos = 0;
int note2yPos = 0;
int note2xVel = 0;
int note2yVel = -2;
int note3Measure = 0;
int note3Beat = 0;
int note3xPos = 0;
int note3yPos = 0;
int note3xVel = 0;
int note3yVel = -2;
int note4Measure = 0;
int note4Beat = 0;
int note4xPos = 0;
int note4yPos = 0;
int note4xVel = 0;
int note4yVel = -2;
int note1CT = 0;
int note2CT = 0;
int note3CT = 0;
int note4CT = 0;
#endregion
#region puzzle flash
int puzzle1Opacity = 255;
int puzzle2Opacity = 255;
int puzzle3Opacity = 255;
int puzzle4Opacity = 255;
int puzzle5Opacity = 255;
int puzzle6Opacity = 255;
int puzzle7Opacity = 255;
#endregion
Random generateRandom = new Random();
int floor1y, floor2y, floor3y, floor4y, floor5y, floor6y, floor7y, floor8y,
floor9y, floor10y, floor11y, floor12y, floor13y, floor14y, floor15y, floor16y,
floor17y, floor18y, floor19y, floor20y, floor21y, floor22y, floor23y, floor24y,
floor25y, floor26y, floor27y, floor28y, floor29y, floor30y, floor31y, floor32y,
floor33y, floor34y, floor35y, floor36y, floor37y, floor38y, floor39y, floor40y,
floor41y, floor42y, floor43y, floor44y, floor45y, floor46y, floor47y, floor48y,
floor49y, floor50y,
floor51y, floor52y, floor53y, floor54y, floor55y, floor56y, floor57y,
floor58y, floor59y, floor60y, floor61y, floor62y, floor63y, floor64y, floor65y,
floor66y, floor67y, floor68y, floor69y, floor70y, floor71y, floor72y, floor73y,
floor74y, floor75y, floor76y, floor77y, floor78y, floor79y, floor80y, floor81y,
floor82y, floor83y, floor84y, floor85y, floor86y, floor87y, floor88y, floor89y,
floor90y, floor91y, floor92y, floor93y, floor94y, floor95y, floor96y, floor97y,
floor98y, floor99y, floor100y,
floor101y, floor102y, floor103y, floor104y, floor105y, floor106y,
floor107y, floor108y, floor109y, floor110y, floor111y, floor112y, floor113y,
floor114y, floor115y, floor116y, floor117y, floor118y, floor119y, floor120y,
floor121y, floor122y, floor123y, floor124y, floor125y, floor126y, floor127y,
floor128y, floor129y, floor130y, floor131y, floor132y, floor133y, floor134y,
floor135y, floor136y, floor137y, floor138y, floor139y, floor140y, floor141y,
floor142y, floor143y, floor144y, floor145y, floor146y, floor147y, floor148y,
floor149y, floor150y,
floor151y, floor152y, floor153y, floor154y, floor155y, floor156y,
floor157y, floor158y, floor159y, floor160y, floor161y, floor162y, floor163y,
floor164y, floor165y, floor166y, floor167y, floor168y, floor169y, floor170y,
floor171y, floor172y, floor173y, floor174y, floor175y, floor176y, floor177y,
floor178y, floor179y, floor180y, floor181y, floor182y, floor183y, floor184y,
floor185y, floor186y, floor187y, floor188y, floor189y, floor190y, floor191y,
floor192y, floor193y, floor194y, floor195y, floor196y, floor197y, floor198y,
floor199y, floor200y = 0;
float volume = 1.0f;
float tempVolume = 1.0f;
float tempVolumeA = 1.0f;
float tempVolumeB = 1.0f;
float pauseVolume = 1.0f;
float sfxVolume = 1.0f;
int stageCT = 0;
int splashInLocX = 0;
int splashInLocY = 0;
int splashOutLocX = 0;
int splashOutLocY = 0;
int waveCT = 0;
int waveFrame = 0;
int acidFrame = 0;
int slowWaterFrame = 0;
int slowWaterCT = 0;
int spikeDamage = 0;
int splashInCT = 0;
int splashInFrame = 0;
int splashOutCT = 0;
int splashOutFrame = 0;
int independentBackgroundXY = 0;
int waterLimit1, waterLimit2 = 0;
int breathTypeSix = 0;
int waterRisingPos = 0;
int obstacle1x, obstacle2x, obstacle3x, obstacle4x, obstacle5x, obstacle6x,
obstacle7x, obstacle8x, obstacle9x, obstacle10x = 0;
int obstacle1y, obstacle2y, obstacle3y, obstacle4y, obstacle5y, obstacle6y,
obstacle7y, obstacle8y, obstacle9y, obstacle10y = 0;
int waterfallCT = 0;
int waterfallFrame = 0;
int waterfall1Act = 0;
int waterfall2Act = 0;
int poolCT = 0;
int poolFrame = 0;
int houseVarAct = 0;
int dkcFall = 0;
//Title screen int
#region Title Screen int
int logoWait = 0; //title screen timer
int pointerX = 250; //title screen pointer X loc
int pointerY = 285; //title screen point Y loc
int titleTimer = 0; //title frame CT
int titleFrame = 0; //title background frame
int pointerLoc = 0; //determines option highlighted on main menu
int titleY = -400;
int titleFrameX = 0;
int titleFrameY = 0;
int titleCT = 0;
int optionsPointerX = 550;
int optionsPointerY = 285;
#endregion
//World map int
#region World Map Position int
int mapGridX = 5; //pos on map - see notes
int mapGridY = 1; //pos on map - see notes
int recallMapPosX = 870; //area vector2 X + 20
int recallMapPosY = 285; //area vector2 Y + 35
int mapFrame = 0;
int mapCT = 0;
int exitFrame = 0;
int worldMapCT = 0;
int worldMapFrame = 0;
#endregion
//HUD int
#region HUD int
int hpPip1 = 1;
int hpPip2 = 1;
int hpPip3 = 1;
int hpPip4 = 1;
int hpPip5 = 1;
int hpPip6 = 1;
int breathPip1 = 0;
int breathPip2 = 0;
int breathPip3 = 0;
int breathPip4 = 0;
int breathPip5 = 0;
int breathPip6 = 0;
int breathPip7 = 0;
int breathPip8 = 0;
int breathPip9 = 0;
int breathPip10 = 0;
int breathPip11 = 0;
int breathPip12 = 0;
#endregion
//Stage end int
#region Stage End int
int smokeFrame = 0;
int smokeCT = 0;
int fireFrame = 0;
int fireCT = 0;
int stageEndCT = 0;
#endregion
//Dragon animation and player input
#region Animation System int
int drgnFrame = 0; //DRAGON frame of animation based on drgnCT
int drgnAction = 0; //DRAGON sprite action on Y axis
int drgnX = 0; //DRAGON X pos
int drgnY = 0; //DRAGON Y pos
int drgnCT = 0; //cycles DRAGON frame of animation when drgnCT=6 --> 10
animations per second
int drgnY_CT = 0; //negative Y velocity++ when Y_CT=6
int drgnXvel = 2; //DRAGON knockback speed
int drgnYvel = 0; //DRAGON current Y velocity
int drgnDashing = 1; //DRAGON running frame CT divisor
#endregion
#region Core Stat int
int drgnHPMax = 6; //DRAGON HP
int drgnHPNow = 6; //DRAGON current HP
int drgnHPBonus = 0; //+HP from gold
int drgnHPTreasure1 = 0; //+HP from treasure
int drgnHPTreasure2 = 0;
int drgnHPLV = 0; //+HP from XP
int drgnHPXP = 0; //increases drgnHPLV
int drgnFlyMax = 120; //duration of flight
int drgnFlyNow = 0; //current duration of flight
int drgnFlyBonus = 0; //+drgnFlyMax from gold
int drgnFlyTreasure1 = 0; //+drgnFlyMax from treasure
int drgnFlyTreasure2 = 0;
int drgnFlyTreasure3 = 0;
int drgnFlyTreasure4 = 0;
int drgnFlyLV = 0; //+drgnFlyMax from XP
int drgnFlyXP = 0; //increases drgnFlyLV
int breathFrame = 0;
int breathMax = 300; //duration of breath
int breathNow = 300; //current duration of breath
int breathMaxBonus = 0; //+breathMax from gold
int breathMaxTreasure1 = 0; //+breathMax from treasure
int breathMaxTreasure2 = 0;
int breathMaxTreasure3 = 0;
int breathMaxLV = 0; //+breathMax from XP
int breathMaxXP = 0; //increases breathmaxLV
int breathDmg = 1; //damage of breath on hitbox collision
int breathDmgBonus = 0; //+breath damage from gold
int breathDmgTreasure1 = 0; //+breath damage from treasure
int breathDmgTreasure2 = 0;
int breathLV = 0; //+breath damage from XP
int breathXP = 0; //increases breathLV
int breathX = 110; //x-pos of breath attack
int breathY = 0; //y-pos of breath attack
int breathType = 0; //breath element (0 = fire, 1 = thunder, 2 = ice, 3 =
acid, 4 = smoke)
int breathDir = 0; //direction breath facing L or R (5 = L)
int breathTimer = 0; //counts up to breathCycle
int breathCycleBonus = 0; //decreases wait time from gold
int breathCycleTreasure = 0; //decreases wait time from treasure
int clawFrame = 0; //claw frame of animation
int clawDmg = 3; //damage of claw on hitbox collision
int clawDmgBonus = 0; //+claw damage from gold
int clawDmgTreasure1 = 0; //+claw damage from treasure
int clawDmgTreasure2 = 0;
int clawLV = 0; //+claw damage from XP
int clawXP = 0; //increases clawLV
int clawTimer = 0; //claw repeat rate
int clawSize = 0; //determines claw size on sprite sheet
int clawDir = 0; //determines claw facing L or R (2 = L)
int clawX = 127; //x-pos of claw attack
int clawY = 0; //y-pos of claw attack
#endregion
#region Additional Treasure int
int freezeTreasure = 1; //doubles duration of freeze
int freezeTimeBonus = 0;
int breathCritBonus = 1;
int spikeDRBonus = 0;
int spikeDRTreasure = 0;
int drgnDRTreasure1 = 0; //decreases damage taken
int drgnDRTreasure2 = 0;
int drgnDRBonus = 0;
int preserveGP = 0;
int acidArmorRedBonus = 0;
int acidArmorRedTreasure = 0;
int EXPReducer = 1;
int treasureShineCT = 0;
int treasureShineFrame = 0;
int treasurePickUpCT = 0;
#endregion
//dragon sprite int: facingdir, waittimer, damage done, damage received,
etc.
#region Dragon Sprite System int
int drgnFacingDir = 0; //if DRAGON is facing right or left, increase y-pos
on sprite sheet
int drgnWaitTimer = 0; //if player touches nothing, DRAGON's idle animation
int drgnInvTimer = 0; //counts DRAGON's invincibility franes
int drgnInvOpacity = 255; //makes DRAGON blink while invincible
int drgnKnockbackTimer = 0;
int totalDamage = 0;
int drgnHitTimer = 0;
int drgnDamageTaken = 0;
int damageCheck = 0;
int ducking = 1;
int duckingYMod = 0;
int clawhitboxsize = 60;
int clawhitboxmod = 0;
int drgnFacingHitbox = 0;
int clawCT = 0;
#endregion
//GP int
#region GP int
int goldNow = 0;
int goldAvailable = 0;
int goldTotal = 0;
#endregion
//level variables
#region Level Up Menu int
int atkLevel = 0;
int defLevel = 0;
int sptLevel = 0;
int atkPrice = 500;
int defPrice = 500;
int sptPrice = 500;
int levelPointerX = 0;
int levelPointerY = 0;
#endregion
//menu int
#region Menu int
int menuPos = 0;
int menuFrameStr = 0;
int menuFrameDef = 0;
int menuFrameSpt = 0;
int menuFrameBack = 0;
#endregion
//storybook int
#region Storybook int
int page1Depth = 0;
int storyFGFrameX1 = 0;
int storyFGFrameY1 = 0;
int page2Depth = 0;
int storyFGFrameX2 = 0;
int storyFGFrameY2 = 0;
int page3Depth = 0;
int storyFGFrameX3 = 0;
int storyFGFrameY3 = 0;
int page4Depth = 0;
int storyFGFrameX4 = 0;
int storyFGFrameY4 = 0;
int page5Depth = 0;
int storyFGFrameX5 = 0;
int storyFGFrameY5 = 0;
int page6Depth = 0;
int storyFGFrameX6 = 0;
int storyFGFrameY6 = 0;
int page7Depth = 0;
int storyFGFrameX7 = 0;
int storyFGFrameY7 = 0;
int storyTextFrameX = 0;
int storyTextFrameY = 0;
int storyTextTotal = 0;
int storyFGFrameCT = 0;
int pageTurnSFXWait = 0;
#endregion
//NPC CT
#region NPC int
int npc1Act = 0;
int npc1Frame = 0;
int npc1CT = 0;
int npc1VarAct = 0;
int npc1Facing = 0;
bool npc1FaceR = false;
int npc2Act = 0;
int npc2Frame = 0;
int npc2CT = 0;
int npc2VarAct = 0;
bool npc2FaceR = false;
int npc3Act = 0;
int npc3Frame = 0;
int npc3CT = 0;
int npc3VarAct = 0;
bool npc3FaceR = false;
int npc4Act = 0;
int npc4Frame = 0;
int npc4CT = 0;
int npc4VarAct = 0;
bool npc4FaceR = false;
int npc5Act = 0;
int npc5Frame = 0;
int npc5CT = 0;
int npc5VarAct = 0;
int npc6Act = 0;
int npc6Frame = 0;
int npc6CT = 0;
int npc6VarAct = 0;
int npc7Act = 0;
int npc7Frame = 0;
int npc7CT = 0;
int npc7VarAct = 0;
int npc8Act = 0;
int npc8Frame = 0;
int npc8CT = 0;
int npc8VarAct = 0;
int npc9Act = 0;
int npc9Frame = 0;
int npc9CT = 0;
int npc9VarAct = 0;
int npcQuest = 0;
#endregion
//enemy HP, position, CT. etc.
#region Enemy int
int e1HP = 0; //enemy 1 HP
int e1arm = 0; //enemy 1 armor
int e1CT = 0; //enemy 1 frame counter
int e1Y_CT = 0; //enemy 1 velocity timer
int e1timer = 0; //enemy 1 action timer
int e1invTimer = 0; //enemy 1 invincibility timer
int e1X = 0; //enemy 1 X-pos
int e1Y = 0; //enemy 1 Y-pos
int e1Yvel = 0; //enemy 1 Y-velocity
int e1R = 0; //enemy 1 -R value
int e1G = 0; //enemy 1 -G value
int e1Opacity = 255; //enemy 1 opacity
int e1frame = 0; //determines frame of animation for enemy 1
int e1act = 0; //determines type of animation (move, wait, attack, etc.)
int e1facing = 0; //determines direction enemy 1 is facing
int e1projA_X = 0; //determines enemy 1's projectile A X-pos
int e1projA_Y = 0; //determines enemy 1's projectile A Y-pos
int e1projA_frame = 0; //determines e1 projectile A frame of animation
int e1projA_dir = 0; //determines e1 projectile A orientation
int e1invBlink = 255; //makes e1 blink when invulnerable
int e1knockbackTimer = 0;
int e1hitTimer = 0;
int e1Attack = 0;
int e1armor = 0;
int e1armorRed = 0;
int e1FreezeColor = 0;
int e1FreezeCT = 0;
int e1smokeCT = 0;
int e1smokeFrame = 0;
int e1coinValue = 0;
int e1coinCT = 0;
int e1coinFrame = 0;
int e1coinType = 0;
int e1FireVul = 0;
int e1BoltVul = 0;
int e1AcidVul = 0;
int e1altAnimCT = 0;
int e2HP = 0;
int e2arm = 0;
int e2CT = 0;
int e2Y_CT = 0;
int e2timer = 0;
int e2invTimer = 0;
int e2X = 0;
int e2Y = 0;
int e2Yvel = 0;
int e2R = 0;
int e2G = 0;
int e2Opacity = 255;
int e2frame = 0;
int e2act = 0;
int e2facing = 0;
int e2projA_X = 0;
int e2projA_Y = 0;
int e2projA_frame = 0;
int e2projA_dir = 0;
int e2invBlink = 255;
int e2knockbackTimer = 0;
int e2hitTimer = 0;
int e2Attack = 0;
int e2armor = 0;
int e2armorRed = 0;
int e2FreezeColor = 0;
int e2FreezeCT = 0;
int e2smokeCT = 0;
int e2smokeFrame = 0;
int e2coinValue = 0;
int e2coinCT = 0;
int e2coinFrame = 0;
int e2coinType = 0;
int e2FireVul = 0;
int e2BoltVul = 0;
int e2AcidVul = 0;
int e2altAnimCT = 0;
int e3HP = 0;
int e3arm = 0;
int e3CT = 0;
int e3Y_CT = 0;
int e3timer = 0;
int e3invTimer = 0;
int e3X = 0;
int e3Y = 0;
int e3Yvel = 0;
int e3R = 0;
int e3G = 0;
int e3Opacity = 255;
int e3frame = 0;
int e3act = 0;
int e3facing = 0;
int e3projA_X = 0;
int e3projA_Y = 0;
int e3projA_frame = 0;
int e3projA_dir = 0;
int e3invBlink = 255;
int e3knockbackTimer = 0;
int e3hitTimer = 0;
int e3Attack = 0;
int e3armor = 0;
int e3armorRed = 0;
int e3FreezeColor = 0;
int e3FreezeCT = 0;
int e3smokeCT = 0;
int e3smokeFrame = 0;
int e3coinValue = 0;
int e3coinCT = 0;
int e3coinFrame = 0;
int e3coinType = 0;
int e3FireVul = 0;
int e3BoltVul = 0;
int e3AcidVul = 0;
int e3altAnimCT = 0;
int e4HP = 0;
int e4arm = 0;
int e4CT = 0;
int e4Y_CT = 0;
int e4timer = 0;
int e4invTimer = 0;
int e4X = 0;
int e4Y = 0;
int e4Yvel = 0;
int e4R = 0;
int e4G = 0;
int e4Opacity = 255;
int e4frame = 0;
int e4act = 0;
int e4facing = 0;
int e4projA_X = 0;
int e4projA_Y = 0;
int e4projA_frame = 0;
int e4projA_dir = 0;
int e4invBlink = 255;
int e4knockbackTimer = 0;
int e4hitTimer = 0;
int e4Attack = 0;
int e4armor = 0;
int e4armorRed = 0;
int e4FreezeColor = 0;
int e4FreezeCT = 0;
int e4smokeCT = 0;
int e4smokeFrame = 0;
int e4coinValue = 0;
int e4coinCT = 0;
int e4coinFrame = 0;
int e4coinType = 0;
int e4FireVul = 0;
int e4BoltVul = 0;
int e4AcidVul = 0;
int e4altAnimCT = 0;
int e5HP = 0;
int e5arm = 0;
int e5CT = 0;
int e5Y_CT = 0;
int e5timer = 0;
int e5invTimer = 0;
int e5X = 0;
int e5Y = 0;
int e5Yvel = 0;
int e5R = 0;
int e5G = 0;
int e5Opacity = 255;
int e5frame = 0;
int e5act = 0;
int e5facing = 0;
int e5projA_X = 0;
int e5projA_Y = 0;
int e5projA_frame = 0;
int e5projA_dir = 0;
int e5invBlink = 255;
int e5knockbackTimer = 0;
int e5hitTimer = 0;
int e5Attack = 0;
int e5armor = 0;
int e5armorRed = 0;
int e5FreezeColor = 0;
int e5FreezeCT = 0;
int e5smokeCT = 0;
int e5smokeFrame = 0;
int e5coinValue = 0;
int e5coinCT = 0;
int e5coinFrame = 0;
int e5coinType = 0;
int e5FireVul = 0;
int e5BoltVul = 0;
int e5AcidVul = 0;
int e5altAnimCT = 0;
int e6HP = 0;
int e6arm = 0;
int e6CT = 0;
int e6Y_CT = 0;
int e6timer = 0;
int e6invTimer = 0;
int e6X = 0;
int e6Y = 0;
int e6Yvel = 0;
int e6R = 0;
int e6G = 0;
int e6Opacity = 255;
int e6frame = 0;
int e6act = 0;
int e6facing = 0;
int e6projA_X = 0;
int e6projA_Y = 0;
int e6projA_frame = 0;
int e6projA_dir = 0;
int e6invBlink = 255;
int e6knockbackTimer = 0;
int e6hitTimer = 0;
int e6Attack = 0;
int e6armor = 0;
int e6armorRed = 0;
int e6FreezeColor = 0;
int e6FreezeCT = 0;
int e6smokeCT = 0;
int e6smokeFrame = 0;
int e6coinValue = 0;
int e6coinCT = 0;
int e6coinFrame = 0;
int e6coinType = 0;
int e6FireVul = 0;
int e6BoltVul = 0;
int e6AcidVul = 0;
int e6altAnimCT = 0;
int e7HP = 0;
int e7arm = 0;
int e7CT = 0;
int e7Y_CT = 0;
int e7timer = 0;
int e7invTimer = 0;
int e7X = 0;
int e7Y = 0;
int e7Yvel = 0;
int e7R = 0;
int e7G = 0;
int e7Opacity = 255;
int e7frame = 0;
int e7act = 0;
int e7facing = 0;
int e7projA_X = 0;
int e7projA_Y = 0;
int e7projA_frame = 0;
int e7projA_dir = 0;
int e7invBlink = 255;
int e7knockbackTimer = 0;
int e7hitTimer = 0;
int e7Attack = 0;
int e7armor = 0;
int e7armorRed = 0;
int e7FreezeColor = 0;
int e7FreezeCT = 0;
int e7smokeCT = 0;
int e7smokeFrame = 0;
int e7coinValue = 0;
int e7coinCT = 0;
int e7coinFrame = 0;
int e7coinType = 0;
int e7FireVul = 0;
int e7BoltVul = 0;
int e7AcidVul = 0;
int e7altAnimCT = 0;
int e8HP = 0;
int e8arm = 0;
int e8CT = 0;
int e8Y_CT = 0;
int e8timer = 0;
int e8invTimer = 0;
int e8X = 0;
int e8Y = 0;
int e8Yvel = 0;
int e8R = 0;
int e8G = 0;
int e8Opacity = 255;
int e8frame = 0;
int e8act = 0;
int e8facing = 0;
int e8projA_X = 0;
int e8projA_Y = 0;
int e8projA_frame = 0;
int e8projA_dir = 0;
int e8invBlink = 255;
int e8knockbackTimer = 0;
int e8hitTimer = 0;
int e8Attack = 0;
int e8armor = 0;
int e8armorRed = 0;
int e8FreezeColor = 0;
int e8FreezeCT = 0;
int e8smokeCT = 0;
int e8smokeFrame = 0;
int e8coinValue = 0;
int e8coinCT = 0;
int e8coinFrame = 0;
int e8coinType = 0;
int e8FireVul = 0;
int e8BoltVul = 0;
int e8AcidVul = 0;
int e8altAnimCT = 0;
int e9HP = 0;
int e9arm = 0;
int e9CT = 0;
int e9Y_CT = 0;
int e9timer = 0;
int e9invTimer = 0;
int e9X = 0;
int e9Y = 0;
int e9Yvel = 0;
int e9R = 0;
int e9G = 0;
int e9Opacity = 255;
int e9frame = 0;
int e9act = 0;
int e9facing = 0;
int e9projA_X = 0;
int e9projA_Y = 0;
int e9projA_frame = 0;
int e9projA_dir = 0;
int e9invBlink = 255;
int e9knockbackTimer = 0;
int e9hitTimer = 0;
int e9Attack = 0;
int e9armor = 0;
int e9armorRed = 0;
int e9FreezeColor = 0;
int e9FreezeCT = 0;
int e9smokeCT = 0;
int e9smokeFrame = 0;
int e9coinValue = 0;
int e9coinCT = 0;
int e9coinFrame = 0;
int e9coinType = 0;
int e9FireVul = 0;
int e9BoltVul = 0;
int e9AcidVul = 0;
int e9altAnimCT = 0;
int e10HP = 0;
int e10arm = 0;
int e10CT = 0;
int e10Y_CT = 0;
int e10timer = 0;
int e10invTimer = 0;
int e10X = 0;
int e10Y = 0;
int e10Yvel = 0;
int e10R = 0;
int e10G = 0;
int e10Opacity = 255;
int e10frame = 0;
int e10act = 0;
int e10facing = 0;
int e10projA_X = 0;
int e10projA_Y = 0;
int e10projA_frame = 0;
int e10projA_dir = 0;
int e10invBlink = 255;
int e10knockbackTimer = 0;
int e10hitTimer = 0;
int e10Attack = 0;
int e10armor = 0;
int e10armorRed = 0;
int e10FreezeColor = 0;
int e10FreezeCT = 0;
int e10smokeCT = 0;
int e10smokeFrame = 0;
int e10coinValue = 0;
int e10coinCT = 0;
int e10coinFrame = 0;
int e10coinType = 0;
int e10FireVul = 0;
int e10BoltVul = 0;
int e10AcidVul = 0;
int e10altAnimCT = 0;
int e1sparkleFr = 0;
int e1sparkleCT = 0;
int e2sparkleFr = 0;
int e2sparkleCT = 0;
int e3sparkleFr = 0;
int e3sparkleCT = 0;
int e4sparkleFr = 0;
int e4sparkleCT = 0;
int e5sparkleFr = 0;
int e5sparkleCT = 0;
int e6sparkleFr = 0;
int e6sparkleCT = 0;
int e7sparkleFr = 0;
int e7sparkleCT = 0;
int e8sparkleFr = 0;
int e8sparkleCT = 0;
int e9sparkleFr = 0;
int e9sparkleCT = 0;
int e10sparkleFr = 0;
int e10sparkleCT = 0;
int e1sparkleCycle = 0;
int e2sparkleCycle = 0;
int e3sparkleCycle = 0;
int e4sparkleCycle = 0;
int e5sparkleCycle = 0;
int e6sparkleCycle = 0;
int e7sparkleCycle = 0;
int e8sparkleCycle = 0;
int e9sparkleCycle = 0;
int e10sparkleCycle = 0;
int e1plinkFr = 0;
int e1plinkCT = 0;
int e2plinkFr = 0;
int e2plinkCT = 0;
int e3plinkFr = 0;
int e3plinkCT = 0;
int e4plinkFr = 0;
int e4plinkCT = 0;
int e5plinkFr = 0;
int e5plinkCT = 0;
int e6plinkFr = 0;
int e6plinkCT = 0;
int e7plinkFr = 0;
int e7plinkCT = 0;
int e8plinkFr = 0;
int e8plinkCT = 0;
int e9plinkFr = 0;
int e9plinkCT = 0;
int e10plinkFr = 0;
int e10plinkCT = 0;
int e1plinkCycle = 0;
int e2plinkCycle = 0;
int e3plinkCycle = 0;
int e4plinkCycle = 0;
int e5plinkCycle = 0;
int e6plinkCycle = 0;
int e7plinkCycle = 0;
int e8plinkCycle = 0;
int e9plinkCycle = 0;
int e10plinkCycle = 0;
int e1reload = 0;
int e2reload = 0;
int e3reload = 0;
int e4reload = 0;
int e5reload = 0;
int e6reload = 0;
int e7reload = 0;
int e8reload = 0;
int e9reload = 0;
int e10reload = 0;
int e1FrameHalf = 1;
int e2FrameHalf = 1;
int e3FrameHalf = 1;
int e4FrameHalf = 1;
int e5FrameHalf = 1;
int e6FrameHalf = 1;
int e7FrameHalf = 1;
int e8FrameHalf = 1;
int e9FrameHalf = 1;
int e10FrameHalf = 1;
int e1projVelX = 0;
int e1projVelY = 0;
int e2projVelX = 0;
int e2projVelY = 0;
int e3projVelX = 0;
int e3projVelY = 0;
int e4projVelX = 0;
int e4projVelY = 0;
int e5projVelX = 0;
int e5projVelY = 0;
int e6projVelX = 0;
int e6projVelY = 0;
int e7projVelX = 0;
int e7projVelY = 0;
int e8projVelX = 0;
int e8projVelY = 0;
int e9projVelX = 0;
int e9projVelY = 0;
int e10projVelX = 0;
int e10projVelY = 0;
int e1burnTimer, e2burnTimer, e3burnTimer, e4burnTimer, e5burnTimer,
e6burnTimer, e7burnTimer, e8burnTimer, e9burnTimer, e10burnTimer = 0;
int e1burnCT, e2burnCT, e3burnCT, e4burnCT, e5burnCT, e6burnCT, e7burnCT,
e8burnCT, e9burnCT, e10burnCT = 0;
int e1burnFrame, e2burnFrame, e3burnFrame, e4burnFrame, e5burnFrame,
e6burnFrame, e7burnFrame, e8burnFrame, e9burnFrame, e10burnFrame = 0;
int e1shockTimer, e2shockTimer, e3shockTimer, e4shockTimer, e5shockTimer,
e6shockTimer, e7shockTimer, e8shockTimer, e9shockTimer, e10shockTimer = 0;
int e1shockCT, e2shockCT, e3shockCT, e4shockCT, e5shockCT, e6shockCT,
e7shockCT, e8shockCT, e9shockCT, e10shockCT = 0;
int e1shockFrame, e2shockFrame, e3shockFrame, e4shockFrame, e5shockFrame,
e6shockFrame, e7shockFrame, e8shockFrame, e9shockFrame, e10shockFrame = 0;
int e1projWidth = 0;
int e1projHeight = 0;
int e2projWidth = 0;
int e2projHeight = 0;
int e3projWidth = 0;
int e3projHeight = 0;
int e4projWidth = 0;
int e4projHeight = 0;
int e5projWidth = 0;
int e5projHeight = 0;
int e6projWidth = 0;
int e6projHeight = 0;
int e7projWidth = 0;
int e7projHeight = 0;
int e8projWidth = 0;
int e8projHeight = 0;
int e9projWidth = 0;
int e9projHeight = 0;
int e10projWidth = 0;
int e10projHeight = 0;
int e1projOrigX = 0;
int e1projOrigY = 0;
int e2projOrigX = 0;
int e2projOrigY = 0;
int e3projOrigX = 0;
int e3projOrigY = 0;
int e4projOrigX = 0;
int e4projOrigY = 0;
int e5projOrigX = 0;
int e5projOrigY = 0;
int e6projOrigX = 0;
int e6projOrigY = 0;
int e7projOrigX = 0;
int e7projOrigY = 0;
int e8projOrigX = 0;
int e8projOrigY = 0;
int e9projOrigX = 0;
int e9projOrigY = 0;
int e10projOrigX = 0;
int e10projOrigY = 0;
int e1projCT = 0;
int e2projCT = 0;
int e3projCT = 0;
int e4projCT = 0;
int e5projCT = 0;
int e6projCT = 0;
int e7projCT = 0;
int e8projCT = 0;
int e9projCT = 0;
int e10projCT = 0;
int e11projCT = 0;
int e12projCT = 0;
int e13projCT = 0;
int e14projCT = 0;
int e15projCT = 0;
int e16projCT = 0;
int e17projCT = 0;
int e18projCT = 0;
int e19projCT = 0;
int e20projCT = 0;
int e21projCT = 0;
int e22projCT = 0;
int e23projCT = 0;
int e24projCT = 0;
int e25projCT = 0;
int e26projCT = 0;
int e27projCT = 0;
int e28projCT = 0;
int e29projCT = 0;
int e30projCT = 0;
int e11HP = 0; //enemy 1 HP
int e11arm = 0; //enemy 1 armor
int e11CT = 0; //enemy 1 frame counter
int e11Y_CT = 0; //enemy 1 velocity timer
int e11timer = 0; //enemy 1 action timer
int e11invTimer = 0; //enemy 1 invincibility timer
int e11X = 0; //enemy 1 X-pos
int e11Y = 0; //enemy 1 Y-pos
int e11Yvel = 0; //enemy 1 Y-velocity
int e11R = 0; //enemy 1 -R value
int e11G = 0; //enemy 1 -G value
int e11Opacity = 255; //enemy 1 opacity
int e11frame = 0; //determines frame of animation for e1nemy 1
int e11act = 0; //determines type of animation (move, wait, attack, e1tc.)
int e11facing = 0; //determines direction e1nemy 1 is facing
int e11projA_X = 0; //determines e1nemy 1's projectile A X-pos
int e11projA_Y = 0; //determines e1nemy 1's projectile A Y-pos
int e11projA_frame = 0; //determines e11 projectile A frame of animation
int e11projA_dir = 0; //determines e11 projectile A orientation
int e11invBlink = 255; //makes e11 blink when invulnerable
int e11knockbackTimer = 0;
int e11hitTimer = 0;
int e11Attack = 0;
int e11armor = 0;
int e11armorRed = 0;
int e11FreezeColor = 0;
int e11FreezeCT = 0;
int e11smokeCT = 0;
int e11smokeFrame = 0;
int e11coinValue = 0;
int e11coinCT = 0;
int e11coinFrame = 0;
int e11coinType = 0;
int e11FireVul = 0;
int e11BoltVul = 0;
int e11AcidVul = 0;
int e11altAnimCT = 0;
int e12HP = 0;
int e12arm = 0;
int e12CT = 0;
int e12Y_CT = 0;
int e12timer = 0;
int e12invTimer = 0;
int e12X = 0;
int e12Y = 0;
int e12Yvel = 0;
int e12R = 0;
int e12G = 0;
int e12Opacity = 255;
int e12frame = 0;
int e12act = 0;
int e12facing = 0;
int e12projA_X = 0;
int e12projA_Y = 0;
int e12projA_frame = 0;
int e12projA_dir = 0;
int e12invBlink = 255;
int e12knockbackTimer = 0;
int e12hitTimer = 0;
int e12Attack = 0;
int e12armor = 0;
int e12armorRed = 0;
int e12FreezeColor = 0;
int e12FreezeCT = 0;
int e12smokeCT = 0;
int e12smokeFrame = 0;
int e12coinValue = 0;
int e12coinCT = 0;
int e12coinFrame = 0;
int e12coinType = 0;
int e12FireVul = 0;
int e12BoltVul = 0;
int e12AcidVul = 0;
int e12altAnimCT = 0;
int e13HP = 0;
int e13arm = 0;
int e13CT = 0;
int e13Y_CT = 0;
int e13timer = 0;
int e13invTimer = 0;
int e13X = 0;
int e13Y = 0;
int e13Yvel = 0;
int e13R = 0;
int e13G = 0;
int e13Opacity = 255;
int e13frame = 0;
int e13act = 0;
int e13facing = 0;
int e13projA_X = 0;
int e13projA_Y = 0;
int e13projA_frame = 0;
int e13projA_dir = 0;
int e13invBlink = 255;
int e13knockbackTimer = 0;
int e13hitTimer = 0;
int e13Attack = 0;
int e13armor = 0;
int e13armorRed = 0;
int e13FreezeColor = 0;
int e13FreezeCT = 0;
int e13smokeCT = 0;
int e13smokeFrame = 0;
int e13coinValue = 0;
int e13coinCT = 0;
int e13coinFrame = 0;
int e13coinType = 0;
int e13FireVul = 0;
int e13BoltVul = 0;
int e13AcidVul = 0;
int e13altAnimCT = 0;
int e14HP = 0;
int e14arm = 0;
int e14CT = 0;
int e14Y_CT = 0;
int e14timer = 0;
int e14invTimer = 0;
int e14X = 0;
int e14Y = 0;
int e14Yvel = 0;
int e14R = 0;
int e14G = 0;
int e14Opacity = 255;
int e14frame = 0;
int e14act = 0;
int e14facing = 0;
int e14projA_X = 0;
int e14projA_Y = 0;
int e14projA_frame = 0;
int e14projA_dir = 0;
int e14invBlink = 255;
int e14knockbackTimer = 0;
int e14hitTimer = 0;
int e14Attack = 0;
int e14armor = 0;
int e14armorRed = 0;
int e14FreezeColor = 0;
int e14FreezeCT = 0;
int e14smokeCT = 0;
int e14smokeFrame = 0;
int e14coinValue = 0;
int e14coinCT = 0;
int e14coinFrame = 0;
int e14coinType = 0;
int e14FireVul = 0;
int e14BoltVul = 0;
int e14AcidVul = 0;
int e14altAnimCT = 0;
int e15HP = 0;
int e15arm = 0;
int e15CT = 0;
int e15Y_CT = 0;
int e15timer = 0;
int e15invTimer = 0;
int e15X = 0;
int e15Y = 0;
int e15Yvel = 0;
int e15R = 0;
int e15G = 0;
int e15Opacity = 255;
int e15frame = 0;
int e15act = 0;
int e15facing = 0;
int e15projA_X = 0;
int e15projA_Y = 0;
int e15projA_frame = 0;
int e15projA_dir = 0;
int e15invBlink = 255;
int e15knockbackTimer = 0;
int e15hitTimer = 0;
int e15Attack = 0;
int e15armor = 0;
int e15armorRed = 0;
int e15FreezeColor = 0;
int e15FreezeCT = 0;
int e15smokeCT = 0;
int e15smokeFrame = 0;
int e15coinValue = 0;
int e15coinCT = 0;
int e15coinFrame = 0;
int e15coinType = 0;
int e15FireVul = 0;
int e15BoltVul = 0;
int e15AcidVul = 0;
int e15altAnimCT = 0;
int e16HP = 0;
int e16arm = 0;
int e16CT = 0;
int e16Y_CT = 0;
int e16timer = 0;
int e16invTimer = 0;
int e16X = 0;
int e16Y = 0;
int e16Yvel = 0;
int e16R = 0;
int e16G = 0;
int e16Opacity = 255;
int e16frame = 0;
int e16act = 0;
int e16facing = 0;
int e16projA_X = 0;
int e16projA_Y = 0;
int e16projA_frame = 0;
int e16projA_dir = 0;
int e16invBlink = 255;
int e16knockbackTimer = 0;
int e16hitTimer = 0;
int e16Attack = 0;
int e16armor = 0;
int e16armorRed = 0;
int e16FreezeColor = 0;
int e16FreezeCT = 0;
int e16smokeCT = 0;
int e16smokeFrame = 0;
int e16coinValue = 0;
int e16coinCT = 0;
int e16coinFrame = 0;
int e16coinType = 0;
int e16FireVul = 0;
int e16BoltVul = 0;
int e16AcidVul = 0;
int e16altAnimCT = 0;
int e17HP = 0;
int e17arm = 0;
int e17CT = 0;
int e17Y_CT = 0;
int e17timer = 0;
int e17invTimer = 0;
int e17X = 0;
int e17Y = 0;
int e17Yvel = 0;
int e17R = 0;
int e17G = 0;
int e17Opacity = 255;
int e17frame = 0;
int e17act = 0;
int e17facing = 0;
int e17projA_X = 0;
int e17projA_Y = 0;
int e17projA_frame = 0;
int e17projA_dir = 0;
int e17invBlink = 255;
int e17knockbackTimer = 0;
int e17hitTimer = 0;
int e17Attack = 0;
int e17armor = 0;
int e17armorRed = 0;
int e17FreezeColor = 0;
int e17FreezeCT = 0;
int e17smokeCT = 0;
int e17smokeFrame = 0;
int e17coinValue = 0;
int e17coinCT = 0;
int e17coinFrame = 0;
int e17coinType = 0;
int e17FireVul = 0;
int e17BoltVul = 0;
int e17AcidVul = 0;
int e17altAnimCT = 0;
int e18HP = 0;
int e18arm = 0;
int e18CT = 0;
int e18Y_CT = 0;
int e18timer = 0;
int e18invTimer = 0;
int e18X = 0;
int e18Y = 0;
int e18Yvel = 0;
int e18R = 0;
int e18G = 0;
int e18Opacity = 255;
int e18frame = 0;
int e18act = 0;
int e18facing = 0;
int e18projA_X = 0;
int e18projA_Y = 0;
int e18projA_frame = 0;
int e18projA_dir = 0;
int e18invBlink = 255;
int e18knockbackTimer = 0;
int e18hitTimer = 0;
int e18Attack = 0;
int e18armor = 0;
int e18armorRed = 0;
int e18FreezeColor = 0;
int e18FreezeCT = 0;
int e18smokeCT = 0;
int e18smokeFrame = 0;
int e18coinValue = 0;
int e18coinCT = 0;
int e18coinFrame = 0;
int e18coinType = 0;
int e18FireVul = 0;
int e18BoltVul = 0;
int e18AcidVul = 0;
int e18altAnimCT = 0;
int e19HP = 0;
int e19arm = 0;
int e19CT = 0;
int e19Y_CT = 0;
int e19timer = 0;
int e19invTimer = 0;
int e19X = 0;
int e19Y = 0;
int e19Yvel = 0;
int e19R = 0;
int e19G = 0;
int e19Opacity = 255;
int e19frame = 0;
int e19act = 0;
int e19facing = 0;
int e19projA_X = 0;
int e19projA_Y = 0;
int e19projA_frame = 0;
int e19projA_dir = 0;
int e19invBlink = 255;
int e19knockbackTimer = 0;
int e19hitTimer = 0;
int e19Attack = 0;
int e19armor = 0;
int e19armorRed = 0;
int e19FreezeColor = 0;
int e19FreezeCT = 0;
int e19smokeCT = 0;
int e19smokeFrame = 0;
int e19coinValue = 0;
int e19coinCT = 0;
int e19coinFrame = 0;
int e19coinType = 0;
int e19FireVul = 0;
int e19BoltVul = 0;
int e19AcidVul = 0;
int e19altAnimCT = 0;
int e20HP = 0;
int e20arm = 0;
int e20CT = 0;
int e20Y_CT = 0;
int e20timer = 0;
int e20invTimer = 0;
int e20X = 0;
int e20Y = 0;
int e20Yvel = 0;
int e20R = 0;
int e20G = 0;
int e20Opacity = 255;
int e20frame = 0;
int e20act = 0;
int e20facing = 0;
int e20projA_X = 0;
int e20projA_Y = 0;
int e20projA_frame = 0;
int e20projA_dir = 0;
int e20invBlink = 255;
int e20knockbackTimer = 0;
int e20hitTimer = 0;
int e20Attack = 0;
int e20armor = 0;
int e20armorRed = 0;
int e20FreezeColor = 0;
int e20FreezeCT = 0;
int e20smokeCT = 0;
int e20smokeFrame = 0;
int e20coinValue = 0;
int e20coinCT = 0;
int e20coinFrame = 0;
int e20coinType = 0;
int e20FireVul = 0;
int e20BoltVul = 0;
int e20AcidVul = 0;
int e20altAnimCT = 0;
int e11sparkleFr = 0;
int e11sparkleCT = 0;
int e12sparkleFr = 0;
int e12sparkleCT = 0;
int e13sparkleFr = 0;
int e13sparkleCT = 0;
int e14sparkleFr = 0;
int e14sparkleCT = 0;
int e15sparkleFr = 0;
int e15sparkleCT = 0;
int e16sparkleFr = 0;
int e16sparkleCT = 0;
int e17sparkleFr = 0;
int e17sparkleCT = 0;
int e18sparkleFr = 0;
int e18sparkleCT = 0;
int e19sparkleFr = 0;
int e19sparkleCT = 0;
int e20sparkleFr = 0;
int e20sparkleCT = 0;
int e11sparkleCycle = 0;
int e12sparkleCycle = 0;
int e13sparkleCycle = 0;
int e14sparkleCycle = 0;
int e15sparkleCycle = 0;
int e16sparkleCycle = 0;
int e17sparkleCycle = 0;
int e18sparkleCycle = 0;
int e19sparkleCycle = 0;
int e20sparkleCycle = 0;
int e11plinkFr = 0;
int e11plinkCT = 0;
int e12plinkFr = 0;
int e12plinkCT = 0;
int e13plinkFr = 0;
int e13plinkCT = 0;
int e14plinkFr = 0;
int e14plinkCT = 0;
int e15plinkFr = 0;
int e15plinkCT = 0;
int e16plinkFr = 0;
int e16plinkCT = 0;
int e17plinkFr = 0;
int e17plinkCT = 0;
int e18plinkFr = 0;
int e18plinkCT = 0;
int e19plinkFr = 0;
int e19plinkCT = 0;
int e20plinkFr = 0;
int e20plinkCT = 0;
int e11plinkCycle = 0;
int e12plinkCycle = 0;
int e13plinkCycle = 0;
int e14plinkCycle = 0;
int e15plinkCycle = 0;
int e16plinkCycle = 0;
int e17plinkCycle = 0;
int e18plinkCycle = 0;
int e19plinkCycle = 0;
int e20plinkCycle = 0;
int e11reload = 0;
int e12reload = 0;
int e13reload = 0;
int e14reload = 0;
int e15reload = 0;
int e16reload = 0;
int e17reload = 0;
int e18reload = 0;
int e19reload = 0;
int e20reload = 0;
int e11FrameHalf = 1;
int e12FrameHalf = 1;
int e13FrameHalf = 1;
int e14FrameHalf = 1;
int e15FrameHalf = 1;
int e16FrameHalf = 1;
int e17FrameHalf = 1;
int e18FrameHalf = 1;
int e19FrameHalf = 1;
int e20FrameHalf = 1;
int e11projVelX = 0;
int e11projVelY = 0;
int e12projVelX = 0;
int e12projVelY = 0;
int e13projVelX = 0;
int e13projVelY = 0;
int e14projVelX = 0;
int e14projVelY = 0;
int e15projVelX = 0;
int e15projVelY = 0;
int e16projVelX = 0;
int e16projVelY = 0;
int e17projVelX = 0;
int e17projVelY = 0;
int e18projVelX = 0;
int e18projVelY = 0;
int e19projVelX = 0;
int e19projVelY = 0;
int e20projVelX = 0;
int e20projVelY = 0;
int e11burnTimer, e12burnTimer, e13burnTimer, e14burnTimer, e15burnTimer,
e16burnTimer, e17burnTimer, e18burnTimer, e19burnTimer, e20burnTimer = 0;
int e11burnCT, e12burnCT, e13burnCT, e14burnCT, e15burnCT, e16burnCT,
e17burnCT, e18burnCT, e19burnCT, e20burnCT = 0;
int e11burnFrame, e12burnFrame, e13burnFrame, e14burnFrame, e15burnFrame,
e16burnFrame, e17burnFrame, e18burnFrame, e19burnFrame, e20burnFrame = 0;
int e11shockTimer, e12shockTimer, e13shockTimer, e14shockTimer,
e15shockTimer, e16shockTimer, e17shockTimer, e18shockTimer, e19shockTimer,
e20shockTimer = 0;
int e11shockCT, e12shockCT, e13shockCT, e14shockCT, e15shockCT, e16shockCT,
e17shockCT, e18shockCT, e19shockCT, e20shockCT = 0;
int e11shockFrame, e12shockFrame, e13shockFrame, e14shockFrame,
e15shockFrame, e16shockFrame, e17shockFrame, e18shockFrame, e19shockFrame,
e20shockFrame = 0;
int e11projWidth = 0;
int e11projHeight = 0;
int e12projWidth = 0;
int e12projHeight = 0;
int e13projWidth = 0;
int e13projHeight = 0;
int e14projWidth = 0;
int e14projHeight = 0;
int e15projWidth = 0;
int e15projHeight = 0;
int e16projWidth = 0;
int e16projHeight = 0;
int e17projWidth = 0;
int e17projHeight = 0;
int e18projWidth = 0;
int e18projHeight = 0;
int e19projWidth = 0;
int e19projHeight = 0;
int e20projWidth = 0;
int e20projHeight = 0;
int e11projOrigX = 0;
int e11projOrigY = 0;
int e12projOrigX = 0;
int e12projOrigY = 0;
int e13projOrigX = 0;
int e13projOrigY = 0;
int e14projOrigX = 0;
int e14projOrigY = 0;
int e15projOrigX = 0;
int e15projOrigY = 0;
int e16projOrigX = 0;
int e16projOrigY = 0;
int e17projOrigX = 0;
int e17projOrigY = 0;
int e18projOrigX = 0;
int e18projOrigY = 0;
int e19projOrigX = 0;
int e19projOrigY = 0;
int e20projOrigX = 0;
int e20projOrigY = 0;
#endregion
//camera position, fade, etc.
#region Camera int
int cameraX = 640; //camera base x-pos
int cameraY = 360; //camera base y-pos
int drgnCamX = 0; //camera x-pos modifier based on DRAGON's x position
int drgnCamY = 0; //camera y-pos modifier based on DRAGON's y position
int drgnCamVel = 0;
int cameraMaxX = 2000;
int cameraMaxY = 900;
int cameraMinY = 0;
int opacity = 0; //opacity of black matte for screen transitions
int fadeCT = 0;
#endregion
#region Level Up Data
int drgnDRTotal, drgnBreathTotal, drgnClawTotal, printHPMax = 0;
#endregion
#region explosion int
int exp1CT = 0;
int exp1Frame = 0;
int exp2CT = 0;
int exp2Frame = 0;
int exp3CT = 0;
int exp3Frame = 0;
int exp4CT = 0;
int exp4Frame = 0;
int exp5CT = 0;
int exp5Frame = 0;
int exp6CT = 0;
int exp6Frame = 0;
int exp1Wait = 0;
int exp2Wait = 0;
int exp3Wait = 0;
int exp4Wait = 0;
int exp5Wait = 0;
int exp6Wait = 0;
int exp1X = 0;
int exp1Y = 0;
int exp2X = 0;
int exp2Y = 0;
int exp3X = 0;
int exp3Y = 0;
int exp4X = 0;
int exp4Y = 0;
int exp5X = 0;
int exp5Y = 0;
int exp6X = 0;
int exp6Y = 0;
#endregion
int storyOpacity = 0;
int storyOpacityCT = 0;
int overlayOpacity = 0;
int overlayCT = 0;
int eventWait = 0;
int eventXVel = 0;
int eventYVel = 0;
int defeatCT = 0;
int warpCT = 0;
int warpFrame = 0;
int treasureWindowCT = 0;
int treasureWindowFrame = 0;
int treasureWindowX = -150;
int blackMatteOpacity = 0;
int whiteMatteOpacity = 0;
int hoardAmt = 0;
#endregion
#region All bool
bool steamAPIOn = false;
bool actionStagePause = false;
bool updateGold = false;
bool boss1NoDmg = false;
bool boss2NoDmg = false;
bool boss3NoDmg = false;
bool boss4NoDmg = false;
bool boss5NoDmg = false;
bool assignKey = false;
bool tutorialOn = false;
bool seenTutorial = false;
bool showPause = false;
bool fontTypeOn = false;
bool bonusOn = false;
bool skipStory = false;
bool hovercraftExplosion = false;
#region NPC bool
bool niaOn = false;
bool squireOn = false;
bool heavyOn = false;
bool bowOn = false;
#endregion
#region SFX bool
bool menuYesPlay, menuNoPlay, menuTogglePlay, pageTurnPlay, sfxWarpPlay =
false;
bool jumpPlay, waterjumpPlay, damagePlay, slashPlay, splashPlay = false;
bool plinkPlay, coinPlay, freezePlay, enginePlay = false;
bool smokePlay = false;
bool gunshotPlay, cannonPlay, explosionPlay, thunkPlay = false;
bool thunderProjPlay, thunderBlastPlay, invisPlay = false;
bool laserPlay, laserCharge, shortCharge = false;
bool teleportPlay = false;
bool fireballPlay = false;
bool spearPlay, notePlay = false;
bool steamPlay, arrowPlay, lancePlay, expAltPlay, thudPlay = false;
bool sprayProx1, sprayProx2, sprayProx3 = false;
bool spinProx1, spinProx2, spinProx3, spinProx4 = false;
bool flameProx1, flameProx2, flameProx3, flameProx4, flameProx5 = false;
bool laserProx1, laserProx2, laserProx3, laserProx4 = false;
bool playFlameWall = false;
bool acid1, acid2, acid3, acid4, flame1, flame2, flame3, flame4, flame5,
spin1, spin2, spin3, spin4, laser1, laser2, laser3, laser4, burrowOn, snowOn =
false;
#endregion
#region 2-1 puzzle
bool waterRisingOn = false;
bool waterPuzzleComplete = false;
#endregion
#region 2-2 puzzle
bool hovercraftOn = true;
bool hovercraftSink = false;
bool puzzleExplosion = false;
bool attackedFish = false;
#endregion
#region 2-3 puzzle
bool sheepOnGround = true;
bool capeReady = true;
#endregion
#region 2-4 puzzle
bool haveKey = true;
bool door1Open = false;
bool door2Open = false;
#endregion
#region 3-3 puzzle
bool doorOpen = false;
#endregion
#region 4-1 puzzle
bool machineryElectrified = false;
#endregion
#region 4-2 puzzle
bool cannonDefeated = false;
bool wickLit = false;
bool enemyCannonFire = false;
bool playerCannonFire = false;
#endregion
#region 4-3 var
bool floor1On = false;
bool floor2On = false;
bool floor3On = false;
#endregion
#region 5-2 puzzle
bool defenderFrozen = false;
bool spyFriendly = false;
bool spyMaskOff = false;
bool spyProj1On = false;
bool spyProj2On = false;
bool spyProj3On = false;
bool drgnOnCar = false;
bool spyFaceR = true;
bool daggerFaceR = true;
#endregion
#region 6-1 puzzle
bool puzzleCorrect = false;
bool puzzleSound = false;
bool alienProj1 = false;
bool alienProj2 = false;
bool alienProj3 = false;
bool alienProj4 = false;
#endregion
#region 6-B not boss
bool needStarPos = false;
#endregion
#region obstacles
bool obs1Up = false;
bool obs2Up = false;
bool obs3Up = false;
bool obs4Up = false;
bool obs5Up = false;
bool obs6Up = false;
bool obs7Up = false;
bool obs8Up = false;
bool obs9Up = false;
bool obs10Up = false;
#endregion
#region boat
bool boat1Left = false;
bool boat1Right = false;
bool boat2Left = false;
bool boat2Right = false;
bool boat1TouchL = false;
bool boat1TouchR = false;
bool boat2TouchL = false;
bool boat2TouchR = false;
bool onBoat1 = false;
bool onBoat2 = false;
#endregion
#region explosions
bool exp1On = false;
bool exp2On = false;
bool exp3On = false;
bool exp4On = false;
bool exp5On = false;
bool exp6On = false;
bool expSerial = false;
#endregion
bool fadedIn = true; //dictates fade in matte
bool whiteMatte, whiteMatteUp, whiteMatteDown = false;
bool blackMatte, blackMatteUp, blackMatteDown = false;
bool pressUp, lastDirUp = false;
bool optionsLook = false;
bool fromStory = false;
bool runEvent = false;
bool dragonDash = false;
bool drgnSpikeDamage = false;
//related to title screen
bool displayLogo = true; //display logo at startup
bool displayTitle = false; //display title after logo
bool titleInPlace = false;
bool treasureWindowUp, treasureWindowDown = false;
bool inMud = false;
bool waterRising = false;
bool from4e1 = false;
bool from4e2 = false;
bool stage2e4Left = false;
bool stage2e4Right = false;
bool waterfall1Frozen, waterfall2Frozen = false;
#region Water bool
bool drgnUnderwater = false;
bool underwaterBreath = false;
bool needSplashInLoc = false;
bool needSplashOutLoc = false;
bool splashIn = false;
bool splashOut = false;
#endregion
//related to world map
#region World Map bool
bool escMenu = false; //check if ESC is up
bool on1e2 = false;
bool on1e3 = false;
bool on1eB = false;
bool on2e1 = false;
bool on2e2 = false;
bool on2e3 = false;
bool on2eB = false;
bool on3e1 = false;
bool on3e2 = false;
bool on3e3 = false;
bool on3eB = false;
bool on4e1 = false;
bool on4e2 = false;
bool on4e3 = false;
bool on4e4 = false;
bool on4eB = false;
bool on5e1 = false;
bool on5e2 = false;
bool on5eB = false;
bool on6e1 = false;
bool on6eB = false;
bool on7eB = false;
bool mapArrowUp = false;
bool mapArrowRight = false;
bool mapArrowDown = false;
bool mapArrowLeft = false;
#endregion
//related to player sprite
#region Player Sprite bool
bool drgnWait = true; //if DRAGON isn't moving at all
bool drgnOnGround = false; //if DRAGON is touching solid ground
bool drgnFaceR = true; //if DRAGON is facing right
bool usingClaw = false; //to stagger claw usage
bool clawNoMove = false; //to prevent movement during claw animation
bool drgnFlight = false; //checks if DRAGON is flying
bool drgnIdle = false; //checks if DRAGON is doing idle animation
bool drgnFire = false; //checks if DRAGON is breathing fire
bool touchWallL = false;
bool touchWallR = false;
bool drgnKnockback = false;
bool drgnInvulnerable = false;
bool drgnHit = false;
bool waterfallKnockback = false;
bool duckStop = false;
bool touchLe1 = false;
bool touchRe1 = false;
bool touchLe2 = false;
bool touchRe2 = false;
bool touchLe3 = false;
bool touchRe3 = false;
bool touchLe4 = false;
bool touchRe4 = false;
bool touchLe5 = false;
bool touchRe5 = false;
bool touchLe6 = false;
bool touchRe6 = false;
bool touchLe7 = false;
bool touchRe7 = false;
bool touchLe8 = false;
bool touchRe8 = false;
bool touchLe9 = false;
bool touchRe9 = false;
bool touchLe10 = false;
bool touchRe10 = false;
bool touchLe11 = false;
bool touchRe11 = false;
bool touchLe12 = false;
bool touchRe12 = false;
bool touchLe13 = false;
bool touchRe13 = false;
bool touchLe14 = false;
bool touchRe14 = false;
bool touchLe15 = false;
bool touchRe15 = false;
bool touchLe16 = false;
bool touchRe16 = false;
bool touchLe17 = false;
bool touchRe17 = false;
bool touchLe18 = false;
bool touchRe18 = false;
bool touchLe19 = false;
bool touchRe19 = false;
bool touchLe20 = false;
bool touchRe20 = false;
bool e1stand = false;
bool e2stand = false;
bool e3stand = false;
bool e4stand = false;
bool e5stand = false;
bool e6stand = false;
bool e7stand = false;
bool e8stand = false;
bool e9stand = false;
bool e10stand = false;
bool e11stand = false;
bool e12stand = false;
bool e13stand = false;
bool e14stand = false;
bool e15stand = false;
bool e16stand = false;
bool e17stand = false;
bool e18stand = false;
bool e19stand = false;
bool e20stand = false;
#endregion
//related to breath attack
#region Breath bool
bool haveBolt = false;
bool haveFrost = false;
bool haveAcid = false;
bool haveGanja = false;
#endregion
//related to have treasure
#region Treasure bool
bool treasurePickUp = false;
bool pickUp1 = false;
bool pickUp2 = false;
bool pickUp3 = false;
bool pickUp4 = false;
bool pickUp5 = false;
bool pickUp6 = false;
bool pickUp7 = false;
bool pickUp8 = false;
bool pickUp9 = false;
bool pickUp10 = false;
bool pickUp11 = false;
bool pickUp12 = false;
bool pickUp13 = false;
bool pickUp14 = false;
bool pickUp15 = false;
bool pickUp16 = false;
bool pickUp17 = false;
bool pickUp18 = false;
bool pickUp19 = false;
bool pickUp20 = false;
bool pickUp21 = false;
bool pickUp22 = false;
bool pickUp23 = false;
bool pickUp24 = false;
bool pickUp25 = false;
bool pickUpAcid = false;
bool have01Hatchling = false;
bool have02Smile = false;
bool have03Crest = false;
bool have04Underpants = false;
bool have05Sollerets = false;
bool have06Scepter = false;
bool have07Momiji = false;
bool have08Ninjato = false;
bool have09Ring = false;
bool have10Sunset = false;
bool have11Dreihander = false;
bool have12Endeavour = false;
bool have13Doll = false;
bool have14Liqueur = false;
bool have15Penultima = false;
bool have16Leaf = false;
bool have17HTTYD = false;
bool have18Gust = false;
bool have19Shirt = false;
bool have20Deduction = false;
bool have21Topaz = false;
bool have22Sapphire = false;
bool have23Garnet = false;
bool have24Ruby = false;
bool have25Diamond = false;
#endregion
//related to enemy status
#region Enemy Status bool
bool e1spawn = false;
bool e1frozen = false;
bool e1shoot = false;
bool e1invulnerable = false;
bool e1faceR = false;
bool e1knockback = false;
bool e1knockbackRes = false;
bool e1onGround = true;
bool e1proximity = false;
bool e1touchWallR = false;
bool e1touchWallL = false;
bool e1breathhit = false;
bool e1clawhit = false;
bool e1hit = false;
bool e1peaceful = false;
bool e1frRes = false;
bool e1peaceRes = false;
bool e1coins = false;
bool e1smoke = false;
bool e1coinTouch = false;
bool e1BurnVul = false;
bool e1ShockVul = false;
bool e1altAnim = false;
bool e2spawn = false;
bool e2frozen = false;
bool e2shoot = false;
bool e2invulnerable = false;
bool e2faceR = false;
bool e2knockback = false;
bool e2knockbackRes = false;
bool e2onGround = true;
bool e2proximity = false;
bool e2touchWallR = false;
bool e2touchWallL = false;
bool e2breathhit = false;
bool e2clawhit = false;
bool e2hit = false;
bool e2peaceful = false;
bool e2frRes = false;
bool e2peaceRes = false;
bool e2coins = false;
bool e2smoke = false;
bool e2coinTouch = false;
bool e2BurnVul = false;
bool e2ShockVul = false;
bool e2altAnim = false;
bool e3spawn = false;
bool e3frozen = false;
bool e3shoot = false;
bool e3invulnerable = false;
bool e3faceR = false;
bool e3knockback = false;
bool e3knockbackRes = false;
bool e3onGround = true;
bool e3proximity = false;
bool e3touchWallR = false;
bool e3touchWallL = false;
bool e3breathhit = false;
bool e3clawhit = false;
bool e3hit = false;
bool e3peaceful = false;
bool e3frRes = false;
bool e3peaceRes = false;
bool e3coins = false;
bool e3smoke = false;
bool e3coinTouch = false;
bool e3BurnVul = false;
bool e3ShockVul = false;
bool e3altAnim = false;
bool e4spawn = false;
bool e4frozen = false;
bool e4shoot = false;
bool e4invulnerable = false;
bool e4faceR = false;
bool e4knockback = false;
bool e4knockbackRes = false;
bool e4onGround = true;
bool e4proximity = false;
bool e4touchWallR = false;
bool e4touchWallL = false;
bool e4breathhit = false;
bool e4clawhit = false;
bool e4hit = false;
bool e4peaceful = false;
bool e4frRes = false;
bool e4peaceRes = false;
bool e4coins = false;
bool e4smoke = false;
bool e4coinTouch = false;
bool e4BurnVul = false;
bool e4ShockVul = false;
bool e4altAnim = false;
bool e5spawn = false;
bool e5frozen = false;
bool e5shoot = false;
bool e5invulnerable = false;
bool e5faceR = false;
bool e5knockback = false;
bool e5knockbackRes = false;
bool e5onGround = true;
bool e5proximity = false;
bool e5touchWallR = false;
bool e5touchWallL = false;
bool e5breathhit = false;
bool e5clawhit = false;
bool e5hit = false;
bool e5peaceful = false;
bool e5frRes = false;
bool e5peaceRes = false;
bool e5coins = false;
bool e5smoke = false;
bool e5coinTouch = false;
bool e5BurnVul = false;
bool e5ShockVul = false;
bool e5altAnim = false;
bool e6spawn = false;
bool e6frozen = false;
bool e6shoot = false;
bool e6invulnerable = false;
bool e6faceR = false;
bool e6knockback = false;
bool e6knockbackRes = false;
bool e6onGround = true;
bool e6proximity = false;
bool e6touchWallR = false;
bool e6touchWallL = false;
bool e6breathhit = false;
bool e6clawhit = false;
bool e6hit = false;
bool e6peaceful = false;
bool e6frRes = false;
bool e6peaceRes = false;
bool e6coins = false;
bool e6smoke = false;
bool e6coinTouch = false;
bool e6BurnVul = false;
bool e6ShockVul = false;
bool e6altAnim = false;
bool e7spawn = false;
bool e7frozen = false;
bool e7shoot = false;
bool e7invulnerable = false;
bool e7faceR = false;
bool e7knockback = false;
bool e7knockbackRes = false;
bool e7onGround = true;
bool e7proximity = false;
bool e7touchWallR = false;
bool e7touchWallL = false;
bool e7breathhit = false;
bool e7clawhit = false;
bool e7hit = false;
bool e7peaceful = false;
bool e7frRes = false;
bool e7peaceRes = false;
bool e7coins = false;
bool e7smoke = false;
bool e7coinTouch = false;
bool e7BurnVul = false;
bool e7ShockVul = false;
bool e7altAnim = false;
bool e8spawn = false;
bool e8frozen = false;
bool e8shoot = false;
bool e8invulnerable = false;
bool e8faceR = false;
bool e8knockback = false;
bool e8knockbackRes = false;
bool e8onGround = true;
bool e8proximity = false;
bool e8touchWallR = false;
bool e8touchWallL = false;
bool e8breathhit = false;
bool e8clawhit = false;
bool e8hit = false;
bool e8peaceful = false;
bool e8frRes = false;
bool e8peaceRes = false;
bool e8coins = false;
bool e8smoke = false;
bool e8coinTouch = false;
bool e8BurnVul = false;
bool e8ShockVul = false;
bool e8altAnim = false;
bool e9spawn = false;
bool e9frozen = false;
bool e9shoot = false;
bool e9invulnerable = false;
bool e9faceR = false;
bool e9knockback = false;
bool e9knockbackRes = false;
bool e9onGround = true;
bool e9proximity = false;
bool e9touchWallR = false;
bool e9touchWallL = false;
bool e9breathhit = false;
bool e9clawhit = false;
bool e9hit = false;
bool e9peaceful = false;
bool e9frRes = false;
bool e9peaceRes = false;
bool e9coins = false;
bool e9smoke = false;
bool e9coinTouch = false;
bool e9BurnVul = false;
bool e9ShockVul = false;
bool e9altAnim = false;
bool e10spawn = false;
bool e10frozen = false;
bool e10shoot = false;
bool e10invulnerable = false;
bool e10faceR = false;
bool e10knockback = false;
bool e10knockbackRes = false;
bool e10onGround = true;
bool e10proximity = false;
bool e10touchWallR = false;
bool e10touchWallL = false;
bool e10breathhit = false;
bool e10clawhit = false;
bool e10hit = false;
bool e10peaceful = false;
bool e10frRes = false;
bool e10peaceRes = false;
bool e10coins = false;
bool e10smoke = false;
bool e10coinTouch = false;
bool e10BurnVul = false;
bool e10ShockVul = false;
bool e10altAnim = false;
bool e1sparkleOn = false;
bool e2sparkleOn = false;
bool e3sparkleOn = false;
bool e4sparkleOn = false;
bool e5sparkleOn = false;
bool e6sparkleOn = false;
bool e7sparkleOn = false;
bool e8sparkleOn = false;
bool e9sparkleOn = false;
bool e10sparkleOn = false;
bool e1plinkOn = false;
bool e2plinkOn = false;
bool e3plinkOn = false;
bool e4plinkOn = false;
bool e5plinkOn = false;
bool e6plinkOn = false;
bool e7plinkOn = false;
bool e8plinkOn = false;
bool e9plinkOn = false;
bool e10plinkOn = false;
bool e1projectile = false;
bool e2projectile = false;
bool e3projectile = false;
bool e4projectile = false;
bool e5projectile = false;
bool e6projectile = false;
bool e7projectile = false;
bool e8projectile = false;
bool e9projectile = false;
bool e10projectile = false;
bool e1projRef = false;
bool e2projRef = false;
bool e3projRef = false;
bool e4projRef = false;
bool e5projRef = false;
bool e6projRef = false;
bool e7projRef = false;
bool e8projRef = false;
bool e9projRef = false;
bool e10projRef = false;
bool e1projRefY, e2projRefY, e3projRefY, e4projRefY, e5projRefY, e6projRefY,
e7projRefY, e8projRefY, e9projRefY, e10projRefY = false;
bool e1burn, e2burn, e3burn, e4burn, e5burn, e6burn, e7burn, e8burn, e9burn,
e10burn = false;
bool e1shock, e2shock, e3shock, e4shock, e5shock, e6shock, e7shock, e8shock,
e9shock, e10shock = false;
bool e11spawn = false;
bool e11frozen = false;
bool e11shoot = false;
bool e11invulnerable = false;
bool e11faceR = false;
bool e11knockback = false;
bool e11knockbackRes = false;
bool e11onGround = true;
bool e11proximity = false;
bool e11touchWallR = false;
bool e11touchWallL = false;
bool e11breathhit = false;
bool e11clawhit = false;
bool e11hit = false;
bool e11peaceful = false;
bool e11frRes = false;
bool e11peaceRes = false;
bool e11coins = false;
bool e11smoke = false;
bool e11coinTouch = false;
bool e11BurnVul = false;
bool e11ShockVul = false;
bool e11altAnim = false;
bool e12spawn = false;
bool e12frozen = false;
bool e12shoot = false;
bool e12invulnerable = false;
bool e12faceR = false;
bool e12knockback = false;
bool e12knockbackRes = false;
bool e12onGround = true;
bool e12proximity = false;
bool e12touchWallR = false;
bool e12touchWallL = false;
bool e12breathhit = false;
bool e12clawhit = false;
bool e12hit = false;
bool e12peaceful = false;
bool e12frRes = false;
bool e12peaceRes = false;
bool e12coins = false;
bool e12smoke = false;
bool e12coinTouch = false;
bool e12BurnVul = false;
bool e12ShockVul = false;
bool e12altAnim = false;
bool e13spawn = false;
bool e13frozen = false;
bool e13shoot = false;
bool e13invulnerable = false;
bool e13faceR = false;
bool e13knockback = false;
bool e13knockbackRes = false;
bool e13onGround = true;
bool e13proximity = false;
bool e13touchWallR = false;
bool e13touchWallL = false;
bool e13breathhit = false;
bool e13clawhit = false;
bool e13hit = false;
bool e13peaceful = false;
bool e13frRes = false;
bool e13peaceRes = false;
bool e13coins = false;
bool e13smoke = false;
bool e13coinTouch = false;
bool e13BurnVul = false;
bool e13ShockVul = false;
bool e13altAnim = false;
bool e14spawn = false;
bool e14frozen = false;
bool e14shoot = false;
bool e14invulnerable = false;
bool e14faceR = false;
bool e14knockback = false;
bool e14knockbackRes = false;
bool e14onGround = true;
bool e14proximity = false;
bool e14touchWallR = false;
bool e14touchWallL = false;
bool e14breathhit = false;
bool e14clawhit = false;
bool e14hit = false;
bool e14peaceful = false;
bool e14frRes = false;
bool e14peaceRes = false;
bool e14coins = false;
bool e14smoke = false;
bool e14coinTouch = false;
bool e14BurnVul = false;
bool e14ShockVul = false;
bool e14altAnim = false;
bool e15spawn = false;
bool e15frozen = false;
bool e15shoot = false;
bool e15invulnerable = false;
bool e15faceR = false;
bool e15knockback = false;
bool e15knockbackRes = false;
bool e15onGround = true;
bool e15proximity = false;
bool e15touchWallR = false;
bool e15touchWallL = false;
bool e15breathhit = false;
bool e15clawhit = false;
bool e15hit = false;
bool e15peaceful = false;
bool e15frRes = false;
bool e15peaceRes = false;
bool e15coins = false;
bool e15smoke = false;
bool e15coinTouch = false;
bool e15BurnVul = false;
bool e15ShockVul = false;
bool e15altAnim = false;
bool e16spawn = false;
bool e16frozen = false;
bool e16shoot = false;
bool e16invulnerable = false;
bool e16faceR = false;
bool e16knockback = false;
bool e16knockbackRes = false;
bool e16onGround = true;
bool e16proximity = false;
bool e16touchWallR = false;
bool e16touchWallL = false;
bool e16breathhit = false;
bool e16clawhit = false;
bool e16hit = false;
bool e16peaceful = false;
bool e16frRes = false;
bool e16peaceRes = false;
bool e16coins = false;
bool e16smoke = false;
bool e16coinTouch = false;
bool e16BurnVul = false;
bool e16ShockVul = false;
bool e16altAnim = false;
bool e17spawn = false;
bool e17frozen = false;
bool e17shoot = false;
bool e17invulnerable = false;
bool e17faceR = false;
bool e17knockback = false;
bool e17knockbackRes = false;
bool e17onGround = true;
bool e17proximity = false;
bool e17touchWallR = false;
bool e17touchWallL = false;
bool e17breathhit = false;
bool e17clawhit = false;
bool e17hit = false;
bool e17peaceful = false;
bool e17frRes = false;
bool e17peaceRes = false;
bool e17coins = false;
bool e17smoke = false;
bool e17coinTouch = false;
bool e17BurnVul = false;
bool e17ShockVul = false;
bool e17altAnim = false;
bool e18spawn = false;
bool e18frozen = false;
bool e18shoot = false;
bool e18invulnerable = false;
bool e18faceR = false;
bool e18knockback = false;
bool e18knockbackRes = false;
bool e18onGround = true;
bool e18proximity = false;
bool e18touchWallR = false;
bool e18touchWallL = false;
bool e18breathhit = false;
bool e18clawhit = false;
bool e18hit = false;
bool e18peaceful = false;
bool e18frRes = false;
bool e18peaceRes = false;
bool e18coins = false;
bool e18smoke = false;
bool e18coinTouch = false;
bool e18BurnVul = false;
bool e18ShockVul = false;
bool e18altAnim = false;
bool e19spawn = false;
bool e19frozen = false;
bool e19shoot = false;
bool e19invulnerable = false;
bool e19faceR = false;
bool e19knockback = false;
bool e19knockbackRes = false;
bool e19onGround = true;
bool e19proximity = false;
bool e19touchWallR = false;
bool e19touchWallL = false;
bool e19breathhit = false;
bool e19clawhit = false;
bool e19hit = false;
bool e19peaceful = false;
bool e19frRes = false;
bool e19peaceRes = false;
bool e19coins = false;
bool e19smoke = false;
bool e19coinTouch = false;
bool e19BurnVul = false;
bool e19ShockVul = false;
bool e19altAnim = false;
bool e20spawn = false;
bool e20frozen = false;
bool e20shoot = false;
bool e20invulnerable = false;
bool e20faceR = false;
bool e20knockback = false;
bool e20knockbackRes = false;
bool e20onGround = true;
bool e20proximity = false;
bool e20touchWallR = false;
bool e20touchWallL = false;
bool e20breathhit = false;
bool e20clawhit = false;
bool e20hit = false;
bool e20peaceful = false;
bool e20frRes = false;
bool e20peaceRes = false;
bool e20coins = false;
bool e20smoke = false;
bool e20coinTouch = false;
bool e20BurnVul = false;
bool e20ShockVul = false;
bool e20altAnim = false;
bool e11sparkleOn = false;
bool e12sparkleOn = false;
bool e13sparkleOn = false;
bool e14sparkleOn = false;
bool e15sparkleOn = false;
bool e16sparkleOn = false;
bool e17sparkleOn = false;
bool e18sparkleOn = false;
bool e19sparkleOn = false;
bool e20sparkleOn = false;
bool e11plinkOn = false;
bool e12plinkOn = false;
bool e13plinkOn = false;
bool e14plinkOn = false;
bool e15plinkOn = false;
bool e16plinkOn = false;
bool e17plinkOn = false;
bool e18plinkOn = false;
bool e19plinkOn = false;
bool e20plinkOn = false;
bool e11projectile = false;
bool e12projectile = false;
bool e13projectile = false;
bool e14projectile = false;
bool e15projectile = false;
bool e16projectile = false;
bool e17projectile = false;
bool e18projectile = false;
bool e19projectile = false;
bool e20projectile = false;
bool e11projRef = false;
bool e12projRef = false;
bool e13projRef = false;
bool e14projRef = false;
bool e15projRef = false;
bool e16projRef = false;
bool e17projRef = false;
bool e18projRef = false;
bool e19projRef = false;
bool e20projRef = false;
bool e11projRefY, e12projRefY, e13projRefY, e14projRefY, e15projRefY,
e16projRefY, e17projRefY, e18projRefY, e19projRefY, e20projRefY = false;
bool e11burn, e12burn, e13burn, e14burn, e15burn, e16burn, e17burn, e18burn,
e19burn, e20burn = false;
bool e11shock, e12shock, e13shock, e14shock, e15shock, e16shock, e17shock,
e18shock, e19shock, e20shock = false;
#endregion
//last key pressed
#region Last Key Pressed bool
bool lastKeyDown = false; //last key pressed = down
bool lastKeyUp = false; //last key pressed = up
bool lastKeyRight = false; //last key pressed = right
bool lastKeyLeft = false; //last key pressed = left
bool lastKeyA = false; //used to reset breathFrame
bool lastKeyZ = false; //to prevent Z spam
bool lastKeyX = false; //to prevent X spam
bool lastKeyQ = false; //to prevent Q spam
bool lastKeyW = false; //to prevent W spam
bool lastKeyC = false; //to prevent C repeat
bool lastKeyEsc = false; //to prevent Esc repeat
bool xWhileJumping = false; //to prevent hopping
#endregion
//system bool
#region System bool
bool titleScreen = true;
bool extraOn = false;
bool worldMap = false;
bool actionStage = false;
bool toTitleScreen = false;
bool toWorldMap = false;
bool defeated = false;
bool toActionStage = false;
bool endOfStage = false;
bool stageExit = false;
bool fadeWait = false;
bool toBlack = false;
bool savingGame = false;
bool controlInput = true;
bool depositedGP = false;
bool worldMapMenu = false;
bool levelUpMenu = false;
bool musicFade = false;
#endregion
//level bool
#region Level bool
bool stageHome = false;
bool toHome = false;
bool stage1e1 = false;
bool toStage1e1 = false;
bool stage1e2 = false;
bool toStage1e2 = false;
bool stage1e3 = false;
bool toStage1e3 = false;
bool stage1eB = false;
bool toStage1eB = false;
bool stage2e1 = false;
bool toStage2e1 = false;
bool stage2e2 = false;
bool toStage2e2 = false;
bool stage2e3 = false;
bool toStage2e3 = false;
bool stage2e4 = false;
bool toStage2e4 = false;
bool stage2eB = false;
bool toStage2eB = false;
bool stage3e1 = false;
bool toStage3e1 = false;
bool stage3e2 = false;
bool toStage3e2 = false;
bool stage3e3 = false;
bool toStage3e3 = false;
bool stage3eB = false;
bool toStage3eB = false;
bool stage4e1 = false;
bool toStage4e1 = false;
bool stage4e2 = false;
bool toStage4e2 = false;
bool stage4e3 = false;
bool toStage4e3 = false;
bool stage4e4 = false;
bool toStage4e4 = false;
bool stage4eB = false;
bool toStage4eB = false;
bool stage5e1 = false;
bool toStage5e1 = false;
bool stage5e2 = false;
bool toStage5e2 = false;
bool stage5eB = false;
bool toStage5eB = false;
bool stage6e1 = false;
bool toStage6e1 = false;
bool stage6eB = false;
bool toStage6eB = false;
bool stage7eB = false;
bool toStage7eB_1 = false;
bool toStage7eB_2 = false;
#endregion
//storybook bool
#region Storybook bool
bool toStory = false;
bool storybook = false;
bool story1 = false;
bool story1_2pre = false;
bool story1_Bpre = false;
bool story1_Bpost = false;
bool story2_2post = false;
bool story2_Bpre = false;
bool story2_Bpost = false;
bool story3_Bpre = false;
bool story3_Bpost = false;
bool story4_4post = false;
bool story4_Bpre = false;
bool story4_Bpost = false;
bool story5_Bpre = false;
bool story5_Bpost = false;
bool story6_1post = false;
bool story7_Bpre = false;
bool story7_Bmid = false;
bool storybookEnding = false;
bool storybookCredits = false;
bool pg1turn = false;
bool pg2turn = false;
bool pg3turn = false;
bool pg4turn = false;
bool pg5turn = false;
bool pg6turn = false;
bool pg7turn = false;
bool textFadeOut = false;
bool textFadeIn = false;
bool seenStory1_2 = false;
bool seenStory1_B = false;
bool seenStory2_2 = false;
bool seenStory2_B = false;
bool seenStory3_B = false;
bool seenStory4_4 = false;
bool seenStory4_B = false;
bool seenStory5_B = false;
bool seenStory6_1 = false;
bool seenStory7_B = false;
bool pageTurnWait = false;
#endregion
//music bool
#region Music bool
bool storyHappy = false;
bool storyEnemy = false;
bool storyPulse = false;
bool storyEnd = false;
bool titleMusic = false;
bool worldMapMusic = false;
bool stageMusic = false;
bool creditsMusic = false;
bool playTitle = false;
bool playTreasure = false;
bool playDefeat = false;
bool playExit = false;
#endregion
bool overlayUp = false;
bool overlayDown = false;
bool drawOverlay = false;
bool seenEvent1 = false;
bool seenEvent2 = false;
bool levelPageOn = false;
bool levelPageOff = false;
bool home1F = true;
bool home2F = false;
#endregion
#region Rectangle
Rectangle talk2e3 = new Rectangle(0, 0, 0, 0);
Rectangle Clawframe = new Rectangle(0, 0, 0, 0);
Rectangle Breathframe = new Rectangle(0, 0, 0, 0);
Rectangle BreathHitbox = new Rectangle(0, 0, 0, 0);
Rectangle ClawHitbox = new Rectangle(0, 0, 0, 0);
Rectangle drgnpipDL = new Rectangle(0, 0, 0, 0);
Rectangle drgnpipDC = new Rectangle(0, 0, 0, 0);
Rectangle drgnpipDR = new Rectangle(0, 0, 0, 0);
Rectangle drgnpipCL = new Rectangle(0, 0, 0, 0);
Rectangle drgnpipCR = new Rectangle(0, 0, 0, 0);
Rectangle drgnpipUL = new Rectangle(0, 0, 0, 0);
Rectangle drgnpipUC = new Rectangle(0, 0, 0, 0);
Rectangle drgnpipUR = new Rectangle(0, 0, 0, 0);
Rectangle drgnhitboxHead = new Rectangle(0, 0, 0, 0);
Rectangle drgnhitbox = new Rectangle(0, 0, 0, 0);
#region floor
Rectangle floor1 = new Rectangle(3102, 200, 6098, 50);
Rectangle floor2 = new Rectangle(6202, 063, 453, 10);
Rectangle floor3 = new Rectangle(6759, 947, 418, 10);
Rectangle floor4 = new Rectangle(7315, 818, 352, 10);
Rectangle floor5 = new Rectangle(7847, 694, 175, 10);
Rectangle floor6 = new Rectangle(7518, 634, 147, 10);
Rectangle floor7 = new Rectangle(8117, 572, 173, 10);
Rectangle floor8 = new Rectangle(7775, 443, 198, 10);
Rectangle floor9 = new Rectangle(7205, 446, 294, 10);
Rectangle floor10 = new Rectangle(6962, 4328, 90, 10);
Rectangle floor11 = new Rectangle(6764, 4200, 53, 10);
Rectangle floor12 = new Rectangle(6563, 4076, 59, 10);
Rectangle floor13 = new Rectangle(6158, 4071, 193, 10);
Rectangle floor14 = new Rectangle(6735, 3949, 248, 10);
Rectangle floor15 = new Rectangle(7107, 3821, 770, 10);
Rectangle floor16 = new Rectangle(6974, 3700, 106, 10);
Rectangle floor17 = new Rectangle(7444, 3697, 94, 10);
Rectangle floor18 = new Rectangle(6575, 3572, 240, 10);
Rectangle floor19 = new Rectangle(7680, 3568, 56, 10);
Rectangle floor20 = new Rectangle(7935, 3560, 56, 10);
Rectangle floor21 = new Rectangle(8110, 3446, 185, 10);
Rectangle floor22 = new Rectangle(6242, 3445, 271, 10);
Rectangle floor23 = new Rectangle(6847, 3314, 43, 10);
Rectangle floor24 = new Rectangle(7060, 3317, 33, 10);
Rectangle floor25 = new Rectangle(7276, 3318, 40, 10);
Rectangle floor26 = new Rectangle(7441, 3318, 32, 10);
Rectangle floor27 = new Rectangle(7636, 3318, 49, 10);
Rectangle floor28 = new Rectangle(7890, 3311, 79, 10);
Rectangle floor29 = new Rectangle(6271, 3187, 432, 10);
Rectangle floor30 = new Rectangle(6851, 3066, 112, 10);
Rectangle floor31 = new Rectangle(7258, 3070, 50, 10);
Rectangle floor32 = new Rectangle(7401, 3070, 48, 10);
Rectangle floor33 = new Rectangle(7536, 3070, 49, 10);
Rectangle floor34 = new Rectangle(7681, 3072, 49, 10);
Rectangle floor35 = new Rectangle(7084, 2939, 59, 10);
Rectangle floor36 = new Rectangle(7773, 2940, 158, 10);
Rectangle floor37 = new Rectangle(7642, 2817, 54, 10);
Rectangle floor38 = new Rectangle(7302, 2689, 249, 10);
Rectangle floor39 = new Rectangle(7119, 2572, 89, 10);
Rectangle floor40 = new Rectangle(6820, 2440, 185, 10);
Rectangle floor41 = new Rectangle(6620, 2314, 47, 10);
Rectangle floor42 = new Rectangle(6466, 2188, 39, 10);
Rectangle floor43 = new Rectangle(6560, 2060, 43, 10);
Rectangle floor44 = new Rectangle(6459, 1939, 42, 10);
Rectangle floor45 = new Rectangle(6579, 1817, 42, 10);
Rectangle floor46 = new Rectangle(6757, 1816, 183, 10);
Rectangle floor47 = new Rectangle(6666, 1687, 43, 10);
Rectangle floor48 = new Rectangle(6760, 1568, 43, 10);
Rectangle floor49 = new Rectangle(6594, 1444, 85, 10);
Rectangle floor50 = new Rectangle(6916, 1449, 52, 10);
Rectangle floor51 = new Rectangle(7097, 1447, 80, 10);
Rectangle floor52 = new Rectangle(7288, 1448, 50, 10);
Rectangle floor53 = new Rectangle(7448, 1564, 34, 10);
Rectangle floor54 = new Rectangle(7518, 1690, 37, 10);
Rectangle floor55 = new Rectangle(7593, 1810, 31, 10);
Rectangle floor56 = new Rectangle(7661, 1934, 37, 10);
Rectangle floor57 = new Rectangle(7759, 2064, 56, 10);
Rectangle floor58 = new Rectangle(7826, 2192, 2091, 10);
Rectangle floor59 = new Rectangle(8032, 1944, 732, 10);
Rectangle floor60 = new Rectangle(3624, 3530, 2526, 10); //NO CHANGE
Rectangle floor61 = new Rectangle(5531, 3275, 197, 10);
Rectangle floor62 = new Rectangle(4433, 3149, 545, 10);
Rectangle floor63 = new Rectangle(5172, 3143, 263, 10);
Rectangle floor64 = new Rectangle(4225, 3017, 98, 10);
Rectangle floor65 = new Rectangle(5509, 3019, 123, 10);
Rectangle floor66 = new Rectangle(5780, 3014, 207, 10);
Rectangle floor67 = new Rectangle(4457, 2896, 948, 10);
Rectangle floor68 = new Rectangle(4228, 2768, 180, 10);
Rectangle floor69 = new Rectangle(4623, 2641, 313, 10);
Rectangle floor70 = new Rectangle(4215, 2525, 321, 10);
Rectangle floor71 = new Rectangle(5045, 2523, 63, 10);
Rectangle floor72 = new Rectangle(5200, 2520, 49, 10);
Rectangle floor73 = new Rectangle(5335, 2525, 250, 10);
Rectangle floor74 = new Rectangle(4372, 2390, 338, 10);
Rectangle floor75 = new Rectangle(5443, 2396, 44, 10);
Rectangle floor76 = new Rectangle(5643, 2397, 97, 10);
Rectangle floor77 = new Rectangle(4227, 2270, 68, 10);
Rectangle floor78 = new Rectangle(5146, 2276, 117, 10);
Rectangle floor79 = new Rectangle(5353, 2279, 42, 10);
Rectangle floor80 = new Rectangle(4358, 2143, 186, 10);
Rectangle floor81 = new Rectangle(4718, 2153, 324, 10);
Rectangle floor82 = new Rectangle(5110, 2153, 41, 10);
Rectangle floor83 = new Rectangle(5278, 2155, 45, 10);
Rectangle floor84 = new Rectangle(4608, 2021, 44, 10);
Rectangle floor85 = new Rectangle(5384, 2030, 43, 10);
Rectangle floor86 = new Rectangle(4405, 1900, 148, 10);
Rectangle floor87 = new Rectangle(4703, 1903, 43, 10);
Rectangle floor88 = new Rectangle(5472, 1897, 43, 10);
Rectangle floor89 = new Rectangle(4829, 1778, 38, 10);
Rectangle floor90 = new Rectangle(5373, 1777, 46, 10);
Rectangle floor91 = new Rectangle(4729, 1634, 47, 10);
Rectangle floor92 = new Rectangle(5295, 1646, 41, 10);
Rectangle floor93 = new Rectangle(4863, 1520, 371, 10);
Rectangle floor94 = new Rectangle(5403, 1517, 49, 10);
Rectangle floor95 = new Rectangle(5293, 1404, 33, 10);
Rectangle floor96 = new Rectangle(5187, 1278, 41, 10);
Rectangle floor97 = new Rectangle(5293, 1155, 48, 10);
Rectangle floor98 = new Rectangle(5366, 1030, 40, 10);
Rectangle floor99 = new Rectangle(5444, 907, 43, 10);
Rectangle floor100 = new Rectangle(5180, 1781, 121, 10);
Rectangle floor101 = new Rectangle(5105, 1652, 41, 10);
Rectangle floor102 = new Rectangle(5033, 2533, 46, 10);
Rectangle floor103 = new Rectangle(5125, 3405, 34, 10);
Rectangle floor104 = new Rectangle(5070, 4287, 27, 10);
Rectangle floor105 = new Rectangle(3394, 52331, 471, 10); //NO CHANGE
Rectangle floor106 = new Rectangle(3892, 2779, 35, 10); // NO CHANGE
Rectangle floor107 = new Rectangle(3926, 3059, 53, 10); //NO CHANGE
Rectangle floor108 = new Rectangle(3307, 2696, 166, 10); // NO CHANGE
Rectangle floor109 = new Rectangle(3229, 3227, 167, 10); // NO CHANGE
Rectangle floor110 = new Rectangle(3175, 3694, 99, 10); // NO CHANGE
Rectangle floor111 = new Rectangle(3115, 3921, 160, 10); //NO CHANGE
Rectangle floor112 = new Rectangle(3031, 4516, 177, 10); // NO CHANGE
Rectangle floor113 = new Rectangle(2988, 5112, 649, 10); // NO CHANGE
Rectangle floor114 = new Rectangle(2355, 369, 29, 10);
Rectangle floor115 = new Rectangle(2308, 500, 31, 10);
Rectangle floor116 = new Rectangle(2255, 625, 33, 10);
Rectangle floor117 = new Rectangle(2371, 624, 40, 10);
Rectangle floor118 = new Rectangle(2464, 621, 35, 10);
Rectangle floor119 = new Rectangle(1907, 750, 37, 10);
Rectangle floor120 = new Rectangle(2332, 750, 134, 10);
Rectangle floor121 = new Rectangle(1813, 1872, 30, 10);
Rectangle floor122 = new Rectangle(1772, 1004, 32, 10);
Rectangle floor123 = new Rectangle(2346, 3989, 33, 10);
Rectangle floor124 = new Rectangle(1733, 1123, 33, 10);
Rectangle floor125 = new Rectangle(2459, 1116, 138, 10);
Rectangle floor126 = new Rectangle(1787, 1252, 30, 10);
Rectangle floor127 = new Rectangle(2681, 1246, 50, 10);
Rectangle floor128 = new Rectangle(1719, 1367, 229, 10);
Rectangle floor129 = new Rectangle(2731, 1371, 33, 10);
Rectangle floor130 = new Rectangle(1982, 1486, 36, 10);
Rectangle floor131 = new Rectangle(2862, 1495, 49, 10);
Rectangle floor132 = new Rectangle(1926, 1618, 28, 10);
Rectangle floor133 = new Rectangle(2942, 1617, 66, 10);
Rectangle floor134 = new Rectangle(1980, 1742, 26, 10);
Rectangle floor135 = new Rectangle(2731, 1733, 156, 10);
Rectangle floor136 = new Rectangle(2055, 1866, 46, 10);
Rectangle floor137 = new Rectangle(2649, 1860, 37, 10);
Rectangle floor138 = new Rectangle(2141, 1989, 51, 10);
Rectangle floor139 = new Rectangle(2742, 1988, 39, 10);
Rectangle floor140 = new Rectangle(2209, 2106, 36, 10);
Rectangle floor141 = new Rectangle(2826, 2102, 34, 10);
Rectangle floor142 = new Rectangle(2251, 2233, 33, 10);
Rectangle floor143 = new Rectangle(2896, 2234, 40, 10);
Rectangle floor144 = new Rectangle(1756, 2356, 35, 10);
Rectangle floor145 = new Rectangle(2203, 2356, 39, 10);
Rectangle floor146 = new Rectangle(3017, 2355, 275, 10);
Rectangle floor147 = new Rectangle(1667, 2486, 37, 10);
Rectangle floor148 = new Rectangle(1886, 2485, 133, 10);
Rectangle floor149 = new Rectangle(2083, 2484, 22, 10);
Rectangle floor150 = new Rectangle(2610, 2482, 280, 10);
Rectangle floor151 = new Rectangle(1618, 2754, 106, 10);
Rectangle floor152 = new Rectangle(1853, 2749, 67, 10);
Rectangle floor153 = new Rectangle(2161, 2735, 375, 10);
Rectangle floor154 = new Rectangle(2987, 2726, 123, 10);
Rectangle floor155 = new Rectangle(2024, 2863, 55, 10);
Rectangle floor156 = new Rectangle(2688, 2981, 172, 10);
Rectangle floor157 = new Rectangle(2485, 3219, 137, 10);
Rectangle floor158 = new Rectangle(2977, 3223, 38, 10);
Rectangle floor159 = new Rectangle(2917, 3352, 25, 10);
Rectangle floor160 = new Rectangle(1797, 3473, 248, 10);
Rectangle floor161 = new Rectangle(2284, 3468, 134, 10);
Rectangle floor162 = new Rectangle(2989, 3469, 37, 10);
Rectangle floor163 = new Rectangle(1403, 3662, 37, 10);
Rectangle floor164 = new Rectangle(2400, 3660, 459, 10);
Rectangle floor165 = new Rectangle(1530, 3788, 98, 10);
Rectangle floor166 = new Rectangle(2043, 3781, 275, 10);
Rectangle floor167 = new Rectangle(1285, 3914, 37, 10);
Rectangle floor168 = new Rectangle(1443, 3909, 44, 10);
Rectangle floor169 = new Rectangle(1871, 3913, 114, 10);
Rectangle floor170 = new Rectangle(2895, 3912, 38, 10);
Rectangle floor171 = new Rectangle(1225, 4033, 254, 10);
Rectangle floor172 = new Rectangle(2884, 4021, 212, 10);
Rectangle floor173 = new Rectangle(1558, 4156, 279, 10);
Rectangle floor174 = new Rectangle(2710, 4153, 133, 10);
Rectangle floor175 = new Rectangle(1894, 4282, 708, 10);
Rectangle floor176 = new Rectangle(2632, 4401, 39, 10);
Rectangle floor177 = new Rectangle(1291, 4535, 48, 10);
Rectangle floor178 = new Rectangle(1370, 4532, 35, 10);
Rectangle floor179 = new Rectangle(1625, 4528, 151, 10);
Rectangle floor180 = new Rectangle(2710, 4523, 58, 10);
Rectangle floor181 = new Rectangle(1209, 4662, 381, 10);
Rectangle floor182 = new Rectangle(1836, 4662, 41, 10);
Rectangle floor183 = new Rectangle(2609, 4652, 41, 10);
Rectangle floor184 = new Rectangle(2343, 4781, 85, 10);
Rectangle floor185 = new Rectangle(2511, 4777, 43, 10);
Rectangle floor186 = new Rectangle(1832, 4916, 34, 10);
Rectangle floor187 = new Rectangle(2444, 4910, 39, 10);
Rectangle floor188 = new Rectangle(2093, 5033, 305, 10);
Rectangle floor189 = new Rectangle(2476, 5152, 303, 10);
Rectangle floor190 = new Rectangle(1610, 5280, 53, 10);
Rectangle floor191 = new Rectangle(1852, 5276, 199, 10);
Rectangle floor192 = new Rectangle(2914, 5284, 47, 10);
Rectangle floor193 = new Rectangle(0, 5416, 2997, 10); //NO CHANGE
Rectangle floor194 = new Rectangle(1753, 2613, 44, 10);
#endregion
#region temp wall L
Rectangle L1 = new Rectangle(0, 0, 0, 0);
Rectangle L2 = new Rectangle(0, 0, 0, 0);
Rectangle L3 = new Rectangle(0, 0, 0, 0);
Rectangle L4 = new Rectangle(0, 0, 0, 0);
Rectangle L5 = new Rectangle(0, 0, 0, 0);
Rectangle L6 = new Rectangle(0, 0, 0, 0);
Rectangle L7 = new Rectangle(0, 0, 0, 0);
Rectangle L8 = new Rectangle(0, 0, 0, 0);
Rectangle L9 = new Rectangle(0, 0, 0, 0);
Rectangle L10 = new Rectangle(0, 0, 0, 0);
Rectangle L11 = new Rectangle(0, 0, 0, 0);
Rectangle L12 = new Rectangle(0, 0, 0, 0);
Rectangle L13 = new Rectangle(0, 0, 0, 0);
Rectangle L14 = new Rectangle(0, 0, 0, 0);
Rectangle L15 = new Rectangle(0, 0, 0, 0);
Rectangle L16 = new Rectangle(0, 0, 0, 0);
Rectangle L17 = new Rectangle(0, 0, 0, 0);
Rectangle L18 = new Rectangle(0, 0, 0, 0);
Rectangle L19 = new Rectangle(0, 0, 0, 0);
Rectangle L20 = new Rectangle(0, 0, 0, 0);
Rectangle L21 = new Rectangle(0, 0, 0, 0);
Rectangle L22 = new Rectangle(0, 0, 0, 0);
Rectangle L23 = new Rectangle(0, 0, 0, 0);
Rectangle L24 = new Rectangle(0, 0, 0, 0);
Rectangle L25 = new Rectangle(0, 0, 0, 0);
Rectangle L26 = new Rectangle(0, 0, 0, 0);
Rectangle L27 = new Rectangle(0, 0, 0, 0);
Rectangle L28 = new Rectangle(0, 0, 0, 0);
Rectangle L29 = new Rectangle(0, 0, 0, 0);
Rectangle L30 = new Rectangle(0, 0, 0, 0);
Rectangle L31 = new Rectangle(0, 0, 0, 0);
Rectangle L32 = new Rectangle(0, 0, 0, 0);
Rectangle L33 = new Rectangle(0, 0, 0, 0);
Rectangle L34 = new Rectangle(0, 0, 0, 0);
Rectangle L35 = new Rectangle(0, 0, 0, 0);
Rectangle L36 = new Rectangle(0, 0, 0, 0);
Rectangle L37 = new Rectangle(0, 0, 0, 0);
Rectangle L38 = new Rectangle(0, 0, 0, 0);
Rectangle L39 = new Rectangle(0, 0, 0, 0);
Rectangle L40 = new Rectangle(0, 0, 0, 0);
Rectangle L41 = new Rectangle(0, 0, 0, 0);
Rectangle L42 = new Rectangle(0, 0, 0, 0);
Rectangle L43 = new Rectangle(0, 0, 0, 0);
Rectangle L44 = new Rectangle(0, 0, 0, 0);
Rectangle L45 = new Rectangle(0, 0, 0, 0);
Rectangle L46 = new Rectangle(0, 0, 0, 0);
Rectangle L47 = new Rectangle(0, 0, 0, 0);
Rectangle L48 = new Rectangle(0, 0, 0, 0);
Rectangle L49 = new Rectangle(0, 0, 0, 0);
Rectangle L50 = new Rectangle(0, 0, 0, 0);
Rectangle L51 = new Rectangle(0, 0, 0, 0);
Rectangle L52 = new Rectangle(0, 0, 0, 0);
Rectangle L53 = new Rectangle(0, 0, 0, 0);
Rectangle L54 = new Rectangle(0, 0, 0, 0);
Rectangle L55 = new Rectangle(0, 0, 0, 0);
Rectangle L56 = new Rectangle(0, 0, 0, 0);
Rectangle L57 = new Rectangle(0, 0, 0, 0);
Rectangle L58 = new Rectangle(0, 0, 0, 0);
Rectangle L59 = new Rectangle(0, 0, 0, 0);
Rectangle L60 = new Rectangle(0, 0, 0, 0);
Rectangle L61 = new Rectangle(0, 0, 0, 0);
Rectangle L62 = new Rectangle(0, 0, 0, 0);
Rectangle L63 = new Rectangle(0, 0, 0, 0);
Rectangle L64 = new Rectangle(0, 0, 0, 0);
Rectangle L65 = new Rectangle(0, 0, 0, 0);
Rectangle L66 = new Rectangle(0, 0, 0, 0);
Rectangle L67 = new Rectangle(0, 0, 0, 0);
Rectangle L68 = new Rectangle(0, 0, 0, 0);
Rectangle L69 = new Rectangle(0, 0, 0, 0);
Rectangle L70 = new Rectangle(0, 0, 0, 0);
Rectangle L71 = new Rectangle(0, 0, 0, 0);
Rectangle L72 = new Rectangle(0, 0, 0, 0);
Rectangle L73 = new Rectangle(0, 0, 0, 0);
Rectangle L74 = new Rectangle(0, 0, 0, 0);
Rectangle L75 = new Rectangle(0, 0, 0, 0);
Rectangle L76 = new Rectangle(0, 0, 0, 0);
Rectangle L77 = new Rectangle(0, 0, 0, 0);
Rectangle L78 = new Rectangle(0, 0, 0, 0);
Rectangle L79 = new Rectangle(0, 0, 0, 0);
Rectangle L80 = new Rectangle(0, 0, 0, 0);
Rectangle L81 = new Rectangle(0, 0, 0, 0);
Rectangle L82 = new Rectangle(0, 0, 0, 0);
Rectangle L83 = new Rectangle(0, 0, 0, 0);
Rectangle L84 = new Rectangle(0, 0, 0, 0);
Rectangle L85 = new Rectangle(0, 0, 0, 0);
Rectangle L86 = new Rectangle(0, 0, 0, 0);
Rectangle L87 = new Rectangle(0, 0, 0, 0);
Rectangle L88 = new Rectangle(0, 0, 0, 0);
Rectangle L89 = new Rectangle(0, 0, 0, 0);
Rectangle L90 = new Rectangle(0, 0, 0, 0);
Rectangle L91 = new Rectangle(0, 0, 0, 0);
Rectangle L92 = new Rectangle(0, 0, 0, 0);
Rectangle L93 = new Rectangle(0, 0, 0, 0);
Rectangle L94 = new Rectangle(0, 0, 0, 0);
Rectangle L95 = new Rectangle(0, 0, 0, 0);
Rectangle L96 = new Rectangle(0, 0, 0, 0);
Rectangle L97 = new Rectangle(0, 0, 0, 0);
Rectangle L98 = new Rectangle(0, 0, 0, 0);
Rectangle L99 = new Rectangle(0, 0, 0, 0);
Rectangle L100 = new Rectangle(0, 0, 0, 0);
Rectangle L101 = new Rectangle(0, 0, 0, 0);
Rectangle L102 = new Rectangle(0, 0, 0, 0);
Rectangle L103 = new Rectangle(0, 0, 0, 0);
Rectangle L104 = new Rectangle(0, 0, 0, 0);
Rectangle L105 = new Rectangle(0, 0, 0, 0);
Rectangle L106 = new Rectangle(0, 0, 0, 0);
Rectangle L107 = new Rectangle(0, 0, 0, 0);
Rectangle L108 = new Rectangle(0, 0, 0, 0);
Rectangle L109 = new Rectangle(0, 0, 0, 0);
Rectangle L110 = new Rectangle(0, 0, 0, 0);
Rectangle L111 = new Rectangle(0, 0, 0, 0);
Rectangle L112 = new Rectangle(0, 0, 0, 0);
Rectangle L113 = new Rectangle(0, 0, 0, 0);
Rectangle L114 = new Rectangle(0, 0, 0, 0);
Rectangle L115 = new Rectangle(0, 0, 0, 0);
Rectangle L116 = new Rectangle(0, 0, 0, 0);
Rectangle L117 = new Rectangle(0, 0, 0, 0);
Rectangle L118 = new Rectangle(0, 0, 0, 0);
Rectangle L119 = new Rectangle(0, 0, 0, 0);
Rectangle L120 = new Rectangle(0, 0, 0, 0);
Rectangle L121 = new Rectangle(0, 0, 0, 0);
Rectangle L122 = new Rectangle(0, 0, 0, 0);
Rectangle L123 = new Rectangle(0, 0, 0, 0);
Rectangle L124 = new Rectangle(0, 0, 0, 0);
Rectangle L125 = new Rectangle(0, 0, 0, 0);
Rectangle L126 = new Rectangle(0, 0, 0, 0);
Rectangle L127 = new Rectangle(0, 0, 0, 0);
Rectangle L128 = new Rectangle(0, 0, 0, 0);
Rectangle L129 = new Rectangle(0, 0, 0, 0);
Rectangle L130 = new Rectangle(0, 0, 0, 0);
Rectangle L131 = new Rectangle(0, 0, 0, 0);
#endregion
#region temp wall R
Rectangle R1 = new Rectangle(0, 0, 0, 0);
Rectangle R2 = new Rectangle(0, 0, 0, 0);
Rectangle R3 = new Rectangle(0, 0, 0, 0);
Rectangle R4 = new Rectangle(0, 0, 0, 0);
Rectangle R5 = new Rectangle(0, 0, 0, 0);
Rectangle R6 = new Rectangle(0, 0, 0, 0);
Rectangle R7 = new Rectangle(0, 0, 0, 0);
Rectangle R8 = new Rectangle(0, 0, 0, 0);
Rectangle R9 = new Rectangle(0, 0, 0, 0);
Rectangle R10 = new Rectangle(0, 0, 0, 0);
Rectangle R11 = new Rectangle(0, 0, 0, 0);
Rectangle R12 = new Rectangle(0, 0, 0, 0);
Rectangle R13 = new Rectangle(0, 0, 0, 0);
Rectangle R14 = new Rectangle(0, 0, 0, 0);
Rectangle R15 = new Rectangle(0, 0, 0, 0);
Rectangle R16 = new Rectangle(0, 0, 0, 0);
Rectangle R17 = new Rectangle(0, 0, 0, 0);
Rectangle R18 = new Rectangle(0, 0, 0, 0);
Rectangle R19 = new Rectangle(0, 0, 0, 0);
Rectangle R20 = new Rectangle(0, 0, 0, 0);
Rectangle R21 = new Rectangle(0, 0, 0, 0);
Rectangle R22 = new Rectangle(0, 0, 0, 0);
Rectangle R23 = new Rectangle(0, 0, 0, 0);
Rectangle R24 = new Rectangle(0, 0, 0, 0);
Rectangle R25 = new Rectangle(0, 0, 0, 0);
Rectangle R26 = new Rectangle(0, 0, 0, 0);
Rectangle R27 = new Rectangle(0, 0, 0, 0);
Rectangle R28 = new Rectangle(0, 0, 0, 0);
Rectangle R29 = new Rectangle(0, 0, 0, 0);
Rectangle R30 = new Rectangle(0, 0, 0, 0);
Rectangle R31 = new Rectangle(0, 0, 0, 0);
Rectangle R32 = new Rectangle(0, 0, 0, 0);
Rectangle R33 = new Rectangle(0, 0, 0, 0);
Rectangle R34 = new Rectangle(0, 0, 0, 0);
Rectangle R35 = new Rectangle(0, 0, 0, 0);
Rectangle R36 = new Rectangle(0, 0, 0, 0);
Rectangle R37 = new Rectangle(0, 0, 0, 0);
Rectangle R38 = new Rectangle(0, 0, 0, 0);
Rectangle R39 = new Rectangle(0, 0, 0, 0);
Rectangle R40 = new Rectangle(0, 0, 0, 0);
Rectangle R41 = new Rectangle(0, 0, 0, 0);
Rectangle R42 = new Rectangle(0, 0, 0, 0);
Rectangle R43 = new Rectangle(0, 0, 0, 0);
Rectangle R44 = new Rectangle(0, 0, 0, 0);
Rectangle R45 = new Rectangle(0, 0, 0, 0);
Rectangle R46 = new Rectangle(0, 0, 0, 0);
Rectangle R47 = new Rectangle(0, 0, 0, 0);
Rectangle R48 = new Rectangle(0, 0, 0, 0);
Rectangle R49 = new Rectangle(0, 0, 0, 0);
Rectangle R50 = new Rectangle(0, 0, 0, 0);
Rectangle R51 = new Rectangle(0, 0, 0, 0);
Rectangle R52 = new Rectangle(0, 0, 0, 0);
Rectangle R53 = new Rectangle(0, 0, 0, 0);
Rectangle R54 = new Rectangle(0, 0, 0, 0);
Rectangle R55 = new Rectangle(0, 0, 0, 0);
Rectangle R56 = new Rectangle(0, 0, 0, 0);
Rectangle R57 = new Rectangle(0, 0, 0, 0);
Rectangle R58 = new Rectangle(0, 0, 0, 0);
Rectangle R59 = new Rectangle(0, 0, 0, 0);
Rectangle R60 = new Rectangle(0, 0, 0, 0);
Rectangle R61 = new Rectangle(0, 0, 0, 0);
Rectangle R62 = new Rectangle(0, 0, 0, 0);
Rectangle R63 = new Rectangle(0, 0, 0, 0);
Rectangle R64 = new Rectangle(0, 0, 0, 0);
Rectangle R65 = new Rectangle(0, 0, 0, 0);
Rectangle R66 = new Rectangle(0, 0, 0, 0);
Rectangle R67 = new Rectangle(0, 0, 0, 0);
Rectangle R68 = new Rectangle(0, 0, 0, 0);
Rectangle R69 = new Rectangle(0, 0, 0, 0);
Rectangle R70 = new Rectangle(0, 0, 0, 0);
Rectangle R71 = new Rectangle(0, 0, 0, 0);
Rectangle R72 = new Rectangle(0, 0, 0, 0);
Rectangle R73 = new Rectangle(0, 0, 0, 0);
Rectangle R74 = new Rectangle(0, 0, 0, 0);
Rectangle R75 = new Rectangle(0, 0, 0, 0);
Rectangle R76 = new Rectangle(0, 0, 0, 0);
Rectangle R77 = new Rectangle(0, 0, 0, 0);
Rectangle R78 = new Rectangle(0, 0, 0, 0);
Rectangle R79 = new Rectangle(0, 0, 0, 0);
Rectangle R80 = new Rectangle(0, 0, 0, 0);
Rectangle R81 = new Rectangle(0, 0, 0, 0);
Rectangle R82 = new Rectangle(0, 0, 0, 0);
Rectangle R83 = new Rectangle(0, 0, 0, 0);
Rectangle R84 = new Rectangle(0, 0, 0, 0);
Rectangle R85 = new Rectangle(0, 0, 0, 0);
Rectangle R86 = new Rectangle(0, 0, 0, 0);
Rectangle R87 = new Rectangle(0, 0, 0, 0);
Rectangle R88 = new Rectangle(0, 0, 0, 0);
Rectangle R89 = new Rectangle(0, 0, 0, 0);
Rectangle R90 = new Rectangle(0, 0, 0, 0);
Rectangle R91 = new Rectangle(0, 0, 0, 0);
Rectangle R92 = new Rectangle(0, 0, 0, 0);
Rectangle R93 = new Rectangle(0, 0, 0, 0);
Rectangle R94 = new Rectangle(0, 0, 0, 0);
Rectangle R95 = new Rectangle(0, 0, 0, 0);
Rectangle R96 = new Rectangle(0, 0, 0, 0);
Rectangle R97 = new Rectangle(0, 0, 0, 0);
Rectangle R98 = new Rectangle(0, 0, 0, 0);
Rectangle R99 = new Rectangle(0, 0, 0, 0);
Rectangle R100 = new Rectangle(0, 0, 0, 0);
Rectangle R101 = new Rectangle(0, 0, 0, 0);
Rectangle R102 = new Rectangle(0, 0, 0, 0);
Rectangle R103 = new Rectangle(0, 0, 0, 0);
Rectangle R104 = new Rectangle(0, 0, 0, 0);
Rectangle R105 = new Rectangle(0, 0, 0, 0);
Rectangle R106 = new Rectangle(0, 0, 0, 0);
Rectangle R107 = new Rectangle(0, 0, 0, 0);
Rectangle R108 = new Rectangle(0, 0, 0, 0);
Rectangle R109 = new Rectangle(0, 0, 0, 0);
Rectangle R110 = new Rectangle(0, 0, 0, 0);
Rectangle R111 = new Rectangle(0, 0, 0, 0);
Rectangle R112 = new Rectangle(0, 0, 0, 0);
Rectangle R113 = new Rectangle(0, 0, 0, 0);
Rectangle R114 = new Rectangle(0, 0, 0, 0);
Rectangle R115 = new Rectangle(0, 0, 0, 0);
Rectangle R116 = new Rectangle(0, 0, 0, 0);
Rectangle R117 = new Rectangle(0, 0, 0, 0);
Rectangle R118 = new Rectangle(0, 0, 0, 0);
Rectangle R119 = new Rectangle(0, 0, 0, 0);
Rectangle R120 = new Rectangle(0, 0, 0, 0);
Rectangle R121 = new Rectangle(0, 0, 0, 0);
Rectangle R122 = new Rectangle(0, 0, 0, 0);
Rectangle R123 = new Rectangle(0, 0, 0, 0);
Rectangle R124 = new Rectangle(0, 0, 0, 0);
Rectangle R125 = new Rectangle(0, 0, 0, 0);
Rectangle R126 = new Rectangle(0, 0, 0, 0);
Rectangle R127 = new Rectangle(0, 0, 0, 0);
Rectangle R128 = new Rectangle(0, 0, 0, 0);
Rectangle R129 = new Rectangle(0, 0, 0, 0);
Rectangle R130 = new Rectangle(0, 0, 0, 0);
Rectangle R131 = new Rectangle(0, 0, 0, 0);
#endregion
#region permanent wall
Rectangle wall1 = new Rectangle(0, 0, 0, 0);
Rectangle wall2 = new Rectangle(0, 0, 0, 0);
Rectangle wall3 = new Rectangle(0, 0, 0, 0);
Rectangle wall4 = new Rectangle(0, 0, 0, 0);
Rectangle wall5 = new Rectangle(0, 0, 0, 0);
Rectangle wall6 = new Rectangle(0, 0, 0, 0);
Rectangle wall7 = new Rectangle(0, 0, 0, 0);
Rectangle wall8 = new Rectangle(0, 0, 0, 0);
Rectangle wall9 = new Rectangle(0, 0, 0, 0);
Rectangle wall10 = new Rectangle(0, 0, 0, 0);
Rectangle wall11 = new Rectangle(0, 0, 0, 0);
Rectangle wall12 = new Rectangle(0, 0, 0, 0);
Rectangle wall13 = new Rectangle(0, 0, 0, 0);
Rectangle wall14 = new Rectangle(0, 0, 0, 0);
Rectangle wall15 = new Rectangle(0, 0, 0, 0);
Rectangle wall16 = new Rectangle(0, 0, 0, 0);
Rectangle wall17 = new Rectangle(0, 0, 0, 0);
Rectangle wall18 = new Rectangle(0, 0, 0, 0);
Rectangle wall19 = new Rectangle(0, 0, 0, 0);
Rectangle wall20 = new Rectangle(0, 0, 0, 0);
Rectangle wall21 = new Rectangle(0, 0, 0, 0);
Rectangle wall22 = new Rectangle(0, 0, 0, 0);
Rectangle wall23 = new Rectangle(0, 0, 0, 0);
Rectangle wall24 = new Rectangle(0, 0, 0, 0);
Rectangle wall25 = new Rectangle(0, 0, 0, 0);
Rectangle wall26 = new Rectangle(0, 0, 0, 0);
Rectangle wall27 = new Rectangle(0, 0, 0, 0);
Rectangle wall28 = new Rectangle(0, 0, 0, 0);
Rectangle wall29 = new Rectangle(0, 0, 0, 0);
Rectangle wall30 = new Rectangle(0, 0, 0, 0);
Rectangle wall31 = new Rectangle(0, 0, 0, 0);
Rectangle wall32 = new Rectangle(0, 0, 0, 0);
Rectangle wall33 = new Rectangle(0, 0, 0, 0);
Rectangle wall34 = new Rectangle(0, 0, 0, 0);
Rectangle wall35 = new Rectangle(0, 0, 0, 0);
Rectangle wall36 = new Rectangle(0, 0, 0, 0);
Rectangle wall37 = new Rectangle(0, 0, 0, 0);
Rectangle wall38 = new Rectangle(0, 0, 0, 0);
Rectangle wall39 = new Rectangle(0, 0, 0, 0);
Rectangle wall40 = new Rectangle(0, 0, 0, 0);
Rectangle wall41 = new Rectangle(0, 0, 0, 0);
Rectangle wall42 = new Rectangle(0, 0, 0, 0);
Rectangle wall43 = new Rectangle(0, 0, 0, 0);
Rectangle wall44 = new Rectangle(0, 0, 0, 0);
Rectangle wall45 = new Rectangle(0, 0, 0, 0);
Rectangle wall46 = new Rectangle(0, 0, 0, 0);
Rectangle wall47 = new Rectangle(0, 0, 0, 0);
Rectangle wall48 = new Rectangle(0, 0, 0, 0);
Rectangle wall49 = new Rectangle(0, 0, 0, 0);
Rectangle wall50 = new Rectangle(0, 0, 0, 0);
Rectangle wall51 = new Rectangle(0, 0, 0, 0);
Rectangle wall52 = new Rectangle(0, 0, 0, 0);
Rectangle wall53 = new Rectangle(0, 0, 0, 0);
Rectangle wall54 = new Rectangle(0, 0, 0, 0);
Rectangle wall55 = new Rectangle(0, 0, 0, 0);
Rectangle wall56 = new Rectangle(0, 0, 0, 0);
Rectangle wall57 = new Rectangle(0, 0, 0, 0);
Rectangle wall58 = new Rectangle(0, 0, 0, 0);
Rectangle wall59 = new Rectangle(0, 0, 0, 0);
Rectangle wall60 = new Rectangle(0, 0, 0, 0);
Rectangle wall61 = new Rectangle(0, 0, 0, 0);
Rectangle wall62 = new Rectangle(0, 0, 0, 0);
Rectangle wall63 = new Rectangle(0, 0, 0, 0);
Rectangle wall64 = new Rectangle(0, 0, 0, 0);
Rectangle wall65 = new Rectangle(0, 0, 0, 0);
Rectangle wall66 = new Rectangle(0, 0, 0, 0);
Rectangle wall67 = new Rectangle(0, 0, 0, 0);
Rectangle wall68 = new Rectangle(0, 0, 0, 0);
Rectangle wall69 = new Rectangle(0, 0, 0, 0);
Rectangle wall70 = new Rectangle(0, 0, 0, 0);
Rectangle wall71 = new Rectangle(0, 0, 0, 0);
Rectangle wall72 = new Rectangle(0, 0, 0, 0);
Rectangle wall73 = new Rectangle(0, 0, 0, 0);
Rectangle wall74 = new Rectangle(0, 0, 0, 0);
Rectangle wall75 = new Rectangle(0, 0, 0, 0);
Rectangle wall76 = new Rectangle(0, 0, 0, 0);
#endregion
#region roof
Rectangle roof1 = new Rectangle(0, 0, 0, 0);
Rectangle roof2 = new Rectangle(0, 0, 0, 0);
Rectangle roof3 = new Rectangle(0, 0, 0, 0);
Rectangle roof4 = new Rectangle(0, 0, 0, 0);
Rectangle roof5 = new Rectangle(0, 0, 0, 0);
Rectangle roof6 = new Rectangle(0, 0, 0, 0);
Rectangle roof7 = new Rectangle(0, 0, 0, 0);
Rectangle roof8 = new Rectangle(0, 0, 0, 0);
Rectangle roof9 = new Rectangle(0, 0, 0, 0);
Rectangle roof10 = new Rectangle(0, 0, 0, 0);
Rectangle roof11 = new Rectangle(0, 0, 0, 0);
Rectangle roof12 = new Rectangle(0, 0, 0, 0);
Rectangle roof13 = new Rectangle(0, 0, 0, 0);
Rectangle roof14 = new Rectangle(0, 0, 0, 0);
Rectangle roof15 = new Rectangle(0, 0, 0, 0);
Rectangle roof16 = new Rectangle(0, 0, 0, 0);
Rectangle roof17 = new Rectangle(0, 0, 0, 0);
Rectangle roof18 = new Rectangle(0, 0, 0, 0);
Rectangle roof19 = new Rectangle(0, 0, 0, 0);
Rectangle roof20 = new Rectangle(0, 0, 0, 0);
Rectangle roof21 = new Rectangle(0, 0, 0, 0);
Rectangle roof22 = new Rectangle(0, 0, 0, 0);
Rectangle roof23 = new Rectangle(0, 0, 0, 0);
Rectangle roof24 = new Rectangle(0, 0, 0, 0);
Rectangle roof25 = new Rectangle(0, 0, 0, 0);
Rectangle roof26 = new Rectangle(0, 0, 0, 0);
Rectangle roof27 = new Rectangle(0, 0, 0, 0);
Rectangle roof28 = new Rectangle(0, 0, 0, 0);
Rectangle roof29 = new Rectangle(0, 0, 0, 0);
Rectangle roof30 = new Rectangle(0, 0, 0, 0);
Rectangle roof31 = new Rectangle(0, 0, 0, 0);
Rectangle roof32 = new Rectangle(0, 0, 0, 0);
Rectangle roof33 = new Rectangle(0, 0, 0, 0);
Rectangle roof34 = new Rectangle(0, 0, 0, 0);
Rectangle roof35 = new Rectangle(0, 0, 0, 0);
Rectangle roof36 = new Rectangle(0, 0, 0, 0);
Rectangle roof37 = new Rectangle(0, 0, 0, 0);
Rectangle roof38 = new Rectangle(0, 0, 0, 0);
Rectangle roof39 = new Rectangle(0, 0, 0, 0);
Rectangle roof40 = new Rectangle(0, 0, 0, 0);
Rectangle roof41 = new Rectangle(0, 0, 0, 0);
Rectangle roof42 = new Rectangle(0, 0, 0, 0);
Rectangle roof43 = new Rectangle(0, 0, 0, 0);
Rectangle roof44 = new Rectangle(0, 0, 0, 0);
Rectangle roof45 = new Rectangle(0, 0, 0, 0);
#endregion
#region 5-2
Rectangle dagger1Box = new Rectangle(0, 0, 0, 0);
Rectangle dagger2Box = new Rectangle(0, 0, 0, 0);
Rectangle dagger3Box = new Rectangle(0, 0, 0, 0);
#endregion
#endregion
#region alt controls
bool controlsLook = false;
int controlsMenuPos = 0;
#region commands
int jumpVal = 27;
bool jumpTrue = false;
bool jumpAssign = false;
int clawVal = 26;
bool clawTrue = false;
bool clawAssign = false;
int breathVal = 15;
bool breathTrue = false;
bool breathAssign = false;
int confVal = 28;
bool confTrue = false;
bool confAssign = false;
int swlVal = 16;
bool swlTrue = false;
bool swlAssign = false;
int swrVal = 17;
bool swrTrue = false;
bool swrAssign = false;
int leftVal = 49;
bool leftTrue = false;
bool leftAssign = false;
int rightVal = 50;
bool rightTrue = false;
bool rightAssign = false;
int upVal = 51;
bool upTrue = false;
bool upAssign = false;
int downVal = 52;
bool downTrue = false;
bool downAssign = false;
#endregion
#region display
int jumpControlX = 2;
int jumpControlY = 1;
int clawControlX = 0;
int clawControlY = 2;
int breathControlX = 0;
int breathControlY = 1;
int confControlX = 2;
int confControlY = 2;
int swlControlX = 1;
int swlControlY = 1;
int swrControlX = 2;
int swrControlY = 1;
int leftControlX = 0;
int leftControlY = 5;
int rightControlX = 1;
int rightControlY = 5;
int upControlX = 2;
int upControlY = 5;
int downControlX = 3;
int downControlY = 5;
#endregion
#endregion
//related to bosses
#region All Boss Variables
bool boss1Clear, boss2Clear, boss3Clear, boss4Clear, boss5Clear, boss6Clear;
#region Boss 1 Variables
int boss1HP = 20;
int boss1X = 0;
int boss1Y = 0;
int boss1Stamina = 10;
int boss1CT = 0;
int boss1Frame = 0;
int boss1Act = 0;
int boss1Facing = 0; //flip 13
int boss1AttackTimer = 0;
int boss1WaitTimer = 0;
int boss1AttackCT = 0;
int boss1ProjFrameCT = 0;
int boss1AttackFrame = 0;
int boss1AttackAct = 0;
int boss1Opacity = 255;
int boss1invTimer = 0;
int boss1knockbackTimer = 0;
int boss1hitTimer = 0;
int boss1invBlink = 255;
int boss1Disappear = 255;
int boss1FireVul = 2;
int boss1ExhaustedRecharge = 0;
int bossCounterCooldown = 0;
bool needRand, haveRand = false;
int checkRand = 0;
bool boss1Knockback, boss1ClawHit, boss1BreathHit = false;
bool boss1Counter = false;
bool boss1FaceL = false;
bool attackThunderbolt = false;
bool attackThunderblast = false;
bool attackThundercloud = false;
bool attackThundercloudMove = false;
bool attackThundercloudShock = false;
bool attackThunderslash = false;
bool boltUp, boltDn = false;
bool slash1, slash2, slash3, slash4, slash5, slash6, slash7, slash8 = false;
int slash1CT, slash2CT, slash3CT, slash4CT, slash5CT, slash6CT, slash7CT,
slash8CT, slash1Frame, slash2Frame, slash3Frame, slash4Frame, slash5Frame,
slash6Frame, slash7Frame, slash8Frame = 0;
int slashFacing, blastFacing = 0;
int slashEvenY, slashOddY = 0;
int boltUpX = 0;
int boltUpY = 482;
int boltDnX = 0;
int boltDnY = 605;
int cloud1X, cloud2X, cloud3X, cloud4X, cloudY, cloud1XMax, cloud2XMax,
cloud3XMax, cloud4XMax = 0;
int attackFrame = 0;
int attackAct = 0;
int attackFacing = 0;
int counterFrame = 0;
int thunderBlastX = 0;
bool boss1Exhausted = false;
bool dragonLook = false;
int dragonLookCT, dragonLookWait, dragonLookY = 0;
bool mogLook = false;
int mogLookCT, mogLookWait, mogLookX = 0;
bool ninjaLook = false;
int ninjaLookCT, ninjaLookWait, ninjaLookY = 0;
#endregion
#region Boss 2 Variables
int captainCT = 0;
int captainFrame = 0;
int captainAct = 0;
int captainInvBlink = 0;
int captainInvCounter = 0;
float rocket1Z = 0;
float rocket2Z = 0;
float rocket3Z = 0;
float rocket4Z = 0;
int shipHP = 60;
bool captainAttackSide = false;
bool captainAttackTop = false;
bool captainAttackLaser = false;
bool standOnRocket = false;
int rocketStandVel = 0;
int captainReload = 0;
int captainRNG = 0;
int smoke1CT = 0;
int smoke1Frame = 0;
int smoke1Act = 0;
int rocketDiag1X = 0;
int rocketDiag1Y = 0;
bool smoke1On = false;
bool rocketDiag1On = false;
int smoke2CT = 0;
int smoke2Frame = 0;
int smoke2Act = 0;
int rocketDiag2X = 0;
int rocketDiag2Y = 0;
bool smoke2On = false;
bool rocketDiag2On = false;
int smoke3CT = 0;
int smoke3Frame = 0;
int smoke3Act = 0;
int rocketDiag3X = 0;
int rocketDiag3Y = 0;
bool smoke3On = false;
bool rocketDiag3On = false;
int smoke4CT = 0;
int smoke4Frame = 0;
int smoke4Act = 0;
int rocketDiag4X = 0;
int rocketDiag4Y = 0;
bool smoke4On = false;
bool rocketDiag4On = false;
int rocket1Atk = 2;
int rocket1CT = 0;
int rocket1Frame = 0;
int rocket1Act = 0;
int rocket1Vel = 0;
int rocket1VelTimer = 0;
bool rocket1On = false;
bool rocket1Move = false;
int rocket2Atk = 2;
int rocket2CT = 0;
int rocket2Frame = 0;
int rocket2Act = 0;
int rocket2Vel = 0;
int rocket2VelTimer = 0;
bool rocket2On = false;
bool rocket2Move = false;
int rocket3Atk = 2;
int rocket3CT = 0;
int rocket3Frame = 0;
int rocket3Act = 0;
int rocket3Vel = 0;
int rocket3VelTimer = 0;
bool rocket3On = false;
bool rocket3Move = false;
int rocket4Atk = 2;
int rocket4CT = 0;
int rocket4Frame = 0;
int rocket4Act = 0;
int rocket4Vel = 0;
int rocket4VelTimer = 0;
bool rocket4On = false;
bool rocket4Move = false;
int rocket1X = 0;
int rocket1Y = 0;
int rocket2X = 0;
int rocket2Y = 0;
int rocket3X = 0;
int rocket3Y = 0;
int rocket4X = 0;
int rocket4Y = 0;
int scanAtk = 8;
int scanCounter = 0;
int scanLaserCT = 0;
int scanLaserFrame = 0;
int scanLaserX = 0;
int scanLaserY = 0;
bool scanLaserOn = false;
int trackLaserCT = 0;
int trackLaserOpacity = 0;
int trackerCT = 0;
int trackerFrame = 0;
int trackerVerticalX = 0;
int trackerVerticalY = 0;
int trackerHorizontalX = 0;
int trackerHorizontalY = 0;
bool trackerOn = false;
int shipExplosionCT = 0;
#endregion
#region Boss 3 Variables
int boss3Wait = 0;
int boss3ActFirst = 0;
bool boss3Start = false;
bool hitBySuper = false;
int boss3ClearCT = 0;
int baldwinInvTimer = 0;
int alexInvTimer = 0;
int baldwinKnockbackCT = 0;
int alexKnockbackCT = 0;
bool baldwinEscape = false;
bool alexEscape = false;
#region baldwin
int baldwinHP = 50;
int baldwinShockCT = 0;
bool baldwinShock = false;
bool baldwinOnGround = true;
int baldwinX = 1000;
int baldwinY = 504;
bool baldwinFaceR = false;
int baldwinCT = 0;
int baldwinFrame = 0;
int baldwinAct = 0;
int jetX = 0;
int jetCT = 0;
int jetFrame = 0;
int jetAct = 0;
bool jetOn = false;
int baldwinProjSequence = 0;
bool baldwinProjOn = false;
int baldwinProj1CT = 0;
int baldwinProj1Frame = 0;
int baldwinProj1Act = 0;
int baldwinProj1X = 0;
int baldwinProj1Y = 0;
int baldwinProj1YVel = 0;
int baldwinProj1Wait = 0;
bool baldwinProj1On = false;
int baldwinProj2CT = 0;
int baldwinProj2Frame = 0;
int baldwinProj2Act = 0;
int baldwinProj2X = 0;
int baldwinProj2Y = 0;
int baldwinProj2YVel = 0;
int baldwinProj2Wait = 0;
bool baldwinProj2On = false;
int baldwinProj3CT = 0;
int baldwinProj3Frame = 0;
int baldwinProj3Act = 0;
int baldwinProj3X = 0;
int baldwinProj3Y = 0;
int baldwinProj3YVel = 0;
int baldwinProj3Wait = 0;
bool baldwinProj3On = false;
int baldwinProj4CT = 0;
int baldwinProj4Frame = 0;
int baldwinProj4Act = 0;
int baldwinProj4X = 0;
int baldwinProj4Y = 0;
int baldwinProj4YVel = 0;
int baldwinProj4Wait = 0;
bool baldwinProj4On = false;
int baldwinProj5CT = 0;
int baldwinProj5Frame = 0;
int baldwinProj5Act = 0;
int baldwinProj5X = 0;
int baldwinProj5Y = 0;
int baldwinProj5YVel = 0;
int baldwinProj5Wait = 0;
bool baldwinProj5On = false;
int baldwinReload = 0;
int baldwinRNG = 0;
int baldwinSuperCounter = 0;
int baldwinSuperCharge = 0;
int baldwinSuperCT = 0;
int baldwinSuperFrame = 0;
int baldwinSuperAct = 0;
int baldwinSuperWait = 0;
int baldwinSuperPost = 0;
bool baldwinSuperOn = false;
int baldwinBurnerCT = 0;
int baldwinBurnerFrame = 0;
int baldwinBurnerAct = 0;
int baldwinBurnerWait = 0;
int baldwinBurnerReload = 0;
bool baldwinBurnerOn = false;
int baldwinInvBlink = 255;
int baldwinHitTimer = 0;
bool baldwinInvulnerable = false;
bool baldwinBreathHit = false;
bool baldwinClawHit = false;
bool baldwinKnockback = false;
#endregion
#region alex
int alexHP = 50;
int alexShockCT = 0;
bool alexShock = false;
bool alexOnGround = true;
bool alexWarp = false;
int alexWarpWait = 0;
int alexX = 141;
int alexY = 504;
bool alexFaceR = true;
int alexFacing = 0;
int alexCT = 0;
int alexFrame = 0;
int alexAct = 0;
int alexVoiceX = 0;
int alexVoiceY = 0;
int alexVoiceType = 4;
bool alexVoiceOn = false;
int alexSlashCT = 0;
int alexSlashFrame = 0;
bool alexSlashOn = false;
bool alexSlashFinished = false;
int alexReload = 0;
int alexRNG = 0;
int alexSuperCounter = 0;
int alexSuperCharge = 0;
int alexSuperCT = 0;
int alexSuperFrame = 0;
int alexSuperAct = 0;
int alexSuperWait = 0;
int alexSuperPost = 0;
bool alexSuperOn = false;
int alexLaserX = 0;
int alexLaserY = 0;
int alexLaserCT = 0;
int alexLaserFrame = 0;
bool alexLaserOn = false;
int alexInvBlink = 255;
int alexHitTimer = 0;
bool alexInvulnerable = false;
bool alexBreathHit = false;
bool alexClawHit = false;
bool alexKnockback = false;
#endregion
#endregion
#region Boss 4 Variables
int wardenHP = 30;
int entHP = 60;
int rootsHP = 40;
int boss4ClearCT = 0;
bool rootsOn = true;
bool entOn = true;
int entHeadYPos = 1;
int entHeadYVel = 0;
int entHeadVelCT = 0;
bool rootsClawHit = false;
bool rootsBreathHit = false;
int rootsHitWait = 0;
bool entClawHit = false;
bool entBreathHit = false;
int entHitWait = 0;
bool wardenHit = false;
int wardenHitWait = 0;
int wardenFrame = 0;
int wardenCT = 0;
int wardenAct = 0;
int wardenBlink = 255;
int wardenInvTimer = 0;
int entArmFrame = 0;
int entArmCT = 0;
int entArmAct = 0;
int entBodyFrame = 0;
int entBodyCT = 0;
int entBodyBlink = 255;
int entBodyInvTimer = 0;
int entRootFrame = 0;
int entRootCT = 0;
int entRootAct = 0;
int entRootBlink = 255;
int entRootInvTimer = 0;
int sweepReload = 0;
int hairshotReload = 0;
int wardenReload = 0;
int wardenRNG = 0;
int hairshotSerial = 0;
int sweepX = 0;
int sweepFrame = 0;
int sweepCT = 0;
bool sweepOn = false;
int hair1X = 0;
int hair1Y = 0;
int hair1Frame = 0;
int hair1CT = 0;
int hair1Act = 0;
int hair1Vel = 0;
bool hair1On = false;
int hair2X = 0;
int hair2Y = 0;
int hair2Frame = 0;
int hair2CT = 0;
int hair2Act = 0;
int hair2Vel = 0;
bool hair2On = false;
int hair3X = 0;
int hair3Y = 0;
int hair3Frame = 0;
int hair3CT = 0;
int hair3Act = 0;
int hair3Vel = 0;
bool hair3On = false;
int hair4X = 0;
int hair4Y = 0;
int hair4Frame = 0;
int hair4CT = 0;
int hair4Act = 0;
int hair4Vel = 0;
bool hair4On = false;
int hair5X = 0;
int hair5Y = 0;
int hair5Frame = 0;
int hair5CT = 0;
int hair5Act = 0;
int hair5Vel = 0;
bool hair5On = false;
int grabX = 0;
int grabY = 0;
int grabFrame = 0;
int grabCT = 0;
int grabXVel = 0;
int grabYVel = 0;
int grabVelCT = 0;
int grabWait = 0;
bool drgnGrab = false;
bool grabOn = false;
bool grabSlam = false;
bool grabOff = false;
int spikesDuration = 0;
bool spikesAttackOn = false;
int spikes1Type = 0;
int spikes1X = 0;
int spikes1Frame = 0;
int spikes1CT = 0;
int spikes1Act = 0;
bool spikes1On = false;
int spikes2Type = 0;
int spikes2X = 0;
int spikes2Frame = 0;
int spikes2CT = 0;
int spikes2Act = 0;
bool spikes2On = false;
int spikes3Type = 0;
int spikes3X = 0;
int spikes3Frame = 0;
int spikes3CT = 0;
int spikes3Act = 0;
bool spikes3On = false;
int spikes4Type = 0;
int spikes4X = 0;
int spikes4Frame = 0;
int spikes4CT = 0;
int spikes4Act = 0;
bool spikes4On = false;
int spikes5Type = 0;
int spikes5X = 0;
int spikes5Frame = 0;
int spikes5CT = 0;
int spikes5Act = 0;
bool spikes5On = false;
int spikes6Type = 0;
int spikes6X = 0;
int spikes6Frame = 0;
int spikes6CT = 0;
int spikes6Act = 0;
bool spikes6On = false;
int spikes7Type = 0;
int spikes7X = 0;
int spikes7Frame = 0;
int spikes7CT = 0;
int spikes7Act = 0;
bool spikes7On = false;
int spikes8Type = 0;
int spikes8X = 0;
int spikes8Frame = 0;
int spikes8CT = 0;
int spikes8Act = 0;
bool spikes8On = false;
int spikeTele1CT = 0;
int spikeTele1Frame = 0;
int spikeTele1Wait = 0;
bool spikeTele1On = false;
int spikeTele2CT = 0;
int spikeTele2Frame = 0;
int spikeTele2Wait = 0;
bool spikeTele2On = false;
int spikeTele3CT = 0;
int spikeTele3Frame = 0;
int spikeTele3Wait = 0;
bool spikeTele3On = false;
int spikeTele4CT = 0;
int spikeTele4Frame = 0;
int spikeTele4Wait = 0;
bool spikeTele4On = false;
int spikeTele5CT = 0;
int spikeTele5Frame = 0;
int spikeTele5Wait = 0;
bool spikeTele5On = false;
int spikeTele6CT = 0;
int spikeTele6Frame = 0;
int spikeTele6Wait = 0;
bool spikeTele6On = false;
int spikeTele7CT = 0;
int spikeTele7Frame = 0;
int spikeTele7Wait = 0;
bool spikeTele7On = false;
int spikeTele8CT = 0;
int spikeTele8Frame = 0;
int spikeTele8Wait = 0;
bool spikeTele8On = false;
int spikes1Wait = 0;
int spikes2Wait = 0;
int spikes3Wait = 0;
int spikes4Wait = 0;
int spikes5Wait = 0;
int spikes6Wait = 0;
int spikes7Wait = 0;
int spikes8Wait = 0;
#endregion
#region Boss 5 variables
bool boss5Phase1 = false;
bool boss5Phase2 = false;
bool boss5Transition = false;
bool kingAngry = false;
bool kingTantrum = false;
bool greenSmoke = false;
bool yellowSmoke = false;
bool redSmoke = false;
bool purpleSmoke = false;
bool yellowPlayedSound = false;
bool redPlayedSound = false;
bool purplePlayedSound = false;
bool e1Escape = false;
bool e1Dodge = false;
bool e1Throw = false;
bool e1ProjHit = false;
bool e2Escape = false;
bool e2Dodge = false;
bool e2Throw = false;
bool e2ProjHit = false;
bool e3Escape = false;
bool e3Dodge = false;
bool e3Throw = false;
bool e3ProjHit = false;
bool e3PillarOn = false;
bool e4Escape = false;
bool e4Dodge = false;
bool e4Throw = false;
bool e4ProjHit = false;
bool e4GasOn = false;
int e1ScarecrowFrame = 0;
int e1EscapeFrame = 0;
int thunderCall1X, thunderCall2X, thunderCall3X = 0;
int e2ScarecrowFrame = 0;
int e2EscapeFrame = 0;
int satlaser1X, satlaser2X, satlaser3X = 0;
int e3ScarecrowFrame = 0;
int e3EscapeFrame = 0;
int e3attackTimer = 0;
int e3projOrientation = 0;
int spark1X, spark1Y, spark2X, spark2Y, spark3X, spark3Y = 0;
int sparkvelX1, sparkvelX2, sparkvelX3 = 0;
int pillar1X, pillar2X, pillar3X = 0;
int e3projectileVel = 0;
int e3YvelCT = 0;
int pillarAct = 0;
int pillarDuration = 0;
int e4ScarecrowFrame = 0;
int e4EscapeFrame = 0;
int orb1X, orb1Y, orb2X, orb2Y, orb3X, orb3Y = 0;
int orbVelX1, orbVelX2, orbVelX3 = 0;
int gas1X, gas2X, gas3X = 0;
int e4projectileVel = 0;
int e4YvelCT = 0;
int kingCT = 0;
int kingAct = 0;
int kingFrame = 0;
int crownX = 0;
int crownY = 0;
int crownYvel = 0;
int greenAttackAlt, purpleAttackAlt, redAttackAlt, yellowAttackAlt = 0;
#endregion
#region Boss 6
int boss6CT = 0;
int boss6Frame = 0;
int boss6Opacity = 0;
int boss6Blink = 0;
int boss6Hide = 0;
int boss6HP = 60;
int computerCT = 0;
int computerFrame = 0;
int probe1Wait = 0;
int probe2Wait = 0;
int boss6ProjCT = 0;
int boss6ProjFrame = 0;
int boss6Reload = 0;
int boss6AttackCT = 0;
int boss6Proj1X = 0;
int boss6Proj1Y = 0;
int boss6Proj1Vel = 0;
bool boss6Proj1On = false;
int boss6Proj2X = 0;
int boss6Proj2Y = 0;
int boss6Proj2Vel = 0;
bool boss6Proj2On = false;
int boss6Proj3X = 0;
int boss6Proj3Y = 0;
int boss6Proj3Vel = 0;
bool boss6Proj3On = false;
int boss6Proj4X = 0;
int boss6Proj4Y = 0;
int boss6Proj4Vel = 0;
bool boss6Proj4On = false;
int boss6Proj5X = 0;
int boss6Proj5Y = 0;
int boss6Proj5Vel = 0;
bool boss6Proj5On = false;
int boss6Proj6X = 0;
int boss6Proj6Y = 0;
int boss6Proj6Vel = 0;
bool boss6Proj6On = false;
int boss6Proj7X = 0;
int boss6Proj7Y = 0;
int boss6Proj7Vel = 0;
bool boss6Proj7On = false;
int boss6Proj8X = 0;
int boss6Proj8Y = 0;
int boss6Proj8Vel = 0;
bool boss6Proj8On = false;
int boss6Proj9X = 0;
int boss6Proj9Y = 0;
int boss6Proj9Vel = 0;
bool boss6Proj9On = false;
int boss6Proj10X = 0;
int boss6Proj10Y = 0;
int boss6Proj10Vel = 0;
bool boss6Proj10On = false;
int boss6Proj11X = 0;
int boss6Proj11Y = 0;
int boss6Proj11Vel = 0;
bool boss6Proj11On = false;
int boss6Proj12X = 0;
int boss6Proj12Y = 0;
int boss6Proj12Vel = 0;
bool boss6Proj12On = false;
int boss6Proj13X = 0;
int boss6Proj13Y = 0;
int boss6Proj13Vel = 0;
bool boss6Proj13On = false;
int boss6Proj14X = 0;
int boss6Proj14Y = 0;
int boss6Proj14Vel = 0;
bool boss6Proj14On = false;
int boss6Proj15X = 0;
int boss6Proj15Y = 0;
int boss6Proj15Vel = 0;
bool boss6Proj15On = false;
int boss6Proj16X = 0;
int boss6Proj16Y = 0;
int boss6Proj16Vel = 0;
bool boss6Proj16On = false;
int boss6Proj17X = 0;
int boss6Proj17Y = 0;
int boss6Proj17Vel = 0;
bool boss6Proj17On = false;
int boss6Proj18X = 0;
int boss6Proj18Y = 0;
int boss6Proj18Vel = 0;
bool boss6Proj18On = false;
int boss6Proj19X = 0;
int boss6Proj19Y = 0;
int boss6Proj19Vel = 0;
bool boss6Proj19On = false;
int boss6Proj20X = 0;
int boss6Proj20Y = 0;
int boss6Proj20Vel = 0;
bool boss6Proj20On = false;
bool boss6BreathHit = false;
bool boss6ClawHit = false;
bool boss6Invulnerable = false;
int boss6InvTimer = 0;
int boss6HitTimer = 0;
bool boss6On = true;
#endregion
#region Boss 7 variables
bool boss7Phase1 = false;
bool boss7Phase2 = false;
int generalXPos = 0;
int generalHP = 0;
int generalCT = 0;
int generalFrame = 0;
int generalAct = 0;
bool exhaustSmoke = false;
int mechThunderSpeedCap = 0;
int mechThunderCTDelay = 0;
int mechKingCT = 0;
int mechKingFrame = 0;
int mechKingAct = 0;
bool mechThunderSFX = false;
int mechHeadHitWait = 0;
int mechStaffHitWait = 0;
int mechSwordHitWait = 0;
int mechBroochHitWait = 0;
int mechFistHitWait = 0;
int mechExhaustHitWait = 0;
int drgnThunderFrame = 0;
int drgnThunderCT = 0;
int drgnThunderCharge = 0;
int mechThunderWait = 0;
int thunderStrikeFrame = 0;
int thunderStrikeCT = 0;
bool drgnThunderStrike = false;
int mechFistHP = 40;
int mechStaffHP = 40;
int mechSwordHP = 40;
int mechBroochHP = 40;
int mechHeadHP = 200;
int mechExhaustHP = 40;
int mechFistDamage = 0;
int mechStaffDamage = 0;
int mechSwordDamage = 0;
int mechBroochDamage = 0;
int mechExhaustDamage = 0;
int mechHeadXPos = 0;
int mechHeadYPos = 0;
int mechHeadCT = 0;
int mechHeadFrame = 0;
int mechHeadAct = 0;
int mechHeadRNG = 0;
int mechHeadVel = 0;
int mechHeadSerial = 0;
int mechHeadRest = 0;
int mechExhaustCT = 0;
int mechExhaustFrame = 0;
int mechIntakeCT = 0;
int mechIntakeFrame = 0;
int mechExhaustInvBlink = 255;
int mechLaserCharge = 0;
int mechLaserCT = 0;
int mechLaserFrame = 0;
int mechLaserAct = 0;
int mechLaserShockCT = 0;
int mechLaserShockFrame = 0;
bool mechHeadLaserOn = false;
bool mechHeadChargeOn = false;
int mechLaserWait = 0;
int mechFistCharge = 0;
int mechFistCT = 0;
int mechFistFrame = 0;
int mechFistAct = 0;
int mechFistX = 0;
int mechFistFarX = 0;
int mechFistNearX = 0;
int mechFistWait = 0;
int mechHandStatus = 0;
int mechFistVelCT = 0;
int mechFistVel = 1;
int mechBroochFrame = 0;
int mechBroochAct = 0;
int mechBroochCT = 0;
int mechThunderCharge = 0;
int mechThunderVel = 0;
int mechThunderX = 0;
int mechThunderCT = 0;
int mechThunderFrame = 0;
int mechThunderAct = 0;
int mechThunderVelCT = 0;
int mechCloudsFwdX1 = 0;
int mechCloudsFwdX2 = 0;
int mechCloudsFwdX3 = 0;
int mechCloudsBackX1 = 0;
int mechCloudsBackX2 = 0;
int mechCloudsBackX3 = 0;
int mechTeslaFrame = 0;
int mechTeslaCT = 0;
int mechTeslaAct = 0;
int mechTeslaY = 0;
bool mechTeslaOn = false;
int mechFeedbackCT = 0;
int mechFeedbackFrame = 0;
bool mechFeedbackOn = false;
int mechSwordFrame = 0;
int mechFireCharge = 0;
int mechFireCT = 0;
int mechFireFrame = 0;
int mechFireWait = 0;
int mechFireChargeFrame = 0;
int mechFireChargeCT = 0;
int mechIceCharge = 0;
int mechIceFormation = 0;
int mechIceCT1 = 0;
int mechIceFrame1 = 0;
int mechIceX1 = 0;
int mechIceY1 = 0;
int mechIceCT2 = 0;
int mechIceFrame2 = 0;
int mechIceX2 = 0;
int mechIceY2 = 0;
int mechIceCT3 = 0;
int mechIceFrame3 = 0;
int mechIceX3 = 0;
int mechIceY3 = 0;
int mechIceCT4 = 0;
int mechIceFrame4 = 0;
int mechIceX4 = 0;
int mechIceY4 = 0;
int mechIceCT5 = 0;
int mechIceFrame5 = 0;
int mechIceX5 = 0;
int mechIceY5 = 0;
int mechIceCT6 = 0;
int mechIceFrame6 = 0;
int mechIceX6 = 0;
int mechIceY6 = 0;
int mechIceCT7 = 0;
int mechIceFrame7 = 0;
int mechIceX7 = 0;
int mechIceY7 = 0;
int mechIceCT8 = 0;
int mechIceFrame8 = 0;
int mechIceX8 = 0;
int mechIceY8 = 0;
int mechScepterFrame = 0;
int mechScepterAct = 0;
int mechScepterCT = 0;
int mechExplosionCT1 = 0;
int mechExplosionFrame1 = 0;
int mechExplosionX1 = 0;
int mechExplosionY1 = 0;
int mechExplosionCT2 = 0;
int mechExplosionFrame2 = 0;
int mechExplosionX2 = 0;
int mechExplosionY2 = 0;
int mechExplosionCT3 = 0;
int mechExplosionFrame3 = 0;
int mechExplosionX3 = 0;
int mechExplosionY3 = 0;
int mechExplosionCT4 = 0;
int mechExplosionFrame4 = 0;
int mechExplosionX4 = 0;
int mechExplosionY4 = 0;
int mechExplosionCT5 = 0;
int mechExplosionFrame5 = 0;
int mechExplosionX5 = 0;
int mechExplosionY5 = 0;
bool mechThunderAttack = false;
bool mechLaserAttack = false;
bool mechFireAttack = false;
bool mechIceAttack = false;
bool mechPunchAttack = false;
bool mechFistBroken = false;
bool mechBroochBroken = false;
bool mechStaffBroken = false;
bool mechSwordBroken = false;
bool mechExhaustBroken = false;
bool generalHit = false;
bool mechFistHit = false;
bool mechBroochHit = false;
bool mechStaffHit = false;
bool mechSwordHit = false;
bool mechExhaust = false;
int generalInvCT = 0;
int mechFistInvCT = 0;
int mechStaffInvCT = 0;
int mechSwordInvCT = 0;
int mechHeadInvCT = 0;
int mechExhaustInvCT = 0;
int mechBroochInvCT = 0;
int generalInvBlink = 255;
int mechFistInvBlink = 255;
int mechStaffInvBlink = 255;
int mechSwordInvBlink = 255;
int mechBroochInvBlink = 255;
int mechHeadInvBlink = 255;
int mechCloudOpacity = 0;
int mechProgramDelay = 0;
int mechLaserDuration = 0;
int mechThunderDuration = 0;
bool mechHeadClawHit = false;
bool mechStaffClawHit = false;
bool mechFistClawHit = false;
bool mechHeadFireHit = false;
bool mechStaffFireHit = false;
bool mechFistFireHit = false;
bool mechSwordDamaged = false;
bool mechBroochDamaged = false;
bool mechExhaustDamaged = false;
bool mechStaffDamaged = false;
bool mechHeadHit = false;
bool mechExhaustHit = false;
int mechDefeatExplosionCT = 0;
bool broochExplosion = false;
bool staffExplosion = false;
bool fistExplosion = false;
bool exhaustExplosion = false;
bool swordExplosion = false;
#endregion
#region inv variables
int alexHitDelay = 0;
int baldwinHitDelay = 0;
int rootHitDelay = 0;
int bodyHitDelay = 0;
int redHitDelay = 0;
int greenHitDelay = 0;
int purpleHitDelay = 0;
int headHitDelay = 0;
#endregion
#endregion
#region Event Variables
int truckX, truckFrame, truckAct, truckCT, truckSmokeFrame, truckCharge = 0;
bool truckSpawn = false;
#endregion
#region Steamworks Var
bool zeroException = false;
#endregion
#region Ending variables
int endingTextTimer = 0;
int endingOverlayFrame = 0;
int endingFlightCT = 0;
int endingFlightFrame = 0;
int endingFlightAct = 0;
int endingFlightXPos = 0;
int endingFlightCycle = 0;
int creditsMonsterCT = 0;
int creditsMonsterFrame = 0;
int creditsBackgroundX1 = 0;
int creditsBackgroundX2 = 0;
int creditsBackgroundX3 = 0;
int creditsBackgroundY1 = 0;
int creditsBackgroundY2 = 0;
int creditsBackgroundY3 = 0;
int creditsBackgroundCycle = 0;
int credits1Y, credits2Y, credits3Y, credits4Y, credits5Y, credits6Y,
credits7Y, credits8Y, credits9Y, credits10Y, credits11Y, credits12Y = 0;
int creditsDragonCT = 0;
int creditsDragonFrame = 0;
int creditsDragonX = 0;
int creditsPrincessCT = 0;
int creditsPrincessFrame = 0;
int creditsPrincessX = 0;
int creditsGirlCT = 0;
int creditsGirlFrame = 0;
int creditsGirlX = 0;
int creditsBoyCT = 0;
int creditsBoyFrame = 0;
int creditsBoyX = 0;
int creditsMusicWait = 0;
int creditsMusicBox = 0;
#endregion
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Resolution.Init(ref graphics);
Content.RootDirectory = "Content";
string saveFolder = "A Game About a Dragon";
string saveFile = "Dragon.sav";
save = new StorageDeviceSaveManager(saveFolder, saveFile);
}
/// <summary>
/// Allows the game to perform any initialization it needs to before
starting to run.
/// This is where it can query for any required services and load any non-
graphic
/// related content. Calling base.Initialize will enumerate through any
components
/// and initialize them as well.
/// </summary>
protected override void Initialize()
{
base.Initialize();
MediaPlayer.IsRepeating = true;
}
protected override void LoadContent()
{
stageManager = new ContentManager(Services, "Content");
storyManager = new ContentManager(Services, "Content");
mapManager = new ContentManager(Services, "Content");
breathSFX = new ContentManager(Services, "Content");
stageBGM = new ContentManager(Services, "Content");
worldBGM = new ContentManager(Services, "Content");
storyBGM = new ContentManager(Services, "Content");
spriteBatch = new SpriteBatch(GraphicsDevice);
achievements = new Achievements();
achievements.Initialize();
//m_GameOverlayActivated == Callback<GameOverlayActivated_t>.Create
(dispatchdelegatefunction);
if (titleLoad == false)
{
titleLoad = true;
save.Load();
}
#region Resolution
saveRes = save.Data.resSetting;
if (saveRes > 3 || saveRes < 0)
{
saveRes = 0;
}
if (saveRes <= 0)
{
Resolution.SetVirtualResolution(1280, 800);
Resolution.SetResolution(1280, 800, false);
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 800;
resMod = 0;
resNow = 0;
}
else if (saveRes == 1)
{
Resolution.SetVirtualResolution(1280, 720);
Resolution.SetResolution(1280, 720, false);
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
resMod = 40;
resNow = 1;
}
else if (saveRes == 2)
{
Resolution.SetVirtualResolution(1280, 800);
Resolution.SetResolution(1280, 720, true);
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
resMod = 40;
resNow = 1;
}
else if (saveRes >= 3)
{
Resolution.SetVirtualResolution(1280, 720);
Resolution.SetResolution(1280, 720, true);
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
resMod = 40;
resNow = 1;
}
graphics.ApplyChanges();
#endregion
#region Always Load
blackMatteSS = Content.Load<Texture2D>("System/matteblack");
whiteMatteSS = Content.Load<Texture2D>("System/mattewhite");
optionsNumbers = this.Content.Load<Texture2D>("Title/volume_list");
campfireSS = this.Content.Load<Texture2D>
("Player/campfire_spritesheet");
smokeSS = this.Content.Load<Texture2D>("Player/smoke_spritesheet");
warpSS = this.Content.Load<Texture2D>("Player/warp_spritesheet");
splashSS = this.Content.Load<Texture2D>("Player/splash_spritesheet");
hudHP = this.Content.Load<Texture2D>("HUD/spritesheet_HP");
hpNumbers = this.Content.Load<Texture2D>("HUD/hp_numbers");
hpSlash = this.Content.Load<Texture2D>("HUD/hp_slash");
hudBreath = this.Content.Load<Texture2D>("HUD/breathpips");
breathHUD = this.Content.Load<Texture2D>("HUD/breathtype");
hudCurrency = this.Content.Load<Texture2D>("HUD/currency");
HPBorder = this.Content.Load<Texture2D>("HUD/HP_Bar_Sm");
coinSS = this.Content.Load<Texture2D>("Monsters/coin_spritesheet");
keySS = this.Content.Load<Texture2D>("Stages/s2e4/key_spritesheet");
puffSS = this.Content.Load<Texture2D>("Monsters/smoke_spritesheet");
sparkleSS = this.Content.Load<Texture2D>
("Monsters/sparkle_spritesheet");
plinkSS = this.Content.Load<Texture2D>("Monsters/plink_spritesheet");
allTreasureSS = this.Content.Load<Texture2D>
("Treasure/treasure_spritesheet");
acidTreasureSS = this.Content.Load<Texture2D>
("Treasure/acidheart_spritesheet");
explosionOutSS = this.Content.Load<Texture2D>
("Monsters/explosion_a_spritesheet");
explosionUpSS = this.Content.Load<Texture2D>
("Monsters/explosion_b_spritesheet");
hintBubble = this.Content.Load<Texture2D>("Player/hint_spritesheet");
guideBubble = this.Content.Load<Texture2D>("Player/guide_spritesheet");
guidePause = this.Content.Load<Texture2D>("HUD/pause_spritesheet");
pauseOn = this.Content.Load<Texture2D>("HUD/pause");
pauseSwitch = this.Content.Load<Texture2D>("HUD/switch_spritesheet");
pauseInstructions = this.Content.Load<Texture2D>
("HUD/unpause_spritesheet");
exitInstructions = this.Content.Load<Texture2D>("HUD/exit_spritesheet");
breathDesc = this.Content.Load<Texture2D>("Text/breathdesc");
whistle = this.Content.Load<Texture2D>("Player/whistle");
musicExit = Content.Load<SoundEffect>("AllSounds/DragonSysLevelClear");
musicDefeat = Content.Load<SoundEffect>("AllSounds/DragonSysDefeat");
musicTreasure = Content.Load<SoundEffect>
("AllSounds/DragonSysTreasure");
sfxToggle = Content.Load<SoundEffect>("AllSounds/toggle4");
sfxYes = Content.Load<SoundEffect>("AllSounds/confirm5");
sfxNo = Content.Load<SoundEffect>("AllSounds/negative4");
sfxPageflip = Content.Load<SoundEffect>("AllSounds/PageTurn1");
sfxWarp = Content.Load<SoundEffect>("AllSounds/Warp4");
sfxPlink = Content.Load<SoundEffect>("AllSounds/nodamage8");
sfxEngine = Content.Load<SoundEffect>("AllSounds/synthengine4");
sfxFreeze = Content.Load<SoundEffect>("AllSounds/icebreathhit");
sfxCoin = Content.Load<SoundEffect>("AllSounds/coinget4");
sfxSmoke = Content.Load<SoundEffect>("AllSounds/smoke1");
sfxGunshot = Content.Load<SoundEffect>("AllSounds/Boom1");
sfxCannon = Content.Load<SoundEffect>("AllSounds/boom2Boss");
sfxThunderProj = Content.Load<SoundEffect>
("AllSounds/LightningProjectile3");
sfxThunderBlast = Content.Load<SoundEffect>
("AllSounds/HeavyLightningOneShot1");
sfxInvis = Content.Load<SoundEffect>("AllSounds/invisible2");
sfxLaser = Content.Load<SoundEffect>("AllSounds/skylaser4");
sfxLaserCharge = Content.Load<SoundEffect>("AllSounds/LaserBuildUp3");
sfxChargeShort = Content.Load<SoundEffect>("AllSounds/LaserShort");
sfxJump = Content.Load<SoundEffect>("AllSounds/jump1");
sfxWaterjump = Content.Load<SoundEffect>("AllSounds/underwaterjump1");
sfxDamage = Content.Load<SoundEffect>("AllSounds/damage3");
sfxSlash = Content.Load<SoundEffect>("AllSounds/claw9");
sfxSplash = Content.Load<SoundEffect>("AllSounds/Splash5");
sfxThunk = Content.Load<SoundEffect>("AllSounds/Thunk1");
sfxDash = Content.Load<SoundEffect>("AllSounds/Dash");
sfxFireball = Content.Load<SoundEffect>("AllSounds/FireBall3");
sfxSpear = Content.Load<SoundEffect>("AllSounds/Spear3");
sfxNote = Content.Load<SoundEffect>("AllSounds/BrassFall4");
sfxArrow = Content.Load<SoundEffect>("AllSounds/Arrow1");
sfxExpAlt = Content.Load<SoundEffect>("AllSounds/Explode9");
sfxThud = Content.Load<SoundEffect>("AllSounds/Thud");
sfxSteam = Content.Load<SoundEffect>("AllSounds/Steam4");
//CHANGE THIS
sfxExplosion = Content.Load<SoundEffect>("AllSounds/boom2Boss");
//FUCKING CHANGE THIS
//CHANGE THIS HOLY SHIT
playStageMusic = new PlayStageMusic(1, stageBGM);
drawTitle = new DrawTitle(true, stageManager);
#endregion
}
protected override void UnloadContent()
{
// TODO: Unload any non ContentManager content here
}
protected override void Update(GameTime gameTime)
{
KeyboardState kbState = Keyboard.GetState();
GamePadState gpState = GamePad.GetState(PlayerIndex.One);
achievements.Update();
#region SFX Timers
#region loops
#region acid
if (stage3e1 == true || stage3e2 == true || stage3e3 == true || stage4e1
== true)
{
if ((((acid1 == true && sprayProx1 == true) || (acid2 == true &&
sprayProx2 == true) || (acid3 == true && sprayProx3 == true))) && actionStagePause
== false && stageExit == false && endOfStage == false)
{
loopAcid.playSFX(sfxVolume, tempVolume, pauseVolume);
}
else if ((acid1 == false && acid2 == false && acid3 == false) ||
(sprayProx1 == false && sprayProx2 == false && sprayProx3 == false) ||
actionStagePause == true || stageExit == true || endOfStage == true)
{
loopAcid.pauseSFX();
}
}
#endregion
#region flame
if (stage3e2 == true || stage3eB == true || stage4e3 == true || stage4e4
== true || stage5e2 == true || stage5eB == true)
{
if (stage4e3 == false)
{
if (((flame1 == true && flameProx1 == true) || (flame2 == true
&& flameProx2 == true)) && actionStagePause == false && stageExit == false &&
endOfStage == false)
{
loopFireBreathAlt.playSFX(sfxVolume, tempVolume,
pauseVolume);
}
else if ((flame1 == false && flame2 == false) || (flameProx1 ==
false && flameProx2 == false) || actionStagePause == true || stageExit == true ||
endOfStage == true)
{
loopFireBreathAlt.pauseSFX();
}
}
if (stage4e3 == true)
{
if (((flame1 == true && flameProx1 == true) || (flame2 == true
&& flameProx2 == true) || playFlameWall == true) && actionStagePause == false &&
stageExit == false & endOfStage == false)
{
if (drgnX < 3000)
{
if (playFlameWall == true)
{
if (drgnX < 1063)
{
loopFireBreathAlt.playSFX(sfxVolume, tempVolume,
pauseVolume);
}
if (drgnX >= 1063 && drgnX < 1180)
{
loopFireBreathAlt.playSFX((float)(sfxVolume *
0.66), tempVolume, pauseVolume);
}
if (drgnX >= 1180 && drgnX < 1674)
{
loopFireBreathAlt.playSFX((float)(sfxVolume *
0.33), tempVolume, pauseVolume);
}
}
}
else
{
loopFireBreathAlt.playSFX(sfxVolume, tempVolume,
pauseVolume);
}
}
else if ((flame1 == false && flame2 == false && playFlameWall ==
false) || (flameProx1 == false && flameProx2 == false) || actionStagePause == true
|| stageExit == true || endOfStage == true)
{
loopFireBreathAlt.pauseSFX();
}
}
}
#endregion
#region flame 2e4
if (stage2e4 == true)
{
if (((flame1 == true && flameProx1 == true) || (flame2 == true &&
flameProx2 == true) || (flame3 == true && flameProx3 == true) || (flame4 == true &&
flameProx4 == true) || (flame5 == true && flameProx5 == true)) && actionStagePause
== false && stageExit == false && endOfStage == false)
{
loopFireBreathAlt.playSFX(sfxVolume, tempVolume, pauseVolume);
}
else if ((flame1 == false && flame2 == false && flame3 == false &&
flame4 == false && flame5 == false) || (flameProx1 == false && flameProx2 == false
&& flameProx3 == false && flameProx4 == false && flameProx5 == false) ||
actionStagePause == true || stageExit == true || endOfStage == true)
{
loopFireBreathAlt.pauseSFX();
}
}
#endregion
#region flamewall
if (stage7eB == true)
{
if (((flame1 == true && flameProx1 == true) || (flame2 == true &&
flameProx2 == true)) && actionStagePause == false && stageExit == false &&
endOfStage == false)
{
loopFlameAtk.playSFX(sfxVolume, tempVolume, pauseVolume);
}
else if ((flame1 == false && flame2 == false) || (flameProx1 ==
false && flameProx2 == false) || actionStagePause == true || stageExit == true ||
endOfStage == true)
{
loopFlameAtk.pauseSFX();
}
}
#endregion
#region spin
if (stage2e1 == true || stage2e2 == true || stage2e3 == true || stage2e4
== true || stage3e2 == true || stage4e1 == true || stage4e2 == true || stage4e3 ==
true || stage4e4 == true || stage5e2 == true)
{
if (((spin1 == true && spinProx1 == true) || (spin2 == true &&
spinProx2 == true) || (spin3 == true && spinProx3 == true) || (spin4 == true &&
spinProx4 == true)) && actionStagePause == false && stageExit == false && endOfStage
== false)
{
loopSpin.playSFX(sfxVolume, tempVolume, pauseVolume);
}
else if ((spin1 == false && spin2 == false && spin3 == false &&
spin4 == false) || (spinProx1 == false && spinProx2 == false && spinProx3 == false
&& spinProx4 == false) || actionStagePause == true || stageExit == true ||
endOfStage == true)
{
loopSpin.pauseSFX();
}
}
#endregion
#region laser
if (stage1eB == true || stage3eB == true)
{
if ((laser1 == true || laser2 == true || laser3 == true || laser4 ==
true) && actionStagePause == false && stageExit == false && endOfStage == false)
{
loopLaser.playSFX(sfxVolume, tempVolume, pauseVolume);
}
else if ((laser1 == false && laser2 == false && laser3 == false &&
laser4 == false) || actionStagePause == false || stageExit == true || endOfStage ==
true)
{
loopLaser.pauseSFX();
}
}
if (stage7eB == true)
{
if (laser1 == true || laser2 == true || laser3 == true || laser4 ==
true)
{
loopLaser.playSFX((float)(sfxVolume * 0.7), tempVolume,
pauseVolume);
}
else if (laser1 == false && laser2 == false && laser3 == false &&
laser4 == false)
{
loopLaser.pauseSFX();
}
}
#endregion
#region spear laser
if (stage4e1 == true || stage4e2 == true || stage4e3 == true || stage4e4
== true || stage5e2 == true)
{
if (((laser1 == true && laserProx1 == true) || (laser2 == true &&
laserProx2 == true) || (laser3 == true && laserProx3 == true) || (laser4 == true &&
laserProx4 == true)) && actionStagePause == false && stageExit == false &&
endOfStage == false)
{
loopLaser.playSFX((float)(sfxVolume * 0.5f), tempVolume,
pauseVolume);
}
else if ((laser1 == false && laser2 == false && laser3 == false &&
laser4 == false) || (laserProx1 == false && laserProx2 == false && laserProx3 ==
false && laserProx4 == false) || actionStagePause == true || stageExit == true ||
endOfStage == true)
{
loopLaser.pauseSFX();
}
}
#endregion
#region burrow
if (stage4eB == true)
{
if (burrowOn == true && actionStagePause == false && stageExit ==
false && endOfStage == false)
{
loopBurrow.playSFX(sfxVolume, tempVolume, pauseVolume);
}
else if (burrowOn == false || actionStagePause == true || stageExit
== true || endOfStage == true)
{
loopBurrow.pauseSFX();
}
}
#endregion
#region wings
if (actionStage == true)
{
if (drgnFlight == true & drgnFlyNow > 0 && endOfStage == false &&
actionStagePause == false && stageExit == false)
{
playWings.playSFX(sfxVolume, tempVolume, pauseVolume);
}
else if (drgnFlight == false || drgnFlyNow <= 0 || endOfStage ==
true || stageExit == true || actionStagePause == true)
{
playWings.pauseSFX();
}
}
#endregion
#endregion
#region menuYes
if (menuYesPlay == true)
{
sfxYes.Play((float)(sfxVolume * 0.25 * tempVolume * pauseVolume), 0,
0);
menuYesPlay = false;
}
#endregion
#region menuNo
if (menuNoPlay == true)
{
sfxNo.Play((float)(sfxVolume * 0.4 * tempVolume * pauseVolume), 0,
0);
menuNoPlay = false;
}
#endregion
#region menuToggle
if (menuTogglePlay == true)
{
sfxToggle.Play((float)(sfxVolume * 0.4 * tempVolume * pauseVolume),
0, 0);
menuTogglePlay = false;
}
#endregion
#region pageTurn
if (pageTurnPlay == true)
{
sfxPageflip.Play((float)(sfxVolume * 0.6), 0, 0);
pageTurnPlay = false;
}
#endregion
#region warp
if (sfxWarpPlay == true)
{
sfxWarp.Play((float)(sfxVolume * 0.6 * tempVolume * pauseVolume), 0,
0);
sfxWarpPlay = false;
}
#endregion
#region jump
if (jumpPlay == true)
{
sfxJump.Play((float)(sfxVolume * 0.6 * tempVolume * pauseVolume), 0,
0);
jumpPlay = false;
}
#endregion
#region underwater jump
if (waterjumpPlay == true)
{
sfxWaterjump.Play((float)(sfxVolume * 0.9 * tempVolume *
pauseVolume), 0, 0);
waterjumpPlay = false;
}
#endregion
#region damage
if (damagePlay == true)
{
sfxDamage.Play((float)(sfxVolume * 0.6 * tempVolume * pauseVolume),
0, 0);
damagePlay = false;
}
#endregion
#region slash
if (slashPlay == true)
{
sfxSlash.Play((float)(sfxVolume * 0.5 * tempVolume * pauseVolume),
0, 0);
slashPlay = false;
}
#endregion
#region plink
if (plinkPlay == true)
{
sfxPlink.Play((float)(sfxVolume * 0.6 * tempVolume * pauseVolume),
0, 0);
plinkPlay = false;
}
#endregion
#region freeze
if (freezePlay == true)
{
sfxFreeze.Play((float)(sfxVolume * 0.6 * tempVolume * pauseVolume),
0, 0);
freezePlay = false;
}
#endregion
#region coin
if (coinPlay == true)
{
sfxCoin.Play((float)(sfxVolume * 0.5 * tempVolume * pauseVolume), 0,
0);
coinPlay = false;
}
#endregion
#region splash
if (splashPlay == true)
{
sfxSplash.Play((float)(sfxVolume * 0.45 * tempVolume * pauseVolume),
0, 0);
splashPlay = false;
}
#endregion
#region engine
if (enginePlay == true)
{
sfxEngine.Play((float)(sfxVolume * 0.6 * tempVolume * pauseVolume),
0, 0);
enginePlay = false;
}
#endregion
#region smoke
if (smokePlay == true)
{
sfxSmoke.Play((float)(sfxVolume * 0.8 * tempVolume * pauseVolume),
0, 0);
smokePlay = false;
}
#endregion
#region gunshot
if (gunshotPlay == true)
{
sfxGunshot.Play((float)(sfxVolume * 0.5 * tempVolume * pauseVolume),
0, 0);
gunshotPlay = false;
}
#endregion
#region cannon
if (cannonPlay == true)
{
sfxCannon.Play((float)(sfxVolume * 0.6 * tempVolume * pauseVolume),
0, 0);
cannonPlay = false;
}
#endregion
#region explosion
if (explosionPlay == true)
{
sfxExplosion.Play((float)(sfxVolume * 0.6 * tempVolume *
pauseVolume), 0, 0);
explosionPlay = false;
}
#endregion
#region explosion alt
if (expAltPlay == true)
{
sfxExpAlt.Play((float)(sfxVolume * tempVolume * pauseVolume), 0, 0);
expAltPlay = false;
}
#endregion
#region thunder projectile
if (thunderProjPlay == true)
{
sfxThunderProj.Play((float)(sfxVolume * 0.5 * tempVolume *
pauseVolume), 0, 0);
thunderProjPlay = false;
}
#endregion
#region thunder blast
if (thunderBlastPlay == true)
{
sfxThunderBlast.Play((float)(sfxVolume * 0.5 * tempVolume *
pauseVolume), 0, 0);
thunderBlastPlay = false;
}
#endregion
#region invis
if (invisPlay == true)
{
sfxInvis.Play((float)(sfxVolume * 0.6 * tempVolume * pauseVolume),
0, 0);
invisPlay = false;
}
#endregion
#region teleport
if (teleportPlay == true)
{
sfxLaser.Play((float)(sfxVolume * 0.3 * tempVolume * pauseVolume),
0, 0);
teleportPlay = false;
}
#endregion
#region skylaser
if (laserPlay == true)
{
sfxLaser.Play((float)(sfxVolume * 0.6 * tempVolume * pauseVolume),
0, 0);
laserPlay = false;
}
#endregion
#region charge laser
if (laserCharge == true)
{
sfxLaserCharge.Play((float)(sfxVolume * 0.6 * tempVolume *
pauseVolume), 0, 0);
laserCharge = false;
}
#endregion
#region short laser
if (shortCharge == true)
{
shortCharge = false;
sfxChargeShort.Play((float)(sfxVolume * 0.6 * tempVolume *
pauseVolume), 0, 0);
}
#endregion
#region thunk
if (thunkPlay == true)
{
sfxThunk.Play((float)(sfxVolume * 0.6 * tempVolume * pauseVolume),
0, 0);
thunkPlay = false;
}
#endregion
#region fireball
if (fireballPlay == true)
{
fireballPlay = false;
sfxFireball.Play((float)(sfxVolume * 0.5 * tempVolume *
pauseVolume), 0, 0);
}
#endregion
#region note
if (notePlay == true)
{
notePlay = false;
sfxNote.Play((float)(sfxVolume * 0.7 * tempVolume * pauseVolume), 0,
0);
}
#endregion
#region spear
if (spearPlay == true)
{
spearPlay = false;
sfxSpear.Play((float)(sfxVolume * 0.8 * tempVolume * pauseVolume),
0, 0);
}
#endregion
#region steam
if (steamPlay == true)
{
steamPlay = false;
sfxSteam.Play((float)(sfxVolume * 0.7 * tempVolume * pauseVolume),
0, 0);
}
#endregion
#region thud
if (thudPlay == true)
{
thudPlay = false;
sfxThud.Play((float)(sfxVolume * tempVolume * pauseVolume), 0, 0);
}
#endregion
#region arrow
if (arrowPlay == true)
{
arrowPlay = false;
sfxArrow.Play((float)(sfxVolume * 0.8 * tempVolume * pauseVolume),
0, 0);
}
#endregion
#region dash
if (lancePlay == true)
{
sfxDash.Play((float)(sfxVolume * 0.8 * tempVolume * pauseVolume), 0,
0);
lancePlay = false;
}
#endregion
#endregion
#region alt controls
if (controlType == 1)
{
#region line 1 / 1-14
#region Tab
if (kbState.IsKeyDown(Keys.Tab) && (jumpVal == 1 || clawVal == 1 ||
breathVal == 1 || confVal == 1 || swlVal == 1 || swrVal == 1 || leftVal == 1 ||
rightVal == 1 || upVal == 1 || downVal == 1))
{
if (jumpVal == 1)
{
jumpTrue = true;
}
if (clawVal == 1)
{
clawTrue = true;
}
if (breathVal == 1)
{
breathTrue = true;
}
if (confVal == 1)
{
confTrue = true;
}
if (swlVal == 1)
{
swlTrue = true;
}
if (swrVal == 1)
{
swrTrue = true;
}
if (leftVal == 1)
{
leftTrue = true;
}
if (rightVal == 1)
{
rightTrue = true;
}
if (upVal == 1)
{
upTrue = true;
}
if (downVal == 1)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.Tab) && (jumpVal == 1 || clawVal == 1
|| breathVal == 1 || confVal == 1 || swlVal == 1 || swrVal == 1 || leftVal == 1 ||
rightVal == 1 || upVal == 1 || downVal == 1))
{
if (jumpVal == 1 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 1 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 1 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 1 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 1 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 1 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 1 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 1 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 1 && upTrue == true)
{
upTrue = false;
}
if (downVal == 1 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region Q
if (kbState.IsKeyDown(Keys.Q) && (jumpVal == 2 || clawVal == 2 ||
breathVal == 2 || confVal == 2 || swlVal == 2 || swrVal == 2 || leftVal == 2 ||
rightVal == 2 || upVal == 2 || downVal == 2))
{
if (jumpVal == 2)
{
jumpTrue = true;
}
if (clawVal == 2)
{
clawTrue = true;
}
if (breathVal == 2)
{
breathTrue = true;
}
if (confVal == 2)
{
confTrue = true;
}
if (swlVal == 2)
{
swlTrue = true;
}
if (swrVal == 2)
{
swrTrue = true;
}
if (leftVal == 2)
{
leftTrue = true;
}
if (rightVal == 2)
{
rightTrue = true;
}
if (upVal == 2)
{
upTrue = true;
}
if (downVal == 2)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.Q) && (jumpVal == 2 || clawVal == 2 ||
breathVal == 2 || confVal == 2 || swlVal == 2 || swrVal == 2 || leftVal == 2 ||
rightVal == 2 || upVal == 2 || downVal == 2))
{
if (jumpVal == 2 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 2 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 2 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 2 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 2 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 2 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 2 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 2 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 2 && upTrue == true)
{
upTrue = false;
}
if (downVal == 2 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region W
if (kbState.IsKeyDown(Keys.W) && (jumpVal == 3 || clawVal == 3 ||
breathVal == 3 || confVal == 3 || swlVal == 3 || swrVal == 3 || leftVal == 3 ||
rightVal == 3 || upVal == 3 || downVal == 3))
{
if (jumpVal == 3)
{
jumpTrue = true;
}
if (clawVal == 3)
{
clawTrue = true;
}
if (breathVal == 3)
{
breathTrue = true;
}
if (confVal == 3)
{
confTrue = true;
}
if (swlVal == 3)
{
swlTrue = true;
}
if (swrVal == 3)
{
swrTrue = true;
}
if (leftVal == 3)
{
leftTrue = true;
}
if (rightVal == 3)
{
rightTrue = true;
}
if (upVal == 3)
{
upTrue = true;
}
if (downVal == 3)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.W) && (jumpVal == 3 || clawVal == 3 ||
breathVal == 3 || confVal == 3 || swlVal == 3 || swrVal == 3 || leftVal == 3 ||
rightVal == 3 || upVal == 3 || downVal == 3))
{
if (jumpVal == 3 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 3 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 3 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 3 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 3 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 3 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 3 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 3 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 3 && upTrue == true)
{
upTrue = false;
}
if (downVal == 3 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region E
if (kbState.IsKeyDown(Keys.E) && (jumpVal == 4 || clawVal == 4 ||
breathVal == 4 || confVal == 4 || swlVal == 4 || swrVal == 4 || leftVal == 4 ||
rightVal == 4 || upVal == 4 || downVal == 4))
{
if (jumpVal == 4)
{
jumpTrue = true;
}
if (clawVal == 4)
{
clawTrue = true;
}
if (breathVal == 4)
{
breathTrue = true;
}
if (confVal == 4)
{
confTrue = true;
}
if (swlVal == 4)
{
swlTrue = true;
}
if (swrVal == 4)
{
swrTrue = true;
}
if (leftVal == 4)
{
leftTrue = true;
}
if (rightVal == 4)
{
rightTrue = true;
}
if (upVal == 4)
{
upTrue = true;
}
if (downVal == 4)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.E) && (jumpVal == 4 || clawVal == 4 ||
breathVal == 4 || confVal == 4 || swlVal == 4 || swrVal == 4 || leftVal == 4 ||
rightVal == 4 || upVal == 4 || downVal == 4))
{
if (jumpVal == 4 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 4 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 4 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 4 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 4 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 4 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 4 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 4 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 4 && upTrue == true)
{
upTrue = false;
}
if (downVal == 4 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region R
if (kbState.IsKeyDown(Keys.R) && (jumpVal == 5 || clawVal == 5 ||
breathVal == 5 || confVal == 5 || swlVal == 5 || swrVal == 5 || leftVal == 5 ||
rightVal == 5 || upVal == 5 || downVal == 5))
{
if (jumpVal == 5)
{
jumpTrue = true;
}
if (clawVal == 5)
{
clawTrue = true;
}
if (breathVal == 5)
{
breathTrue = true;
}
if (confVal == 5)
{
confTrue = true;
}
if (swlVal == 5)
{
swlTrue = true;
}
if (swrVal == 5)
{
swrTrue = true;
}
if (leftVal == 5)
{
leftTrue = true;
}
if (rightVal == 5)
{
rightTrue = true;
}
if (upVal == 5)
{
upTrue = true;
}
if (downVal == 5)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.R) && (jumpVal == 5 || clawVal == 5 ||
breathVal == 5 || confVal == 5 || swlVal == 5 || swrVal == 5 || leftVal == 5 ||
rightVal == 5 || upVal == 5 || downVal == 5))
{
if (jumpVal == 5 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 5 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 5 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 5 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 5 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 5 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 5 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 5 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 5 && upTrue == true)
{
upTrue = false;
}
if (downVal == 5 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region T
if (kbState.IsKeyDown(Keys.T) && (jumpVal == 6 || clawVal == 6 ||
breathVal == 6 || confVal == 6 || swlVal == 6 || swrVal == 6 || leftVal == 6 ||
rightVal == 6 || upVal == 6 || downVal == 6))
{
if (jumpVal == 6)
{
jumpTrue = true;
}
if (clawVal == 6)
{
clawTrue = true;
}
if (breathVal == 6)
{
breathTrue = true;
}
if (confVal == 6)
{
confTrue = true;
}
if (swlVal == 6)
{
swlTrue = true;
}
if (swrVal == 6)
{
swrTrue = true;
}
if (leftVal == 6)
{
leftTrue = true;
}
if (rightVal == 6)
{
rightTrue = true;
}
if (upVal == 6)
{
upTrue = true;
}
if (downVal == 6)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.T) && (jumpVal == 6 || clawVal == 6 ||
breathVal == 6 || confVal == 6 || swlVal == 6 || swrVal == 6 || leftVal == 6 ||
rightVal == 6 || upVal == 6 || downVal == 6))
{
if (jumpVal == 6 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 6 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 6 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 6 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 6 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 6 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 6 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 6 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 6 && upTrue == true)
{
upTrue = false;
}
if (downVal == 6 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region Y
if (kbState.IsKeyDown(Keys.Y) && (jumpVal == 7 || clawVal == 7 ||
breathVal == 7 || confVal == 7 || swlVal == 7 || swrVal == 7 || leftVal == 7 ||
rightVal == 7 || upVal == 7 || downVal == 7))
{
if (jumpVal == 7)
{
jumpTrue = true;
}
if (clawVal == 7)
{
clawTrue = true;
}
if (breathVal == 7)
{
breathTrue = true;
}
if (confVal == 7)
{
confTrue = true;
}
if (swlVal == 7)
{
swlTrue = true;
}
if (swrVal == 7)
{
swrTrue = true;
}
if (leftVal == 7)
{
leftTrue = true;
}
if (rightVal == 7)
{
rightTrue = true;
}
if (upVal == 7)
{
upTrue = true;
}
if (downVal == 7)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.Y) && (jumpVal == 7 || clawVal == 7 ||
breathVal == 7 || confVal == 7 || swlVal == 7 || swrVal == 7 || leftVal == 7 ||
rightVal == 7 || upVal == 7 || downVal == 7))
{
if (jumpVal == 7 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 7 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 7 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 7 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 7 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 7 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 7 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 7 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 7 && upTrue == true)
{
upTrue = false;
}
if (downVal == 7 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region U
if (kbState.IsKeyDown(Keys.U) && (jumpVal == 8 || clawVal == 8 ||
breathVal == 8 || confVal == 8 || swlVal == 8 || swrVal == 8 || leftVal == 8 ||
rightVal == 8 || upVal == 8 || downVal == 8))
{
if (jumpVal == 8)
{
jumpTrue = true;
}
if (clawVal == 8)
{
clawTrue = true;
}
if (breathVal == 8)
{
breathTrue = true;
}
if (confVal == 8)
{
confTrue = true;
}
if (swlVal == 8)
{
swlTrue = true;
}
if (swrVal == 8)
{
swrTrue = true;
}
if (leftVal == 8)
{
leftTrue = true;
}
if (rightVal == 8)
{
rightTrue = true;
}
if (upVal == 8)
{
upTrue = true;
}
if (downVal == 8)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.U) && (jumpVal == 8 || clawVal == 8 ||
breathVal == 8 || confVal == 8 || swlVal == 8 || swrVal == 8 || leftVal == 8 ||
rightVal == 8 || upVal == 8 || downVal == 8))
{
if (jumpVal == 8 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 8 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 8 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 8 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 8 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 8 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 8 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 8 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 8 && upTrue == true)
{
upTrue = false;
}
if (downVal == 8 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region I
if (kbState.IsKeyDown(Keys.I) && (jumpVal == 9 || clawVal == 9 ||
breathVal == 9 || confVal == 9 || swlVal == 9 || swrVal == 9 || leftVal == 9 ||
rightVal == 9 || upVal == 9 || downVal == 9))
{
if (jumpVal == 9)
{
jumpTrue = true;
}
if (clawVal == 9)
{
clawTrue = true;
}
if (breathVal == 9)
{
breathTrue = true;
}
if (confVal == 9)
{
confTrue = true;
}
if (swlVal == 9)
{
swlTrue = true;
}
if (swrVal == 9)
{
swrTrue = true;
}
if (leftVal == 9)
{
leftTrue = true;
}
if (rightVal == 9)
{
rightTrue = true;
}
if (upVal == 9)
{
upTrue = true;
}
if (downVal == 9)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.I) && (jumpVal == 9 || clawVal == 9 ||
breathVal == 9 || confVal == 9 || swlVal == 9 || swrVal == 9 || leftVal == 9 ||
rightVal == 9 || upVal == 9 || downVal == 9))
{
if (jumpVal == 9 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 9 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 9 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 9 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 9 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 9 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 9 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 9 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 9 && upTrue == true)
{
upTrue = false;
}
if (downVal == 9 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region O
if (kbState.IsKeyDown(Keys.O) && (jumpVal == 10 || clawVal == 10 ||
breathVal == 10 || confVal == 10 || swlVal == 10 || swrVal == 10 || leftVal == 10 ||
rightVal == 10 || upVal == 10 || downVal == 10))
{
if (jumpVal == 10)
{
jumpTrue = true;
}
if (clawVal == 10)
{
clawTrue = true;
}
if (breathVal == 10)
{
breathTrue = true;
}
if (confVal == 10)
{
confTrue = true;
}
if (swlVal == 10)
{
swlTrue = true;
}
if (swrVal == 10)
{
swrTrue = true;
}
if (leftVal == 10)
{
leftTrue = true;
}
if (rightVal == 10)
{
rightTrue = true;
}
if (upVal == 10)
{
upTrue = true;
}
if (downVal == 10)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.O) && (jumpVal == 10 || clawVal == 10
|| breathVal == 10 || confVal == 10 || swlVal == 10 || swrVal == 10 || leftVal == 10
|| rightVal == 10 || upVal == 10 || downVal == 10))
{
if (jumpVal == 10 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 10 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 10 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 10 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 10 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 10 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 10 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 10 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 10 && upTrue == true)
{
upTrue = false;
}
if (downVal == 10 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region P
if (kbState.IsKeyDown(Keys.P) && (jumpVal == 11 || clawVal == 11 ||
breathVal == 11 || confVal == 11 || swlVal == 11 || swrVal == 11 || leftVal == 11 ||
rightVal == 11 || upVal == 11 || downVal == 11))
{
if (jumpVal == 11)
{
jumpTrue = true;
}
if (clawVal == 11)
{
clawTrue = true;
}
if (breathVal == 11)
{
breathTrue = true;
}
if (confVal == 11)
{
confTrue = true;
}
if (swlVal == 11)
{
swlTrue = true;
}
if (swrVal == 11)
{
swrTrue = true;
}
if (leftVal == 11)
{
leftTrue = true;
}
if (rightVal == 11)
{
rightTrue = true;
}
if (upVal == 11)
{
upTrue = true;
}
if (downVal == 11)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.P) && (jumpVal == 11 || clawVal == 11
|| breathVal == 11 || confVal == 11 || swlVal == 11 || swrVal == 11 || leftVal == 11
|| rightVal == 11 || upVal == 11 || downVal == 11))
{
if (jumpVal == 11 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 11 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 11 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 11 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 11 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 11 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 11 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 11 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 11 && upTrue == true)
{
upTrue = false;
}
if (downVal == 11 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region [
if (kbState.IsKeyDown(Keys.OemOpenBrackets) && (jumpVal == 12 ||
clawVal == 12 || breathVal == 12 || confVal == 12 || swlVal == 12 || swrVal == 12 ||
leftVal == 12 || rightVal == 12 || upVal == 12 || downVal == 12))
{
if (jumpVal == 12)
{
jumpTrue = true;
}
if (clawVal == 12)
{
clawTrue = true;
}
if (breathVal == 12)
{
breathTrue = true;
}
if (confVal == 12)
{
confTrue = true;
}
if (swlVal == 12)
{
swlTrue = true;
}
if (swrVal == 12)
{
swrTrue = true;
}
if (leftVal == 12)
{
leftTrue = true;
}
if (rightVal == 12)
{
rightTrue = true;
}
if (upVal == 12)
{
upTrue = true;
}
if (downVal == 12)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.OemOpenBrackets) && (jumpVal == 12 ||
clawVal == 12 || breathVal == 12 || confVal == 12 || swlVal == 12 || swrVal == 12 ||
leftVal == 12 || rightVal == 12 || upVal == 12 || downVal == 12))
{
if (jumpVal == 12 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 12 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 12 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 12 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 12 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 12 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 12 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 12 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 12 && upTrue == true)
{
upTrue = false;
}
if (downVal == 12 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region ]
if (kbState.IsKeyDown(Keys.OemCloseBrackets) && (jumpVal == 13 ||
clawVal == 13 || breathVal == 13 || confVal == 13 || swlVal == 13 || swrVal == 13 ||
leftVal == 13 || rightVal == 13 || upVal == 13 || downVal == 13))
{
if (jumpVal == 13)
{
jumpTrue = true;
}
if (clawVal == 13)
{
clawTrue = true;
}
if (breathVal == 13)
{
breathTrue = true;
}
if (confVal == 13)
{
confTrue = true;
}
if (swlVal == 13)
{
swlTrue = true;
}
if (swrVal == 13)
{
swrTrue = true;
}
if (leftVal == 13)
{
leftTrue = true;
}
if (rightVal == 13)
{
rightTrue = true;
}
if (upVal == 13)
{
upTrue = true;
}
if (downVal == 13)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.OemCloseBrackets) && (jumpVal == 13 ||
clawVal == 13 || breathVal == 13 || confVal == 13 || swlVal == 13 || swrVal == 13 ||
leftVal == 13 || rightVal == 13 || upVal == 13 || downVal == 13))
{
if (jumpVal == 13 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 13 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 13 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 13 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 13 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 13 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 13 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 13 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 13 && upTrue == true)
{
upTrue = false;
}
if (downVal == 13 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region \
if (kbState.IsKeyDown(Keys.OemBackslash) && (jumpVal == 14 ||
clawVal == 14 || breathVal == 14 || confVal == 14 || swlVal == 14 || swrVal == 14 ||
leftVal == 14 || rightVal == 14 || upVal == 14 || downVal == 14))
{
if (jumpVal == 14)
{
jumpTrue = true;
}
if (clawVal == 14)
{
clawTrue = true;
}
if (breathVal == 14)
{
breathTrue = true;
}
if (confVal == 14)
{
confTrue = true;
}
if (swlVal == 14)
{
swlTrue = true;
}
if (swrVal == 14)
{
swrTrue = true;
}
if (leftVal == 14)
{
leftTrue = true;
}
if (rightVal == 14)
{
rightTrue = true;
}
if (upVal == 14)
{
upTrue = true;
}
if (downVal == 14)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.OemBackslash) && (jumpVal == 14 ||
clawVal == 14 || breathVal == 14 || confVal == 14 || swlVal == 14 || swrVal == 14 ||
leftVal == 14 || rightVal == 14 || upVal == 14 || downVal == 14))
{
if (jumpVal == 14 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 14 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 14 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 14 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 14 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 14 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 14 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 14 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 14 && upTrue == true)
{
upTrue = false;
}
if (downVal == 14 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#endregion
#region line 2 / 15-25
#region A
if (kbState.IsKeyDown(Keys.A) && (jumpVal == 15 || clawVal == 15 ||
breathVal == 15 || confVal == 15 || swlVal == 15 || swrVal == 15 || leftVal == 15 ||
rightVal == 15 || upVal == 15 || downVal == 15))
{
if (jumpVal == 15)
{
jumpTrue = true;
}
if (clawVal == 15)
{
clawTrue = true;
}
if (breathVal == 15)
{
breathTrue = true;
}
if (confVal == 15)
{
confTrue = true;
}
if (swlVal == 15)
{
swlTrue = true;
}
if (swrVal == 15)
{
swrTrue = true;
}
if (leftVal == 15)
{
leftTrue = true;
}
if (rightVal == 15)
{
rightTrue = true;
}
if (upVal == 15)
{
upTrue = true;
}
if (downVal == 15)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.A) && (jumpVal == 15 || clawVal == 15
|| breathVal == 15 || confVal == 15 || swlVal == 15 || swrVal == 15 || leftVal == 15
|| rightVal == 15 || upVal == 15 || downVal == 15))
{
if (jumpVal == 15 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 15 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 15 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 15 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 15 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 15 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 15 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 15 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 15 && upTrue == true)
{
upTrue = false;
}
if (downVal == 15 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region S
if (kbState.IsKeyDown(Keys.S) && (jumpVal == 16 || clawVal == 16 ||
breathVal == 16 || confVal == 16 || swlVal == 16 || swrVal == 16 || leftVal == 16 ||
rightVal == 16 || upVal == 16 || downVal == 16))
{
if (jumpVal == 16)
{
jumpTrue = true;
}
if (clawVal == 16)
{
clawTrue = true;
}
if (breathVal == 16)
{
breathTrue = true;
}
if (confVal == 16)
{
confTrue = true;
}
if (swlVal == 16)
{
swlTrue = true;
}
if (swrVal == 16)
{
swrTrue = true;
}
if (leftVal == 16)
{
leftTrue = true;
}
if (rightVal == 16)
{
rightTrue = true;
}
if (upVal == 16)
{
upTrue = true;
}
if (downVal == 16)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.S) && (jumpVal == 16 || clawVal == 16
|| breathVal == 16 || confVal == 16 || swlVal == 16 || swrVal == 16 || leftVal == 16
|| rightVal == 16 || upVal == 16 || downVal == 16))
{
if (jumpVal == 16 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 16 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 16 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 16 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 16 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 16 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 16 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 16 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 16 && upTrue == true)
{
upTrue = false;
}
if (downVal == 16 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region D
if (kbState.IsKeyDown(Keys.D) && (jumpVal == 17 || clawVal == 17 ||
breathVal == 17 || confVal == 17 || swlVal == 17 || swrVal == 17 || leftVal == 17 ||
rightVal == 17 || upVal == 17 || downVal == 17))
{
if (jumpVal == 17)
{
jumpTrue = true;
}
if (clawVal == 17)
{
clawTrue = true;
}
if (breathVal == 17)
{
breathTrue = true;
}
if (confVal == 17)
{
confTrue = true;
}
if (swlVal == 17)
{
swlTrue = true;
}
if (swrVal == 17)
{
swrTrue = true;
}
if (leftVal == 17)
{
leftTrue = true;
}
if (rightVal == 17)
{
rightTrue = true;
}
if (upVal == 17)
{
upTrue = true;
}
if (downVal == 17)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.D) && (jumpVal == 17 || clawVal == 17
|| breathVal == 17 || confVal == 17 || swlVal == 17 || swrVal == 17 || leftVal == 17
|| rightVal == 17 || upVal == 17 || downVal == 17))
{
if (jumpVal == 17 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 17 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 17 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 17 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 17 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 17 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 17 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 17 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 17 && upTrue == true)
{
upTrue = false;
}
if (downVal == 17 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region F
if (kbState.IsKeyDown(Keys.F) && (jumpVal == 18 || clawVal == 18 ||
breathVal == 18 || confVal == 18 || swlVal == 18 || swrVal == 18 || leftVal == 18 ||
rightVal == 18 || upVal == 18 || downVal == 18))
{
if (jumpVal == 18)
{
jumpTrue = true;
}
if (clawVal == 18)
{
clawTrue = true;
}
if (breathVal == 18)
{
breathTrue = true;
}
if (confVal == 18)
{
confTrue = true;
}
if (swlVal == 18)
{
swlTrue = true;
}
if (swrVal == 18)
{
swrTrue = true;
}
if (leftVal == 18)
{
leftTrue = true;
}
if (rightVal == 18)
{
rightTrue = true;
}
if (upVal == 18)
{
upTrue = true;
}
if (downVal == 18)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.F) && (jumpVal == 18 || clawVal == 18
|| breathVal == 18 || confVal == 18 || swlVal == 18 || swrVal == 18 || leftVal == 18
|| rightVal == 18 || upVal == 18 || downVal == 18))
{
if (jumpVal == 18 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 18 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 18 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 18 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 18 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 18 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 18 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 18 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 18 && upTrue == true)
{
upTrue = false;
}
if (downVal == 18 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region G
if (kbState.IsKeyDown(Keys.G) && (jumpVal == 19 || clawVal == 19 ||
breathVal == 19 || confVal == 19 || swlVal == 19 || swrVal == 19 || leftVal == 19 ||
rightVal == 19 || upVal == 19 || downVal == 19))
{
if (jumpVal == 19)
{
jumpTrue = true;
}
if (clawVal == 19)
{
clawTrue = true;
}
if (breathVal == 19)
{
breathTrue = true;
}
if (confVal == 19)
{
confTrue = true;
}
if (swlVal == 19)
{
swlTrue = true;
}
if (swrVal == 19)
{
swrTrue = true;
}
if (leftVal == 19)
{
leftTrue = true;
}
if (rightVal == 19)
{
rightTrue = true;
}
if (upVal == 19)
{
upTrue = true;
}
if (downVal == 19)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.G) && (jumpVal == 19 || clawVal == 19
|| breathVal == 19 || confVal == 19 || swlVal == 19 || swrVal == 19 || leftVal == 19
|| rightVal == 19 || upVal == 19 || downVal == 19))
{
if (jumpVal == 19 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 19 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 19 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 19 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 19 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 19 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 19 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 19 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 19 && upTrue == true)
{
upTrue = false;
}
if (downVal == 19 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region H
if (kbState.IsKeyDown(Keys.H) && (jumpVal == 20 || clawVal == 20 ||
breathVal == 20 || confVal == 20 || swlVal == 20 || swrVal == 20 || leftVal == 20 ||
rightVal == 20 || upVal == 20 || downVal == 20))
{
if (jumpVal == 20)
{
jumpTrue = true;
}
if (clawVal == 20)
{
clawTrue = true;
}
if (breathVal == 20)
{
breathTrue = true;
}
if (confVal == 20)
{
confTrue = true;
}
if (swlVal == 20)
{
swlTrue = true;
}
if (swrVal == 20)
{
swrTrue = true;
}
if (leftVal == 20)
{
leftTrue = true;
}
if (rightVal == 20)
{
rightTrue = true;
}
if (upVal == 20)
{
upTrue = true;
}
if (downVal == 20)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.H) && (jumpVal == 20 || clawVal == 20
|| breathVal == 20 || confVal == 20 || swlVal == 20 || swrVal == 20 || leftVal == 20
|| rightVal == 20 || upVal == 20 || downVal == 20))
{
if (jumpVal == 20 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 20 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 20 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 20 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 20 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 20 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 20 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 20 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 20 && upTrue == true)
{
upTrue = false;
}
if (downVal == 20 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region J
if (kbState.IsKeyDown(Keys.J) && (jumpVal == 21 || clawVal == 21 ||
breathVal == 21 || confVal == 21 || swlVal == 21 || swrVal == 21 || leftVal == 21 ||
rightVal == 21 || upVal == 21 || downVal == 21))
{
if (jumpVal == 21)
{
jumpTrue = true;
}
if (clawVal == 21)
{
clawTrue = true;
}
if (breathVal == 21)
{
breathTrue = true;
}
if (confVal == 21)
{
confTrue = true;
}
if (swlVal == 21)
{
swlTrue = true;
}
if (swrVal == 21)
{
swrTrue = true;
}
if (leftVal == 21)
{
leftTrue = true;
}
if (rightVal == 21)
{
rightTrue = true;
}
if (upVal == 21)
{
upTrue = true;
}
if (downVal == 21)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.J) && (jumpVal == 21 || clawVal == 21
|| breathVal == 21 || confVal == 21 || swlVal == 21 || swrVal == 21 || leftVal == 21
|| rightVal == 21 || upVal == 21 || downVal == 21))
{
if (jumpVal == 21 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 21 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 21 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 21 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 21 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 21 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 21 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 21 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 21 && upTrue == true)
{
upTrue = false;
}
if (downVal == 21 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region K
if (kbState.IsKeyDown(Keys.K) && (jumpVal == 22 || clawVal == 22 ||
breathVal == 22 || confVal == 22 || swlVal == 22 || swrVal == 22 || leftVal == 22 ||
rightVal == 22 || upVal == 22 || downVal == 22))
{
if (jumpVal == 22)
{
jumpTrue = true;
}
if (clawVal == 22)
{
clawTrue = true;
}
if (breathVal == 22)
{
breathTrue = true;
}
if (confVal == 22)
{
confTrue = true;
}
if (swlVal == 22)
{
swlTrue = true;
}
if (swrVal == 22)
{
swrTrue = true;
}
if (leftVal == 22)
{
leftTrue = true;
}
if (rightVal == 22)
{
rightTrue = true;
}
if (upVal == 22)
{
upTrue = true;
}
if (downVal == 22)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.K) && (jumpVal == 22 || clawVal == 22
|| breathVal == 22 || confVal == 22 || swlVal == 22 || swrVal == 22 || leftVal == 22
|| rightVal == 22 || upVal == 22 || downVal == 22))
{
if (jumpVal == 22 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 22 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 22 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 22 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 22 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 22 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 22 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 22 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 22 && upTrue == true)
{
upTrue = false;
}
if (downVal == 22 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region L
if (kbState.IsKeyDown(Keys.L) && (jumpVal == 23 || clawVal == 23 ||
breathVal == 23 || confVal == 23 || swlVal == 23 || swrVal == 23 || leftVal == 23 ||
rightVal == 23 || upVal == 23 || downVal == 23))
{
if (jumpVal == 23)
{
jumpTrue = true;
}
if (clawVal == 23)
{
clawTrue = true;
}
if (breathVal == 23)
{
breathTrue = true;
}
if (confVal == 23)
{
confTrue = true;
}
if (swlVal == 23)
{
swlTrue = true;
}
if (swrVal == 23)
{
swrTrue = true;
}
if (leftVal == 23)
{
leftTrue = true;
}
if (rightVal == 23)
{
rightTrue = true;
}
if (upVal == 23)
{
upTrue = true;
}
if (downVal == 23)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.L) && (jumpVal == 23 || clawVal == 23
|| breathVal == 23 || confVal == 23 || swlVal == 23 || swrVal == 23 || leftVal == 23
|| rightVal == 23 || upVal == 23 || downVal == 23))
{
if (jumpVal == 23 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 23 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 23 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 23 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 23 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 23 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 23 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 23 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 23 && upTrue == true)
{
upTrue = false;
}
if (downVal == 23 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region ;
if (kbState.IsKeyDown(Keys.OemSemicolon) && (jumpVal == 24 ||
clawVal == 24 || breathVal == 24 || confVal == 24 || swlVal == 24 || swrVal == 24 ||
leftVal == 24 || rightVal == 24 || upVal == 24 || downVal == 24))
{
if (jumpVal == 24)
{
jumpTrue = true;
}
if (clawVal == 24)
{
clawTrue = true;
}
if (breathVal == 24)
{
breathTrue = true;
}
if (confVal == 24)
{
confTrue = true;
}
if (swlVal == 24)
{
swlTrue = true;
}
if (swrVal == 24)
{
swrTrue = true;
}
if (leftVal == 24)
{
leftTrue = true;
}
if (rightVal == 24)
{
rightTrue = true;
}
if (upVal == 24)
{
upTrue = true;
}
if (downVal == 24)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.OemSemicolon) && (jumpVal == 24 ||
clawVal == 24 || breathVal == 24 || confVal == 24 || swlVal == 24 || swrVal == 24 ||
leftVal == 24 || rightVal == 24 || upVal == 24 || downVal == 24))
{
if (jumpVal == 24 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 24 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 24 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 24 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 24 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 24 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 24 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 24 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 24 && upTrue == true)
{
upTrue = false;
}
if (downVal == 24 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region '
if (kbState.IsKeyDown(Keys.OemQuotes) && (jumpVal == 25 || clawVal
== 25 || breathVal == 25 || confVal == 25 || swlVal == 25 || swrVal == 25 || leftVal
== 25 || rightVal == 25 || upVal == 25 || downVal == 25))
{
if (jumpVal == 25)
{
jumpTrue = true;
}
if (clawVal == 25)
{
clawTrue = true;
}
if (breathVal == 25)
{
breathTrue = true;
}
if (confVal == 25)
{
confTrue = true;
}
if (swlVal == 25)
{
swlTrue = true;
}
if (swrVal == 25)
{
swrTrue = true;
}
if (leftVal == 25)
{
leftTrue = true;
}
if (rightVal == 25)
{
rightTrue = true;
}
if (upVal == 25)
{
upTrue = true;
}
if (downVal == 25)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.OemQuotes) && (jumpVal == 25 ||
clawVal == 25 || breathVal == 25 || confVal == 25 || swlVal == 25 || swrVal == 25 ||
leftVal == 25 || rightVal == 25 || upVal == 25 || downVal == 25))
{
if (jumpVal == 25 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 25 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 25 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 25 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 25 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 25 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 25 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 25 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 25 && upTrue == true)
{
upTrue = false;
}
if (downVal == 25 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#endregion
#region line 3 / 26-35
#region Z
if (kbState.IsKeyDown(Keys.Z) && (jumpVal == 26 || clawVal == 26 ||
breathVal == 26 || confVal == 26 || swlVal == 26 || swrVal == 26 || leftVal == 26 ||
rightVal == 26 || upVal == 26 || downVal == 26))
{
if (jumpVal == 26)
{
jumpTrue = true;
}
if (clawVal == 26)
{
clawTrue = true;
}
if (breathVal == 26)
{
breathTrue = true;
}
if (confVal == 26)
{
confTrue = true;
}
if (swlVal == 26)
{
swlTrue = true;
}
if (swrVal == 26)
{
swrTrue = true;
}
if (leftVal == 26)
{
leftTrue = true;
}
if (rightVal == 26)
{
rightTrue = true;
}
if (upVal == 26)
{
upTrue = true;
}
if (downVal == 26)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.Z) && (jumpVal == 26 || clawVal == 26
|| breathVal == 26 || confVal == 26 || swlVal == 26 || swrVal == 26 || leftVal == 26
|| rightVal == 26 || upVal == 26 || downVal == 26))
{
if (jumpVal == 26 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 26 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 26 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 26 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 26 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 26 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 26 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 26 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 26 && upTrue == true)
{
upTrue = false;
}
if (downVal == 26 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region X
if (kbState.IsKeyDown(Keys.X) && (jumpVal == 27 || clawVal == 27 ||
breathVal == 27 || confVal == 27 || swlVal == 27 || swrVal == 27 || leftVal == 27 ||
rightVal == 27 || upVal == 27 || downVal == 27))
{
if (jumpVal == 27)
{
jumpTrue = true;
}
if (clawVal == 27)
{
clawTrue = true;
}
if (breathVal == 27)
{
breathTrue = true;
}
if (confVal == 27)
{
confTrue = true;
}
if (swlVal == 27)
{
swlTrue = true;
}
if (swrVal == 27)
{
swrTrue = true;
}
if (leftVal == 27)
{
leftTrue = true;
}
if (rightVal == 27)
{
rightTrue = true;
}
if (upVal == 27)
{
upTrue = true;
}
if (downVal == 27)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.X) && (jumpVal == 27 || clawVal == 27
|| breathVal == 27 || confVal == 27 || swlVal == 27 || swrVal == 27 || leftVal == 27
|| rightVal == 27 || upVal == 27 || downVal == 27))
{
if (jumpVal == 27 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 27 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 27 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 27 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 27 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 27 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 27 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 27 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 27 && upTrue == true)
{
upTrue = false;
}
if (downVal == 27 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region C
if (kbState.IsKeyDown(Keys.C) && (jumpVal == 28 || clawVal == 28 ||
breathVal == 28 || confVal == 28 || swlVal == 28 || swrVal == 28 || leftVal == 28 ||
rightVal == 28 || upVal == 28 || downVal == 28))
{
if (jumpVal == 28)
{
jumpTrue = true;
}
if (clawVal == 28)
{
clawTrue = true;
}
if (breathVal == 28)
{
breathTrue = true;
}
if (confVal == 28)
{
confTrue = true;
}
if (swlVal == 28)
{
swlTrue = true;
}
if (swrVal == 28)
{
swrTrue = true;
}
if (leftVal == 28)
{
leftTrue = true;
}
if (rightVal == 28)
{
rightTrue = true;
}
if (upVal == 28)
{
upTrue = true;
}
if (downVal == 28)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.C) && (jumpVal == 28 || clawVal == 28
|| breathVal == 28 || confVal == 28 || swlVal == 28 || swrVal == 28 || leftVal == 28
|| rightVal == 28 || upVal == 28 || downVal == 28))
{
if (jumpVal == 28 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 28 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 28 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 28 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 28 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 28 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 28 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 28 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 28 && upTrue == true)
{
upTrue = false;
}
if (downVal == 28 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region V
if (kbState.IsKeyDown(Keys.V) && (jumpVal == 29 || clawVal == 29 ||
breathVal == 29 || confVal == 29 || swlVal == 29 || swrVal == 29 || leftVal == 29 ||
rightVal == 29 || upVal == 29 || downVal == 29))
{
if (jumpVal == 29)
{
jumpTrue = true;
}
if (clawVal == 29)
{
clawTrue = true;
}
if (breathVal == 29)
{
breathTrue = true;
}
if (confVal == 29)
{
confTrue = true;
}
if (swlVal == 29)
{
swlTrue = true;
}
if (swrVal == 29)
{
swrTrue = true;
}
if (leftVal == 29)
{
leftTrue = true;
}
if (rightVal == 29)
{
rightTrue = true;
}
if (upVal == 29)
{
upTrue = true;
}
if (downVal == 29)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.V) && (jumpVal == 29 || clawVal == 29
|| breathVal == 29 || confVal == 29 || swlVal == 29 || swrVal == 29 || leftVal == 29
|| rightVal == 29 || upVal == 29 || downVal == 29))
{
if (jumpVal == 29 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 29 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 29 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 29 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 29 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 29 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 29 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 29 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 29 && upTrue == true)
{
upTrue = false;
}
if (downVal == 29 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region B
if (kbState.IsKeyDown(Keys.B) && (jumpVal == 30 || clawVal == 30 ||
breathVal == 30 || confVal == 30 || swlVal == 30 || swrVal == 30 || leftVal == 30 ||
rightVal == 30 || upVal == 30 || downVal == 30))
{
if (jumpVal == 30)
{
jumpTrue = true;
}
if (clawVal == 30)
{
clawTrue = true;
}
if (breathVal == 30)
{
breathTrue = true;
}
if (confVal == 30)
{
confTrue = true;
}
if (swlVal == 30)
{
swlTrue = true;
}
if (swrVal == 30)
{
swrTrue = true;
}
if (leftVal == 30)
{
leftTrue = true;
}
if (rightVal == 30)
{
rightTrue = true;
}
if (upVal == 30)
{
upTrue = true;
}
if (downVal == 30)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.B) && (jumpVal == 30 || clawVal == 30
|| breathVal == 30 || confVal == 30 || swlVal == 30 || swrVal == 30 || leftVal == 30
|| rightVal == 30 || upVal == 30 || downVal == 30))
{
if (jumpVal == 30 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 30 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 30 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 30 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 30 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 30 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 30 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 30 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 30 && upTrue == true)
{
upTrue = false;
}
if (downVal == 30 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region N
if (kbState.IsKeyDown(Keys.N) && (jumpVal == 31 || clawVal == 31 ||
breathVal == 31 || confVal == 31 || swlVal == 31 || swrVal == 31 || leftVal == 31 ||
rightVal == 31 || upVal == 31 || downVal == 31))
{
if (jumpVal == 31)
{
jumpTrue = true;
}
if (clawVal == 31)
{
clawTrue = true;
}
if (breathVal == 31)
{
breathTrue = true;
}
if (confVal == 31)
{
confTrue = true;
}
if (swlVal == 31)
{
swlTrue = true;
}
if (swrVal == 31)
{
swrTrue = true;
}
if (leftVal == 31)
{
leftTrue = true;
}
if (rightVal == 31)
{
rightTrue = true;
}
if (upVal == 31)
{
upTrue = true;
}
if (downVal == 31)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.N) && (jumpVal == 31 || clawVal == 31
|| breathVal == 31 || confVal == 31 || swlVal == 31 || swrVal == 31 || leftVal == 31
|| rightVal == 31 || upVal == 31 || downVal == 31))
{
if (jumpVal == 31 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 31 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 31 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 31 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 31 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 31 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 31 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 31 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 31 && upTrue == true)
{
upTrue = false;
}
if (downVal == 31 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region M
if (kbState.IsKeyDown(Keys.M) && (jumpVal == 32 || clawVal == 32 ||
breathVal == 32 || confVal == 32 || swlVal == 32 || swrVal == 32 || leftVal == 32 ||
rightVal == 32 || upVal == 32 || downVal == 32))
{
if (jumpVal == 32)
{
jumpTrue = true;
}
if (clawVal == 32)
{
clawTrue = true;
}
if (breathVal == 32)
{
breathTrue = true;
}
if (confVal == 32)
{
confTrue = true;
}
if (swlVal == 32)
{
swlTrue = true;
}
if (swrVal == 32)
{
swrTrue = true;
}
if (leftVal == 32)
{
leftTrue = true;
}
if (rightVal == 32)
{
rightTrue = true;
}
if (upVal == 32)
{
upTrue = true;
}
if (downVal == 32)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.M) && (jumpVal == 32 || clawVal == 32
|| breathVal == 32 || confVal == 32 || swlVal == 32 || swrVal == 32 || leftVal == 32
|| rightVal == 32 || upVal == 32 || downVal == 32))
{
if (jumpVal == 32 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 32 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 32 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 32 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 32 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 32 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 32 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 32 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 32 && upTrue == true)
{
upTrue = false;
}
if (downVal == 32 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region .
if (kbState.IsKeyDown(Keys.OemPeriod) && (jumpVal == 33 || clawVal
== 33 || breathVal == 33 || confVal == 33 || swlVal == 33 || swrVal == 33 || leftVal
== 33 || rightVal == 33 || upVal == 33 || downVal == 33))
{
if (jumpVal == 33)
{
jumpTrue = true;
}
if (clawVal == 33)
{
clawTrue = true;
}
if (breathVal == 33)
{
breathTrue = true;
}
if (confVal == 33)
{
confTrue = true;
}
if (swlVal == 33)
{
swlTrue = true;
}
if (swrVal == 33)
{
swrTrue = true;
}
if (leftVal == 33)
{
leftTrue = true;
}
if (rightVal == 33)
{
rightTrue = true;
}
if (upVal == 33)
{
upTrue = true;
}
if (downVal == 33)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.OemPeriod) && (jumpVal == 33 ||
clawVal == 33 || breathVal == 33 || confVal == 33 || swlVal == 33 || swrVal == 33 ||
leftVal == 33 || rightVal == 33 || upVal == 33 || downVal == 33))
{
if (jumpVal == 33 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 33 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 33 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 33 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 33 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 33 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 33 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 33 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 33 && upTrue == true)
{
upTrue = false;
}
if (downVal == 33 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region ,
if (kbState.IsKeyDown(Keys.OemComma) && (jumpVal == 34 || clawVal ==
34 || breathVal == 34 || confVal == 34 || swlVal == 34 || swrVal == 34 || leftVal ==
34 || rightVal == 34 || upVal == 34 || downVal == 34))
{
if (jumpVal == 34)
{
jumpTrue = true;
}
if (clawVal == 34)
{
clawTrue = true;
}
if (breathVal == 34)
{
breathTrue = true;
}
if (confVal == 34)
{
confTrue = true;
}
if (swlVal == 34)
{
swlTrue = true;
}
if (swrVal == 34)
{
swrTrue = true;
}
if (leftVal == 34)
{
leftTrue = true;
}
if (rightVal == 34)
{
rightTrue = true;
}
if (upVal == 34)
{
upTrue = true;
}
if (downVal == 34)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.OemComma) && (jumpVal == 34 || clawVal
== 34 || breathVal == 34 || confVal == 34 || swlVal == 34 || swrVal == 34 || leftVal
== 34 || rightVal == 34 || upVal == 34 || downVal == 34))
{
if (jumpVal == 34 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 34 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 34 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 34 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 34 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 34 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 34 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 34 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 34 && upTrue == true)
{
upTrue = false;
}
if (downVal == 34 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region /
if (kbState.IsKeyDown(Keys.OemQuestion) && (jumpVal == 35 || clawVal
== 35 || breathVal == 35 || confVal == 35 || swlVal == 35 || swrVal == 35 || leftVal
== 35 || rightVal == 35 || upVal == 35 || downVal == 35))
{
if (jumpVal == 35)
{
jumpTrue = true;
}
if (clawVal == 35)
{
clawTrue = true;
}
if (breathVal == 35)
{
breathTrue = true;
}
if (confVal == 35)
{
confTrue = true;
}
if (swlVal == 35)
{
swlTrue = true;
}
if (swrVal == 35)
{
swrTrue = true;
}
if (leftVal == 35)
{
leftTrue = true;
}
if (rightVal == 35)
{
rightTrue = true;
}
if (upVal == 35)
{
upTrue = true;
}
if (downVal == 35)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.OemQuestion) && (jumpVal == 35 ||
clawVal == 35 || breathVal == 35 || confVal == 35 || swlVal == 35 || swrVal == 35 ||
leftVal == 35 || rightVal == 35 || upVal == 35 || downVal == 35))
{
if (jumpVal == 35 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 35 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 35 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 35 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 35 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 35 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 35 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 35 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 35 && upTrue == true)
{
upTrue = false;
}
if (downVal == 35 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#endregion
#region line 4 / 36 - 38
#region Shift
if ((kbState.IsKeyDown(Keys.LeftShift) || kbState.IsKeyDown
(Keys.RightShift)) && (jumpVal == 36 || clawVal == 36 || breathVal == 36 || confVal
== 36 || swlVal == 36 || swrVal == 36 || leftVal == 36 || rightVal == 36 || upVal ==
36 || downVal == 36))
{
if (jumpVal == 36)
{
jumpTrue = true;
}
if (clawVal == 36)
{
clawTrue = true;
}
if (breathVal == 36)
{
breathTrue = true;
}
if (confVal == 36)
{
confTrue = true;
}
if (swlVal == 36)
{
swlTrue = true;
}
if (swrVal == 36)
{
swrTrue = true;
}
if (leftVal == 36)
{
leftTrue = true;
}
if (rightVal == 36)
{
rightTrue = true;
}
if (upVal == 36)
{
upTrue = true;
}
if (downVal == 36)
{
downTrue = true;
}
}
else if ((kbState.IsKeyUp(Keys.LeftShift) && kbState.IsKeyUp
(Keys.RightShift)) && (jumpVal == 36 || clawVal == 36 || breathVal == 36 || confVal
== 36 || swlVal == 36 || swrVal == 36 || leftVal == 36 || rightVal == 36 || upVal ==
36 || downVal == 36))
{
if (jumpVal == 36 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 36 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 36 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 36 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 36 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 36 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 36 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 36 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 36 && upTrue == true)
{
upTrue = false;
}
if (downVal == 36 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region Ctrl
if ((kbState.IsKeyDown(Keys.LeftControl) || kbState.IsKeyDown
(Keys.RightControl)) && (jumpVal == 37 || clawVal == 37 || breathVal == 37 ||
confVal == 37 || swlVal == 37 || swrVal == 37 || leftVal == 37 || rightVal == 37 ||
upVal == 37 || downVal == 37))
{
if (jumpVal == 37)
{
jumpTrue = true;
}
if (clawVal == 37)
{
clawTrue = true;
}
if (breathVal == 37)
{
breathTrue = true;
}
if (confVal == 37)
{
confTrue = true;
}
if (swlVal == 37)
{
swlTrue = true;
}
if (swrVal == 37)
{
swrTrue = true;
}
if (leftVal == 37)
{
leftTrue = true;
}
if (rightVal == 37)
{
rightTrue = true;
}
if (upVal == 37)
{
upTrue = true;
}
if (downVal == 37)
{
downTrue = true;
}
}
else if ((kbState.IsKeyUp(Keys.LeftControl) && kbState.IsKeyUp
(Keys.RightControl)) && (jumpVal == 37 || clawVal == 37 || breathVal == 37 ||
confVal == 37 || swlVal == 37 || swrVal == 37 || leftVal == 37 || rightVal == 37 ||
upVal == 37 || downVal == 37))
{
if (jumpVal == 37 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 37 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 37 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 37 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 37 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 37 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 37 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 37 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 37 && upTrue == true)
{
upTrue = false;
}
if (downVal == 37 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region Space
if (kbState.IsKeyDown(Keys.Space) && (jumpVal == 38 || clawVal == 38
|| breathVal == 38 || confVal == 38 || swlVal == 38 || swrVal == 38 || leftVal == 38
|| rightVal == 38 || upVal == 38 || downVal == 38))
{
if (jumpVal == 38)
{
jumpTrue = true;
}
if (clawVal == 38)
{
clawTrue = true;
}
if (breathVal == 38)
{
breathTrue = true;
}
if (confVal == 38)
{
confTrue = true;
}
if (swlVal == 38)
{
swlTrue = true;
}
if (swrVal == 38)
{
swrTrue = true;
}
if (leftVal == 38)
{
leftTrue = true;
}
if (rightVal == 38)
{
rightTrue = true;
}
if (upVal == 38)
{
upTrue = true;
}
if (downVal == 38)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.Space) && (jumpVal == 38 || clawVal ==
38 || breathVal == 38 || confVal == 38 || swlVal == 38 || swrVal == 38 || leftVal ==
38 || rightVal == 38 || upVal == 38 || downVal == 38))
{
if (jumpVal == 38 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 38 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 38 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 38 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 38 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 38 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 38 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 38 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 38 && upTrue == true)
{
upTrue = false;
}
if (downVal == 38 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#endregion
#region line 5 / 39 - 48
#region 0
if (kbState.IsKeyDown(Keys.D0) && (jumpVal == 39 || clawVal == 39 ||
breathVal == 39 || confVal == 39 || swlVal == 39 || swrVal == 39 || leftVal == 39 ||
rightVal == 39 || upVal == 39 || downVal == 39))
{
if (jumpVal == 39)
{
jumpTrue = true;
}
if (clawVal == 39)
{
clawTrue = true;
}
if (breathVal == 39)
{
breathTrue = true;
}
if (confVal == 39)
{
confTrue = true;
}
if (swlVal == 39)
{
swlTrue = true;
}
if (swrVal == 39)
{
swrTrue = true;
}
if (leftVal == 39)
{
leftTrue = true;
}
if (rightVal == 39)
{
rightTrue = true;
}
if (upVal == 39)
{
upTrue = true;
}
if (downVal == 39)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.D0) && (jumpVal == 39 || clawVal == 39
|| breathVal == 39 || confVal == 39 || swlVal == 39 || swrVal == 39 || leftVal == 39
|| rightVal == 39 || upVal == 39 || downVal == 39))
{
if (jumpVal == 39 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 39 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 39 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 39 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 39 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 39 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 39 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 39 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 39 && upTrue == true)
{
upTrue = false;
}
if (downVal == 39 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region 1
if (kbState.IsKeyDown(Keys.D1) && (jumpVal == 40 || clawVal == 40 ||
breathVal == 40 || confVal == 40 || swlVal == 40 || swrVal == 40 || leftVal == 40 ||
rightVal == 40 || upVal == 40 || downVal == 40))
{
if (jumpVal == 40)
{
jumpTrue = true;
}
if (clawVal == 40)
{
clawTrue = true;
}
if (breathVal == 40)
{
breathTrue = true;
}
if (confVal == 40)
{
confTrue = true;
}
if (swlVal == 40)
{
swlTrue = true;
}
if (swrVal == 40)
{
swrTrue = true;
}
if (leftVal == 40)
{
leftTrue = true;
}
if (rightVal == 40)
{
rightTrue = true;
}
if (upVal == 40)
{
upTrue = true;
}
if (downVal == 40)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.D1) && (jumpVal == 40 || clawVal == 40
|| breathVal == 40 || confVal == 40 || swlVal == 40 || swrVal == 40 || leftVal == 40
|| rightVal == 40 || upVal == 40 || downVal == 40))
{
if (jumpVal == 40 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 40 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 40 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 40 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 40 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 40 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 40 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 40 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 40 && upTrue == true)
{
upTrue = false;
}
if (downVal == 40 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region 2
if (kbState.IsKeyDown(Keys.D2) && (jumpVal == 41 || clawVal == 41 ||
breathVal == 41 || confVal == 41 || swlVal == 41 || swrVal == 41 || leftVal == 41 ||
rightVal == 41 || upVal == 41 || downVal == 41))
{
if (jumpVal == 41)
{
jumpTrue = true;
}
if (clawVal == 41)
{
clawTrue = true;
}
if (breathVal == 41)
{
breathTrue = true;
}
if (confVal == 41)
{
confTrue = true;
}
if (swlVal == 41)
{
swlTrue = true;
}
if (swrVal == 41)
{
swrTrue = true;
}
if (leftVal == 41)
{
leftTrue = true;
}
if (rightVal == 41)
{
rightTrue = true;
}
if (upVal == 41)
{
upTrue = true;
}
if (downVal == 41)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.D2) && (jumpVal == 41 || clawVal == 41
|| breathVal == 41 || confVal == 41 || swlVal == 41 || swrVal == 41 || leftVal == 41
|| rightVal == 41 || upVal == 41 || downVal == 41))
{
if (jumpVal == 41 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 41 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 41 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 41 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 41 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 41 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 41 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 41 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 41 && upTrue == true)
{
upTrue = false;
}
if (downVal == 41 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region 3
if (kbState.IsKeyDown(Keys.D3) && (jumpVal == 42 || clawVal == 42 ||
breathVal == 42 || confVal == 42 || swlVal == 42 || swrVal == 42 || leftVal == 42 ||
rightVal == 42 || upVal == 42 || downVal == 42))
{
if (jumpVal == 42)
{
jumpTrue = true;
}
if (clawVal == 42)
{
clawTrue = true;
}
if (breathVal == 42)
{
breathTrue = true;
}
if (confVal == 42)
{
confTrue = true;
}
if (swlVal == 42)
{
swlTrue = true;
}
if (swrVal == 42)
{
swrTrue = true;
}
if (leftVal == 42)
{
leftTrue = true;
}
if (rightVal == 42)
{
rightTrue = true;
}
if (upVal == 42)
{
upTrue = true;
}
if (downVal == 42)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.D3) && (jumpVal == 42 || clawVal == 42
|| breathVal == 42 || confVal == 42 || swlVal == 42 || swrVal == 42 || leftVal == 42
|| rightVal == 42 || upVal == 42 || downVal == 42))
{
if (jumpVal == 42 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 42 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 42 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 42 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 42 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 42 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 42 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 42 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 42 && upTrue == true)
{
upTrue = false;
}
if (downVal == 42 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region 4
if (kbState.IsKeyDown(Keys.D4) && (jumpVal == 43 || clawVal == 43 ||
breathVal == 43 || confVal == 43 || swlVal == 43 || swrVal == 43 || leftVal == 43 ||
rightVal == 43 || upVal == 43 || downVal == 43))
{
if (jumpVal == 43)
{
jumpTrue = true;
}
if (clawVal == 43)
{
clawTrue = true;
}
if (breathVal == 43)
{
breathTrue = true;
}
if (confVal == 43)
{
confTrue = true;
}
if (swlVal == 43)
{
swlTrue = true;
}
if (swrVal == 43)
{
swrTrue = true;
}
if (leftVal == 43)
{
leftTrue = true;
}
if (rightVal == 43)
{
rightTrue = true;
}
if (upVal == 43)
{
upTrue = true;
}
if (downVal == 43)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.D4) && (jumpVal == 43 || clawVal == 43
|| breathVal == 43 || confVal == 43 || swlVal == 43 || swrVal == 43 || leftVal == 43
|| rightVal == 43 || upVal == 43 || downVal == 43))
{
if (jumpVal == 43 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 43 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 43 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 43 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 43 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 43 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 43 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 43 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 43 && upTrue == true)
{
upTrue = false;
}
if (downVal == 43 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region 5
if (kbState.IsKeyDown(Keys.D5) && (jumpVal == 44 || clawVal == 44 ||
breathVal == 44 || confVal == 44 || swlVal == 44 || swrVal == 44 || leftVal == 44 ||
rightVal == 44 || upVal == 44 || downVal == 44))
{
if (jumpVal == 44)
{
jumpTrue = true;
}
if (clawVal == 44)
{
clawTrue = true;
}
if (breathVal == 44)
{
breathTrue = true;
}
if (confVal == 44)
{
confTrue = true;
}
if (swlVal == 44)
{
swlTrue = true;
}
if (swrVal == 44)
{
swrTrue = true;
}
if (leftVal == 44)
{
leftTrue = true;
}
if (rightVal == 44)
{
rightTrue = true;
}
if (upVal == 44)
{
upTrue = true;
}
if (downVal == 44)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.D5) && (jumpVal == 44 || clawVal == 44
|| breathVal == 44 || confVal == 44 || swlVal == 44 || swrVal == 44 || leftVal == 44
|| rightVal == 44 || upVal == 44 || downVal == 44))
{
if (jumpVal == 44 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 44 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 44 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 44 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 44 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 44 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 44 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 44 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 44 && upTrue == true)
{
upTrue = false;
}
if (downVal == 44 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region 6
if (kbState.IsKeyDown(Keys.D6) && (jumpVal == 45 || clawVal == 45 ||
breathVal == 45 || confVal == 45 || swlVal == 45 || swrVal == 45 || leftVal == 45 ||
rightVal == 45 || upVal == 45 || downVal == 45))
{
if (jumpVal == 45)
{
jumpTrue = true;
}
if (clawVal == 45)
{
clawTrue = true;
}
if (breathVal == 45)
{
breathTrue = true;
}
if (confVal == 45)
{
confTrue = true;
}
if (swlVal == 45)
{
swlTrue = true;
}
if (swrVal == 45)
{
swrTrue = true;
}
if (leftVal == 45)
{
leftTrue = true;
}
if (rightVal == 45)
{
rightTrue = true;
}
if (upVal == 45)
{
upTrue = true;
}
if (downVal == 45)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.D6) && (jumpVal == 45 || clawVal == 45
|| breathVal == 45 || confVal == 45 || swlVal == 45 || swrVal == 45 || leftVal == 45
|| rightVal == 45 || upVal == 45 || downVal == 45))
{
if (jumpVal == 45 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 45 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 45 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 45 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 45 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 45 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 45 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 45 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 45 && upTrue == true)
{
upTrue = false;
}
if (downVal == 45 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region 7
if (kbState.IsKeyDown(Keys.D7) && (jumpVal == 46 || clawVal == 46 ||
breathVal == 46 || confVal == 46 || swlVal == 46 || swrVal == 46 || leftVal == 46 ||
rightVal == 46 || upVal == 46 || downVal == 46))
{
if (jumpVal == 46)
{
jumpTrue = true;
}
if (clawVal == 46)
{
clawTrue = true;
}
if (breathVal == 46)
{
breathTrue = true;
}
if (confVal == 46)
{
confTrue = true;
}
if (swlVal == 46)
{
swlTrue = true;
}
if (swrVal == 46)
{
swrTrue = true;
}
if (leftVal == 46)
{
leftTrue = true;
}
if (rightVal == 46)
{
rightTrue = true;
}
if (upVal == 46)
{
upTrue = true;
}
if (downVal == 46)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.D7) && (jumpVal == 46 || clawVal == 46
|| breathVal == 46 || confVal == 46 || swlVal == 46 || swrVal == 46 || leftVal == 46
|| rightVal == 46 || upVal == 46 || downVal == 46))
{
if (jumpVal == 46 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 46 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 46 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 46 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 46 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 46 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 46 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 46 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 46 && upTrue == true)
{
upTrue = false;
}
if (downVal == 46 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region 8
if (kbState.IsKeyDown(Keys.D8) && (jumpVal == 47 || clawVal == 47 ||
breathVal == 47 || confVal == 47 || swlVal == 47 || swrVal == 47 || leftVal == 47 ||
rightVal == 47 || upVal == 47 || downVal == 47))
{
if (jumpVal == 47)
{
jumpTrue = true;
}
if (clawVal == 47)
{
clawTrue = true;
}
if (breathVal == 47)
{
breathTrue = true;
}
if (confVal == 47)
{
confTrue = true;
}
if (swlVal == 47)
{
swlTrue = true;
}
if (swrVal == 47)
{
swrTrue = true;
}
if (leftVal == 47)
{
leftTrue = true;
}
if (rightVal == 47)
{
rightTrue = true;
}
if (upVal == 47)
{
upTrue = true;
}
if (downVal == 47)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.D8) && (jumpVal == 47 || clawVal == 47
|| breathVal == 47 || confVal == 47 || swlVal == 47 || swrVal == 47 || leftVal == 47
|| rightVal == 47 || upVal == 47 || downVal == 47))
{
if (jumpVal == 47 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 47 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 47 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 47 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 47 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 47 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 47 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 47 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 47 && upTrue == true)
{
upTrue = false;
}
if (downVal == 47 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region 9
if (kbState.IsKeyDown(Keys.D9) && (jumpVal == 48 || clawVal == 48 ||
breathVal == 48 || confVal == 48 || swlVal == 48 || swrVal == 48 || leftVal == 48 ||
rightVal == 48 || upVal == 48 || downVal == 48))
{
if (jumpVal == 48)
{
jumpTrue = true;
}
if (clawVal == 48)
{
clawTrue = true;
}
if (breathVal == 48)
{
breathTrue = true;
}
if (confVal == 48)
{
confTrue = true;
}
if (swlVal == 48)
{
swlTrue = true;
}
if (swrVal == 48)
{
swrTrue = true;
}
if (leftVal == 48)
{
leftTrue = true;
}
if (rightVal == 48)
{
rightTrue = true;
}
if (upVal == 48)
{
upTrue = true;
}
if (downVal == 48)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.D9) && (jumpVal == 48 || clawVal == 48
|| breathVal == 48 || confVal == 48 || swlVal == 48 || swrVal == 48 || leftVal == 48
|| rightVal == 48 || upVal == 48 || downVal == 48))
{
if (jumpVal == 48 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 48 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 48 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 48 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 48 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 48 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 48 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 48 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 48 && upTrue == true)
{
upTrue = false;
}
if (downVal == 48 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#endregion
#region line 6 / 49 - 52
#region Left
if (kbState.IsKeyDown(Keys.Left) && (jumpVal == 49 || clawVal == 49
|| breathVal == 49 || confVal == 49 || swlVal == 49 || swrVal == 49 || leftVal == 49
|| rightVal == 49 || upVal == 49 || downVal == 49))
{
if (jumpVal == 49)
{
jumpTrue = true;
}
if (clawVal == 49)
{
clawTrue = true;
}
if (breathVal == 49)
{
breathTrue = true;
}
if (confVal == 49)
{
confTrue = true;
}
if (swlVal == 49)
{
swlTrue = true;
}
if (swrVal == 49)
{
swrTrue = true;
}
if (leftVal == 49)
{
leftTrue = true;
}
if (rightVal == 49)
{
rightTrue = true;
}
if (upVal == 49)
{
upTrue = true;
}
if (downVal == 49)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.Left) && (jumpVal == 49 || clawVal ==
49 || breathVal == 49 || confVal == 49 || swlVal == 49 || swrVal == 49 || leftVal ==
49 || rightVal == 49 || upVal == 49 || downVal == 49))
{
if (jumpVal == 49 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 49 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 49 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 49 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 49 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 49 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 49 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 49 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 49 && upTrue == true)
{
upTrue = false;
}
if (downVal == 49 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region Right
if (kbState.IsKeyDown(Keys.Right) && (jumpVal == 50 || clawVal == 50
|| breathVal == 50 || confVal == 50 || swlVal == 50 || swrVal == 50 || leftVal == 50
|| rightVal == 50 || upVal == 50 || downVal == 50))
{
if (jumpVal == 50)
{
jumpTrue = true;
}
if (clawVal == 50)
{
clawTrue = true;
}
if (breathVal == 50)
{
breathTrue = true;
}
if (confVal == 50)
{
confTrue = true;
}
if (swlVal == 50)
{
swlTrue = true;
}
if (swrVal == 50)
{
swrTrue = true;
}
if (leftVal == 50)
{
leftTrue = true;
}
if (rightVal == 50)
{
rightTrue = true;
}
if (upVal == 50)
{
upTrue = true;
}
if (downVal == 50)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.Right) && (jumpVal == 50 || clawVal ==
50 || breathVal == 50 || confVal == 50 || swlVal == 50 || swrVal == 50 || leftVal ==
50 || rightVal == 50 || upVal == 50 || downVal == 50))
{
if (jumpVal == 50 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 50 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 50 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 50 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 50 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 50 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 50 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 50 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 50 && upTrue == true)
{
upTrue = false;
}
if (downVal == 50 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region Up
if (kbState.IsKeyDown(Keys.Up) && (jumpVal == 51 || clawVal == 51 ||
breathVal == 51 || confVal == 51 || swlVal == 51 || swrVal == 51 || leftVal == 51 ||
rightVal == 51 || upVal == 51 || downVal == 51))
{
if (jumpVal == 51)
{
jumpTrue = true;
}
if (clawVal == 51)
{
clawTrue = true;
}
if (breathVal == 51)
{
breathTrue = true;
}
if (confVal == 51)
{
confTrue = true;
}
if (swlVal == 51)
{
swlTrue = true;
}
if (swrVal == 51)
{
swrTrue = true;
}
if (leftVal == 51)
{
leftTrue = true;
}
if (rightVal == 51)
{
rightTrue = true;
}
if (upVal == 51)
{
upTrue = true;
}
if (downVal == 51)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.Up) && (jumpVal == 51 || clawVal == 51
|| breathVal == 51 || confVal == 51 || swlVal == 51 || swrVal == 51 || leftVal == 51
|| rightVal == 51 || upVal == 51 || downVal == 51))
{
if (jumpVal == 51 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 51 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 51 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 51 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 51 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 51 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 51 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 51 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 51 && upTrue == true)
{
upTrue = false;
}
if (downVal == 51 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#region Down
if (kbState.IsKeyDown(Keys.Down) && (jumpVal == 52 || clawVal == 52
|| breathVal == 52 || confVal == 52 || swlVal == 52 || swrVal == 52 || leftVal == 52
|| rightVal == 52 || upVal == 52 || downVal == 52))
{
if (jumpVal == 52)
{
jumpTrue = true;
}
if (clawVal == 52)
{
clawTrue = true;
}
if (breathVal == 52)
{
breathTrue = true;
}
if (confVal == 52)
{
confTrue = true;
}
if (swlVal == 52)
{
swlTrue = true;
}
if (swrVal == 52)
{
swrTrue = true;
}
if (leftVal == 52)
{
leftTrue = true;
}
if (rightVal == 52)
{
rightTrue = true;
}
if (upVal == 52)
{
upTrue = true;
}
if (downVal == 52)
{
downTrue = true;
}
}
else if (kbState.IsKeyUp(Keys.Down) && (jumpVal == 52 || clawVal ==
52 || breathVal == 52 || confVal == 52 || swlVal == 52 || swrVal == 52 || leftVal ==
52 || rightVal == 52 || upVal == 52 || downVal == 52))
{
if (jumpVal == 52 && jumpTrue == true)
{
jumpTrue = false;
}
if (clawVal == 52 && clawTrue == true)
{
clawTrue = false;
}
if (breathVal == 52 && breathTrue == true)
{
breathTrue = false;
}
if (confVal == 52 && confTrue == true)
{
confTrue = false;
}
if (swlVal == 52 && swlTrue == true)
{
swlTrue = false;
}
if (swrVal == 52 && swrTrue == true)
{
swrTrue = false;
}
if (leftVal == 52 && leftTrue == true)
{
leftTrue = false;
}
if (rightVal == 52 && rightTrue == true)
{
rightTrue = false;
}
if (upVal == 52 && upTrue == true)
{
upTrue = false;
}
if (downVal == 52 && downTrue == true)
{
downTrue = false;
}
}
#endregion
#endregion
}
#endregion
#region fadedIn == true
if (fadedIn == true)
{
if (opacity < 255)
{
opacity = opacity + 5;
if (stage1eB == true)
{
boss1Opacity = opacity;
}
if (stage6e1 == true)
{
if (opacity < 255)
{
wallColor1 = opacity;
wallColor2 = opacity;
wallColor3 = opacity;
}
}
}
if (opacity == 255)
{
opacity = 255;
}
}
#endregion
#region fadedIn == false
if (fadedIn == false)
{
if (storybookCredits == true)
{
if (tempVolume > 0f)
{
tempVolume -= 0.05f;
}
}
if (opacity > 0)
{
opacity = opacity - 5;
e1FreezeColor = opacity;
e2FreezeColor = opacity;
e3FreezeColor = opacity;
e4FreezeColor = opacity;
e5FreezeColor = opacity;
e6FreezeColor = opacity;
e7FreezeColor = opacity;
e8FreezeColor = opacity;
e9FreezeColor = opacity;
e10FreezeColor = opacity;
e11FreezeColor = opacity;
e12FreezeColor = opacity;
e13FreezeColor = opacity;
e14FreezeColor = opacity;
e15FreezeColor = opacity;
e16FreezeColor = opacity;
e17FreezeColor = opacity;
e18FreezeColor = opacity;
e19FreezeColor = opacity;
e20FreezeColor = opacity;
if (stage1eB == true)
{
if (boss1Opacity > 0)
{
boss1Opacity = opacity;
}
}
if (stage2eB == true)
{
if (trackLaserOpacity > 0)
{
trackLaserOpacity = opacity;
}
}
if (stage6e1 == true)
{
if (wallOpacity1 > 0)
{
wallColor1 = opacity;
}
if (wallOpacity2 > 0)
{
wallColor2 = opacity;
}
if (wallOpacity3 > 0)
{
wallColor3 = opacity;
}
}
if (stage5e2 == true)
{
defenderFreezeOpacity = opacity;
}
if (stage6eB == true)
{
boss6Opacity = opacity;
}
if (stage7eB == true)
{
if (boss7Phase2 == true)
{
if (mechCloudOpacity > opacity)
{
mechCloudOpacity = opacity;
}
}
}
if (helpOpacity >= opacity)
{
helpOpacity = opacity;
}
obs1FreezeColor = opacity;
obs2FreezeColor = opacity;
obs3FreezeColor = opacity;
obs4FreezeColor = opacity;
obs5FreezeColor = opacity;
obs6FreezeColor = opacity;
obs7FreezeColor = opacity;
obs8FreezeColor = opacity;
obs9FreezeColor = opacity;
obs10FreezeColor = opacity;
}
if (opacity == 0)
{
opacity = 0;
if (stage1eB == true)
{
boss1Opacity = opacity;
}
obs1FreezeColor = opacity;
obs2FreezeColor = opacity;
obs3FreezeColor = opacity;
obs4FreezeColor = opacity;
obs5FreezeColor = opacity;
obs6FreezeColor = opacity;
obs7FreezeColor = opacity;
obs8FreezeColor = opacity;
obs9FreezeColor = opacity;
obs10FreezeColor = opacity;
helpOpacity = opacity;
}
if (storyOpacity > 0)
{
storyOpacity -= 5;
}
if (storyOpacity < 0)
{
storyOpacity = 0;
}
}
#endregion
#region toBlack == true
if (toBlack == true)
{
fadeCT++;
if (fadeCT > 60)
{
toBlack = false;
fadeCT = 0;
fadedIn = true;
}
}
#endregion
#region White Matte
if (whiteMatte == true && whiteMatteOpacity < 255)
{
whiteMatteOpacity = whiteMatteOpacity + 5;
if (whiteMatteOpacity > 255)
{
whiteMatteOpacity = 255;
}
}
if (whiteMatte == false && whiteMatteOpacity > 0)
{
whiteMatteOpacity = whiteMatteOpacity - 5;
if (whiteMatteOpacity < 0)
{
whiteMatteOpacity = 0;
}
}
#endregion
#region Black Matte
if (blackMatte == true && blackMatteOpacity < 255)
{
blackMatteOpacity = blackMatteOpacity + 5;
if (blackMatteOpacity > 255)
{
blackMatteOpacity = 255;
}
}
if (blackMatte == false && blackMatteOpacity > 0)
{
blackMatteOpacity = blackMatteOpacity - 5;
if (blackMatteOpacity < 0)
{
blackMatteOpacity = 0;
}
}
#endregion
#region musicFade == true
if (musicFade == true)
{
if (tempVolume > 0)
{
tempVolume = tempVolume - 0.05f;
}
if (tempVolume <= 0)
{
tempVolume = 0;
}
}
#endregion
#region savingGame == true
if (savingGame == true)
{
//SAVE ALL SETTINGS
#region Save New
save.Data.saveMapGridX = mapGridX;
save.Data.saveMapGridY = mapGridY;
save.Data.saveMapPosX = recallMapPosX;
save.Data.saveMapPosY = recallMapPosY;
save.Data.savefrom4e1 = from4e1;
save.Data.savefrom4e2 = from4e2;
save.Data.saveGoldNow = goldNow;
save.Data.saveGoldAvailable = goldAvailable;
save.Data.saveGoldTotal = goldTotal;
save.Data.saveAtkLV = atkLevel;
save.Data.saveBreathMaxBonus = breathMaxBonus;
save.Data.saveBreathDmgBonus = breathDmgBonus;
save.Data.saveClawDmgBonus = clawDmgBonus;
save.Data.saveCritBonus = breathCritBonus;
save.Data.saveCycleBonus = breathCycleBonus;
save.Data.saveDefLV = defLevel;
save.Data.saveHPBonus = drgnHPBonus;
save.Data.saveSpikeBonus = spikeDRBonus;
save.Data.saveDRBonus = drgnDRBonus;
save.Data.saveSprLV = sptLevel;
save.Data.saveFlyBonus = drgnFlyBonus;
save.Data.saveFreezeBonus = freezeTimeBonus;
save.Data.savePreserveGP = preserveGP;
save.Data.saveArmorRedBonus = acidArmorRedBonus;
save.Data.saveEXPReducer = EXPReducer;
save.Data.saveHPXP = drgnHPXP;
save.Data.saveBreathMaxXP = breathMaxXP;
save.Data.saveFlyXP = drgnFlyXP;
save.Data.saveClawXP = clawXP;
save.Data.saveBreathDmgXP = breathXP;
save.Data.saveHPLV = drgnHPLV;
save.Data.saveBreathMaxLV = breathMaxLV;
save.Data.saveFlyLV = drgnFlyLV;
save.Data.saveClawLV = clawLV;
save.Data.saveBreathDmgLV = breathLV;
save.Data.saveHatchling = have01Hatchling;
save.Data.saveHPTreasure1 = drgnHPTreasure1;
save.Data.saveSmile = have02Smile;
save.Data.saveHPTreasure2 = drgnHPTreasure2;
save.Data.saveCrest = have03Crest;
save.Data.saveDRTreasure1 = drgnDRTreasure1;
save.Data.saveUnderpants = have04Underpants;
save.Data.saveDRTreasure2 = drgnDRTreasure2;
save.Data.saveSollerets = have05Sollerets;
save.Data.saveSpikeTreasure = spikeDRTreasure;
save.Data.saveScepter = have06Scepter;
save.Data.saveBreathDmgTreasure1 = breathDmgTreasure1;
save.Data.saveMomiji = have07Momiji;
save.Data.saveBreathDmgTreasure2 = breathDmgTreasure2;
save.Data.saveNinjato = have08Ninjato;
save.Data.saveBreathMaxTreasure1 = breathMaxTreasure1;
save.Data.saveRing = have09Ring;
save.Data.saveBreathMaxTreasure2 = breathMaxTreasure2;
save.Data.saveSunset = have10Sunset;
save.Data.saveBreathMaxTreasure3 = breathMaxTreasure3;
save.Data.saveDreihander = have11Dreihander;
save.Data.saveClawDmgTreasure1 = clawDmgTreasure1;
save.Data.saveEndeavour = have12Endeavour;
save.Data.saveClawDmgTreasure2 = clawDmgTreasure2;
save.Data.saveDoll = have13Doll;
save.Data.saveClawSize = clawSize;
save.Data.saveLiqueur = have14Liqueur;
save.Data.saveArmorRedTreasure = acidArmorRedTreasure;
save.Data.savePenultima = have15Penultima;
save.Data.saveBreathCycleTreasure = breathCycleTreasure;
save.Data.saveLeaf = have16Leaf;
save.Data.saveFlyTreasure1 = drgnFlyTreasure1;
save.Data.saveHTTYD = have17HTTYD;
save.Data.saveFlyTreasure2 = drgnFlyTreasure2;
save.Data.saveGust = have18Gust;
save.Data.saveFlyTreasure3 = drgnFlyTreasure3;
save.Data.saveShirt = have19Shirt;
save.Data.saveFlyTreasure4 = drgnFlyTreasure4;
save.Data.saveDeduction = have20Deduction;
save.Data.saveFreezeTreasure = freezeTreasure;
save.Data.saveTopaz = have21Topaz;
save.Data.saveSapphire = have22Sapphire;
save.Data.saveGarnet = have23Garnet;
save.Data.saveRuby = have24Ruby;
save.Data.saveDiamond = have25Diamond;
save.Data.saves1e2On = on1e2;
save.Data.saves1e3On = on1e3;
save.Data.saves1ebOn = on1eB;
save.Data.saves2e1On = on2e1;
save.Data.saves2e2On = on2e2;
save.Data.saves2e3On = on2e3;
save.Data.saves2ebOn = on2eB;
save.Data.saves3e1On = on3e1;
save.Data.saves3e2On = on3e2;
save.Data.saves3e3On = on3e3;
save.Data.saves3ebOn = on3eB;
save.Data.saves4e1On = on4e1;
save.Data.saves4e2On = on4e2;
save.Data.saves4e3On = on4e3;
save.Data.saves4e4On = on4e4;
save.Data.saves4ebOn = on4eB;
save.Data.saves5e1On = on5e1;
save.Data.saves5e2On = on5e2;
save.Data.saves5ebOn = on5eB;
save.Data.saves6e1On = on6e1;
save.Data.saves6eBOn = on6eB;
save.Data.saves7eBOn = on7eB;
save.Data.saves1e2Seen = seenStory1_2;
save.Data.saves1eBSeen = seenStory1_B;
save.Data.saves2e2Seen = seenStory2_2;
save.Data.saves2eBSeen = seenStory2_B;
save.Data.saves3eBSeen = seenStory3_B;
save.Data.saves4e4Seen = seenStory4_4;
save.Data.saves4eBSeen = seenStory4_B;
save.Data.saves5eBSeen = seenStory5_B;
save.Data.saves6e1Seen = seenStory6_1;
save.Data.saves7eBSeen = seenStory7_B;
save.Data.savehaveBolt = haveBolt;
save.Data.savehaveCold = haveFrost;
save.Data.savehaveAcid = haveAcid;
save.Data.savehaveHerb = haveGanja;
save.Data.saveboss1Clear = boss1Clear;
save.Data.saveboss2Clear = boss2Clear;
save.Data.saveboss3Clear = boss3Clear;
save.Data.saveboss4Clear = boss4Clear;
save.Data.saveboss5Clear = boss5Clear;
save.Data.saveboss6Clear = boss6Clear;
save.Data.saveLanguageType = languageType;
save.Data.saveControlType = controlType;
save.Data.saveHealthType = healthType;
save.Data.saveBGMNum = checkVolume;
save.Data.saveSFXNum = checkSFX;
save.Data.saveJump = jumpVal;
save.Data.saveClaw = clawVal;
save.Data.saveBreath = breathVal;
save.Data.saveConf = confVal;
save.Data.saveSwl = swlVal;
save.Data.saveSwr = swrVal;
save.Data.saveLeft = leftVal;
save.Data.saveRight = rightVal;
save.Data.saveUp = upVal;
save.Data.saveDown = downVal;
save.Data.saveQuest = npcQuest;
save.Data.saveWhistle1 = whistle1;
save.Data.saveWhistle2 = whistle2;
save.Data.saveWhistle3 = whistle3;
#endregion
save.Save();
savingGame = false;
}
#endregion
#region fadeWait == true
if (fadeWait == true)
{
fadeCT++;
if (fadeCT > 60)
{
fadeWait = false;
fadeCT = 0;
#region toStory == true
if (toStory == true)
{
worldBGM.Dispose();
worldBGM = new ContentManager(Services, "Content");
stageBGM.Dispose();
stageBGM = new ContentManager(Services, "Content");
playStageMusic = new PlayStageMusic(0, null);
tempVolume = 1.0f;
playStoryHappy = new PlayStoryHappy(true, storyBGM);
playStoryEnemy = new PlayStoryEnemy(true, storyBGM);
playStoryWistful = new PlayStoryWistful(true, storyBGM);
drgnDashing = 1;
whiteMatte = false;
blackMatte = false;
warpFrame = 0;
warpCT = 0;
seenEvent1 = false;
seenEvent2 = false;
eventWait = 0;
eventXVel = 0;
eventYVel = 0;
storyHappy = false;
storyEnemy = false;
storyPulse = false;
if (stage1eB == true)
{
stage1eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage2e2 == true)
{
stage2e2 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage2eB == true)
{
stage2eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage3eB == true)
{
stage3eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage4eB == true)
{
stage4eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage5eB == true)
{
stage5eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage6e1 == true)
{
stage6e1 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
drawStages = new DrawStages(0, null);
drawSky = new DrawSky(0, null);
pageTurnSFXWait = 0;
pageTurnWait = false;
if (story1 == true)
{
drawStory = new DrawStory(1, languageType, fontSetting,
storyManager);
}
if (story1_2pre == true)
{
drawStory = new DrawStory(2, languageType, fontSetting,
storyManager);
}
if (story1_Bpre == true)
{
drawStory = new DrawStory(3, languageType, fontSetting,
storyManager);
}
if (story1_Bpost == true)
{
drawStory = new DrawStory(4, languageType, fontSetting,
storyManager);
}
if (story2_2post == true)
{
drawStory = new DrawStory(5, languageType, fontSetting,
storyManager);
}
if (story2_Bpre == true)
{
drawStory = new DrawStory(6, languageType, fontSetting,
storyManager);
}
if (story2_Bpost == true)
{
drawStory = new DrawStory(7, languageType, fontSetting,
storyManager);
}
if (story3_Bpre == true)
{
drawStory = new DrawStory(8, languageType, fontSetting,
storyManager);
}
if (story3_Bpost == true)
{
drawStory = new DrawStory(9, languageType, fontSetting,
storyManager);
}
if (story4_4post == true)
{
drawStory = new DrawStory(10, languageType, fontSetting,
storyManager);
}
if (story4_Bpre == true)
{
drawStory = new DrawStory(11, languageType, fontSetting,
storyManager);
}
if (story4_Bpost == true)
{
drawStory = new DrawStory(12, languageType, fontSetting,
storyManager);
}
if (story5_Bpre == true)
{
drawStory = new DrawStory(13, languageType, fontSetting,
storyManager);
}
if (story5_Bpost == true)
{
drawStory = new DrawStory(14, languageType, fontSetting,
storyManager);
}
if (story6_1post == true)
{
drawStory = new DrawStory(15, languageType, fontSetting,
storyManager);
}
if (story7_Bpre == true)
{
drawStory = new DrawStory(16, languageType, fontSetting,
storyManager);
}
if (story7_Bmid == true)
{
drawStory = new DrawStory(17, languageType, fontSetting,
storyManager);
}
if (storyEnd == true)
{
playStoryEndingA = new PlayStoryEndingA(true, storyBGM);
playStoryEndingB = new PlayStoryEndingB(true, storyBGM);
playStoryCredits = new PlayStoryCredits(true, storyBGM);
playMusicBox = new PlayMusicBox(true, storyBGM);
if (have01Hatchling == true && have02Smile == true &&
have03Crest == true && have04Underpants == true && have05Sollerets == true &&
have06Scepter == true && have07Momiji == true && have08Ninjato == true && have09Ring
== true && have10Sunset == true && have11Dreihander == true && have12Endeavour ==
true && have13Doll == true && have14Liqueur == true && have15Penultima == true &&
have16Leaf == true && have17HTTYD == true && have18Gust == true && have19Shirt ==
true && have20Deduction == true && have21Topaz == true && have22Sapphire == true &&
have23Garnet == true && have24Ruby == true && have25Diamond == true)
{
achievements.UpdateAch(-1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 1);
endpageCT = 0;
endpageFrameX = 0;
endpageFrameY = 0;
drawStory = new DrawStory(19, languageType,
fontSetting, storyManager);
drawEndPage = new DrawEndPage(true, storyManager);
}
else
{
achievements.UpdateAch(-1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 1, -1);
endpageCT = 0;
endpageFrameX = 0;
endpageFrameY = 0;
drawStory = new DrawStory(18, languageType,
fontSetting, storyManager);
drawEndPage = new DrawEndPage(true, storyManager);
}
drawCredits = new DrawCredits(true, storyManager);
drgnFaceR = false;
}
storybook = true;
#region Kill Title Screen
if (titleScreen == true)
{
titleScreen = false;
displayTitle = false;
}
#endregion
fromStory = true;
actionStage = false;
worldMap = false;
runEvent = false;
dragonDash = false;
page1Depth = 2;
storyFGFrameX1 = 0;
storyFGFrameY1 = 0;
page2Depth = 1;
storyFGFrameX2 = 0;
storyFGFrameY2 = 0;
page3Depth = 0;
storyFGFrameX3 = 0;
storyFGFrameY3 = 0;
page4Depth = 0;
storyFGFrameX4 = 0;
storyFGFrameY4 = 0;
page5Depth = 0;
storyFGFrameX5 = 0;
storyFGFrameY5 = 0;
page6Depth = 0;
storyFGFrameX6 = 0;
storyFGFrameY6 = 0;
page7Depth = 0;
storyFGFrameX7 = 0;
storyFGFrameY7 = 0;
storyTextFrameX = 0;
storyTextFrameY = 0;
storyTextTotal = 0;
storyFGFrameCT = 0;
storyOpacity = 0;
storyOpacityCT = 0;
pg1turn = false;
pg2turn = false;
pg3turn = false;
pg4turn = false;
pg5turn = false;
pg6turn = false;
pg7turn = false;
textFadeIn = true;
textFadeOut = false;
storyHappy = false;
storyPulse = false;
storyEnemy = false;
drgnCamX = 0;
drgnCamY = 0;
if (storybookCredits == true)
{
creditsMonsterFrame = 0;
creditsBackgroundX1 = -1280;
creditsBackgroundX2 = -2560;
creditsBackgroundX3 = -3840;
creditsBackgroundY1 = 0;
creditsBackgroundY2 = 0;
creditsBackgroundY3 = 0;
creditsDragonX = 1281;
creditsPrincessX = 1481;
creditsGirlX = 1681;
creditsBoyX = 1881;
credits1Y = 800;
credits2Y = 1600;
credits3Y = 2400;
credits4Y = 3200;
credits5Y = 4000;
credits6Y = 4800;
credits7Y = 5600;
credits8Y = 6400;
credits9Y = 7200;
credits10Y = 8000;
credits11Y = 8800;
credits12Y = 9600;
creditsDragonCT = 0;
creditsDragonFrame = 1;
creditsPrincessCT = 0;
creditsPrincessFrame = 2;
creditsGirlCT = 0;
creditsGirlFrame = 3;
creditsBoyCT = 0;
creditsBoyFrame = 0;
}
}
#endregion
#region toWorldMap == true
if (toWorldMap == true)
{
stageBGM.Dispose();
stageBGM = new ContentManager(Services, "Content");
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
playStageMusic = new PlayStageMusic(0, null);
play5e2Top = new Play5e2Top(0, null);
play5e2Bottom = new Play5e2Bottom(0, null);
breathSFX.Dispose();
breathSFX = new ContentManager(Services, "Content");
playFireSFX = new PlayFireSFX(0, null);
playThunderSFX = new PlayThunderSFX(0, null);
playIceSFX = new PlayIceSFX(0, null);
playAcidSFX = new PlayAcidSFX(0, null);
playMagicSFX = new PlayMagicSFX(0, null);
playWaterSFX = new PlayWaterSFX(0, null);
playWings = new PlayWings(0, null);
loopFlame = new LoopFlame(false, null);
loopThunderBlast = new LoopThunderBlast(false, null);
loopAcid = new LoopAcid(false, null);
loopFlameAtk = new LoopFlameAtk(false, null);
loopLaser = new LoopLaser(false, null);
loopBurrow = new LoopBurrow(false, null);
loopFireBreathAlt = new LoopFireBreathAlt(false, null);
loopIceBreathAlt = new LoopIceBreathAlt(false, null);
storyBGM.Dispose();
storyBGM = new ContentManager(Services, "Content");
playStoryEnemy = new PlayStoryEnemy(false, null);
playStoryHappy = new PlayStoryHappy(false, null);
playStoryWistful = new PlayStoryWistful(false, null);
drawWorldMap = new DrawWorldMap(true, mapManager);
if (fromStory == true)
{
//dispose music
storyManager.Dispose();
storyManager = new ContentManager(Services, "Content");
drawStory = new DrawStory(0, languageType, fontSetting,
null);
fromStory = false;
}
musicFade = false;
tempVolume = 1.0f;
playWorldMusic = new PlayWorldMusic(1, worldBGM);
capeReady = false;
puzzleCT = 0;
worldMapPointerModX = 0;
worldMapPointerModY = 0;
showPause = false;
pausePos = 0;
if (whiteMatte == true)
{
whiteMatte = false;
whiteMatteOpacity = 0;
}
if (seenStory2_2 == false && on2e3 == true)
{
seenStory2_2 = true;
}
if (seenStory6_1 == false && haveGanja == true)
{
seenStory6_1 = true;
}
drgnSpikeDamage = false;
drgnFire = false;
stageCT++;
whiteMatte = false;
drgnDashing = 1;
warpFrame = 0;
warpCT = 0;
seenEvent1 = false;
seenEvent2 = false;
eventXVel = 0;
eventYVel = 0;
eventWait = 0;
#region Kill Title Screen
if (titleScreen == true)
{
titleScreen = false;
displayTitle = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
#endregion
actionStage = false;
worldMap = true;
waterfall1Frozen = false;
waterfall2Frozen = false;
machineryElectrified = false;
needStarPos = false;
mapArrowUp = false;
mapArrowRight = false;
mapArrowDown = false;
mapArrowLeft = false;
drgnUnderwater = false;
underwaterBreath = false;
breathTypeSix = 0;
toggleTutorial = 0;
tutorialPos = 0;
worldMapCT = 0;
worldMapFrame = 0;
#region have treasure total
if (have01Hatchling == true)
{
haveTreasure1 = 1;
}
if (have02Smile == true)
{
haveTreasure2 = 1;
}
if (have03Crest == true)
{
haveTreasure3 = 1;
}
if (have04Underpants == true)
{
haveTreasure4 = 1;
}
if (have05Sollerets == true)
{
haveTreasure5 = 1;
}
if (have06Scepter == true)
{
haveTreasure6 = 1;
}
if (have07Momiji == true)
{
haveTreasure7 = 1;
}
if (have08Ninjato == true)
{
haveTreasure8 = 1;
}
if (have09Ring == true)
{
haveTreasure9 = 1;
}
if (have10Sunset == true)
{
haveTreasure10 = 1;
}
if (have11Dreihander == true)
{
haveTreasure11 = 1;
}
if (have12Endeavour == true)
{
haveTreasure12 = 1;
}
if (have13Doll == true)
{
haveTreasure13 = 1;
}
if (have14Liqueur == true)
{
haveTreasure14 = 1;
}
if (have15Penultima == true)
{
haveTreasure15 = 1;
}
if (have16Leaf == true)
{
haveTreasure16 = 1;
}
if (have17HTTYD == true)
{
haveTreasure17 = 1;
}
if (have18Gust == true)
{
haveTreasure18 = 1;
}
if (have19Shirt == true)
{
haveTreasure19 = 1;
}
if (have20Deduction == true)
{
haveTreasure20 = 1;
}
if (have21Topaz == true)
{
haveTreasure21 = 1;
}
if (have22Sapphire == true)
{
haveTreasure22 = 1;
}
if (have23Garnet == true)
{
haveTreasure23 = 1;
}
if (have24Ruby == true)
{
haveTreasure24 = 1;
}
if (have25Diamond == true)
{
haveTreasure25 = 1;
}
if (haveAcid == true)
{
haveTreasure26 = 1;
}
#endregion
#region Explosions
exp1CT = 0;
exp1Frame = 0;
exp2CT = 0;
exp2Frame = 0;
exp3CT = 0;
exp3Frame = 0;
exp4CT = 0;
exp4Frame = 0;
exp5CT = 0;
exp5Frame = 0;
exp6CT = 0;
exp6Frame = 0;
exp1Wait = 0;
exp2Wait = 0;
exp3Wait = 0;
exp4Wait = 0;
exp5Wait = 0;
exp6Wait = 0;
exp1X = 0;
exp1Y = 0;
exp2X = 0;
exp2Y = 0;
exp3X = 0;
exp3Y = 0;
exp4X = 0;
exp4Y = 0;
exp5X = 0;
exp5Y = 0;
exp6X = 0;
exp6Y = 0;
exp1On = false;
exp2On = false;
exp3On = false;
exp4On = false;
exp5On = false;
exp6On = false;
expSerial = false;
#endregion
#region Obstacles
obs1X = 0;
obs1Y = 0;
obs1XVel = 0;
obs1YVel = 0;
obs1CT = 0;
obs1Frame = 0;
obs1Act = 0;
obs1Wait = 0;
obs1FreezeCT = 0;
obs1FreezeColor = 0;
obs2X = 0;
obs2Y = 0;
obs2XVel = 0;
obs2YVel = 0;
obs2CT = 0;
obs2Frame = 0;
obs2Act = 0;
obs2Wait = 0;
obs2FreezeCT = 0;
obs2FreezeColor = 0;
obs3X = 0;
obs3Y = 0;
obs3XVel = 0;
obs3YVel = 0;
obs3CT = 0;
obs3Frame = 0;
obs3Act = 0;
obs3Wait = 0;
obs3FreezeCT = 0;
obs3FreezeColor = 0;
obs4X = 0;
obs4Y = 0;
obs4XVel = 0;
obs4YVel = 0;
obs4CT = 0;
obs4Frame = 0;
obs4Act = 0;
obs4Wait = 0;
obs4FreezeCT = 0;
obs4FreezeColor = 0;
obs5X = 0;
obs5Y = 0;
obs5XVel = 0;
obs5YVel = 0;
obs5CT = 0;
obs5Frame = 0;
obs5Act = 0;
obs5Wait = 0;
obs5FreezeCT = 0;
obs5FreezeColor = 0;
obs6X = 0;
obs6Y = 0;
obs6XVel = 0;
obs6YVel = 0;
obs6CT = 0;
obs6Frame = 0;
obs6Act = 0;
obs6Wait = 0;
obs6FreezeCT = 0;
obs6FreezeColor = 0;
obs7X = 0;
obs7Y = 0;
obs7XVel = 0;
obs7YVel = 0;
obs7CT = 0;
obs7Frame = 0;
obs7Act = 0;
obs7Wait = 0;
obs7FreezeCT = 0;
obs7FreezeColor = 0;
obs8X = 0;
obs8Y = 0;
obs8XVel = 0;
obs8YVel = 0;
obs8CT = 0;
obs8Frame = 0;
obs8Act = 0;
obs8Wait = 0;
obs8FreezeCT = 0;
obs8FreezeColor = 0;
obs9X = 0;
obs9Y = 0;
obs9XVel = 0;
obs9YVel = 0;
obs9CT = 0;
obs9Frame = 0;
obs9Act = 0;
obs9Wait = 0;
obs9FreezeCT = 0;
obs9FreezeColor = 0;
obs10X = 0;
obs10Y = 0;
obs10XVel = 0;
obs10YVel = 0;
obs10CT = 0;
obs10Frame = 0;
obs10Act = 0;
obs10Wait = 0;
obs10FreezeCT = 0;
obs10FreezeColor = 0;
obs1Up = false;
obs2Up = false;
obs3Up = false;
obs4Up = false;
obs5Up = false;
obs6Up = false;
obs7Up = false;
obs8Up = false;
obs9Up = false;
obs10Up = false;
#endregion
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = 0;
note1yPos = 0;
note1xVel = 0;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = 0;
note2yPos = 0;
note2xVel = 0;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = 0;
note3yPos = 0;
note3xVel = 0;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = 0;
note4yPos = 0;
note4xVel = 0;
note4yVel = -2;
#endregion
runEvent = false;
dragonDash = false;
drgnGrab = false;
#region stages
if (stageHome == true)
{
stageHome = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage1e1 == true)
{
stage1e1 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage1e2 == true)
{
stage1e2 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage1e3 == true)
{
stage1e3 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage1eB == true)
{
stage1eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage2e1 == true)
{
stage2e1 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage2e2 == true)
{
stage2e2 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage2e3 == true)
{
stage2e3 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage2e4 == true)
{
draw2e4 = new Draw2e4(false, stageManager);
stage2e4 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage2eB == true)
{
stage2eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage3e1 == true)
{
stage3e1 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage3e2 == true)
{
stage3e2 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage3e3 == true)
{
stage3e3 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage3eB == true)
{
stage3eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage4e1 == true)
{
stage4e1 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage4e2 == true)
{
stage4e2 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage4e3 == true)
{
stage4e3 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage4e4 == true)
{
stage4e4 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage4eB == true)
{
stage4eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage5e1 == true)
{
stage5e1 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage5e2 == true)
{
stage5e2 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage5eB == true)
{
stage5eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage6e1 == true)
{
stage6e1 = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage6eB == true)
{
stage6eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
if (stage7eB == true)
{
stage7eB = false;
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
}
#endregion
loadSquire = new LoadSquire(false, null);
loadSheep = new LoadSheep(false, null);
loadRam = new LoadRam(false, null);
loadArcher = new LoadArcher(false, null);
loadCD = new LoadCD(false, null);
loadHandler = new LoadHandler(false, null);
loadSecurity = new LoadSecurity(false, null);
loadXbow = new LoadXbow(false, null);
loadSwordmaster = new LoadSwordmaster(false, null);
loadBone = new LoadBone(false, null);
loadSax = new LoadSax(false, null);
loadTuba = new LoadTuba(false, null);
loadHazmat = new LoadHazmat(false, null);
loadLancer = new LoadLancer(false, null);
loadPikeman = new LoadPikeman(0, null);
loadFiresoldier = new LoadFiresoldier(false, null);
loadFencer = new LoadFencer(false, null);
loadXX = new LoadXX(false, null);
loadSpymaster = new LoadSpymaster(false, null);
loadWalker = new LoadWalker(false, null);
loadFlier = new LoadFlier(false, null);
loadFlyss = new LoadFlyss(false, null);
puzzleTruck = new PuzzleTruck(false, null);
puzzleWater = new PuzzleWater(false, null);
puzzleHovercraft = new PuzzleHovercraft(false, null);
puzzleBoat = new PuzzleBoat(false, null);
puzzleGate = new PuzzleGate(false, null);
puzzle4e3top = new Puzzle4e3top(false, null);
puzzleBramble = new PuzzleBramble(false, null);
puzzleCruise = new PuzzleCruise(false, null);
puzzleRock = new PuzzleRock(false, null);
puzzle5e2 = new Puzzle5e2(false, null);
puzzleTower = new PuzzleTower(false, null);
loadGust = new LoadGust(false, null);
loadBoss1 = new LoadTM061(false, null);
loadCaptain = new LoadCaptain(false, null);
loadAlex = new LoadAlex(false, null);
loadBaldwin = new LoadBaldwin(false, null);
loadWarden = new LoadWarden(false, null);
loadNinja = new LoadNinja(false, null);
loadGeneral = new LoadGeneral(false, null);
loadMech = new LoadMech(false, null);
loadOcean = new LoadOcean(0, null);
drawWater = new DrawWater(0, null);
loadWaterfall = new LoadWaterfall(0, null);
loadFirefloor = new LoadFirefloor(false, null);
loadLavaball = new LoadLavaball(false, null);
loadToxicball = new LoadToxicball(false, null);
loadNeckbird = new LoadNeckbird(false, null);
loadTentacle = new LoadTentacle(false, null);
npc1e2 = new Npc1e2(false, null);
npc1e3 = new Npc1e3(false, null);
npc2e1 = new Npc2e1(false, null);
npc2e2 = new Npc2e2(false, null);
npc2e3 = new Npc2e3(false, null);
npc2e4 = new Npc2e4(false, null);
npc3e1 = new Npc3e1(false, null);
npc4e1 = new Npc4e1(false, null);
npc4e2 = new Npc4e2(false, null);
npc4e3 = new Npc4e3(false, null);
npc4e4 = new Npc4e4(false, null);
npc5e1 = new Npc5e1(false, null);
npc5e2 = new Npc5e2(false, null);
draw2e1 = new Draw2e1(false, null);
draw2e4 = new Draw2e4(false, null);
draw4e2 = new Draw4e2(false, null);
draw5e1 = new Draw5e1(false, null);
draw6eB = new Draw6eB(false, null);
drawAbyss = new DrawAbyss(false, null);
drawStages = new DrawStages(0, null);
drawHome = new DrawHome(false, null, 0);
drawTreasureText = new DrawTreasureText(0, null, 0);
drawTitle = new DrawTitle(false, null);
drawSky = new DrawSky(0, null);
loadDragon = new LoadDragon(true, stageManager);
loadExplosion = new LoadExplosion(true, stageManager);
playDefeat = false;
playExit = false;
playFlameWall = false;
stageExit = false;
endOfStage = false;
stageMusic = false;
storybook = false;
story1 = false;
story1_2pre = false;
story1_Bpre = false;
story1_Bpost = false;
story2_2post = false;
story2_Bpre = false;
story2_Bpost = false;
story3_Bpre = false;
story3_Bpost = false;
story4_4post = false;
story4_Bpre = false;
story4_Bpost = false;
story5_Bpre = false;
story5_Bpost = false;
story6_1post = false;
story7_Bpre = false;
story7_Bmid = false;
depositedGP = false;
if (defeated == true)
{
defeated = false;
if (preserveGP == 0)
{
goldNow = goldNow / 2;
if (goldNow % 2 != 0)
{
goldNow--;
if (goldNow < 0)
{
goldNow = 0;
}
}
}
}
drgnX = recallMapPosX;
drgnY = recallMapPosY;
boss7Phase1 = false;
boss7Phase2 = false;
//BEGIN RESET SETTINGS
#region Enemy Reset
#region do not duplicate
e6projB_X = 0;
e6projB_Y = 0;
e6projBVel = 0;
e6projC_X = 0;
e6projC_Y = 0;
e6projCVel = 0;
e6projectileB = false;
e6projectileC = false;
e7projB_X = 0;
e7projB_Y = 0;
e7projBVel = 0;
e7projC_X = 0;
e7projC_Y = 0;
e7projCVel = 0;
e7projectileB = false;
e7projectileC = false;
e8projB_X = 0;
e8projB_Y = 0;
e8projBVel = 0;
e8projC_X = 0;
e8projC_Y = 0;
e8projCVel = 0;
e8projectileB = false;
e8projectileC = false;
e9projB_X = 0;
e9projB_Y = 0;
e9projBVel = 0;
e9projC_X = 0;
e9projC_Y = 0;
e9projCVel = 0;
e9projectileB = false;
e9projectileC = false;
e10projB_X = 0;
e10projB_Y = 0;
e10projBVel = 0;
e10projC_X = 0;
e10projC_Y = 0;
e10projCVel = 0;
e10projectileB = false;
e10projectileC = false;
e6Melee = false;
e7Melee = false;
e8Melee = false;
e6projA = false;
e7projA = false;
e8projA = false;
e6projB = false;
e7projB = false;
e8projB = false;
#endregion
e1HP = 0; //enemy 1 HP
e1arm = 0; //enemy 1 armor
e1CT = 0; //enemy 1 frame counter
e1Y_CT = 0; //enemy 1 velocity timer
e1timer = 0; //enemy 1 action timer
e1invTimer = 0; //enemy 1 invincibility timer
e1X = 0; //enemy 1 X-pos
e1Y = 0; //enemy 1 Y-pos
e1Yvel = 0; //enemy 1 Y-velocity
e1R = 0; //enemy 1 -R value
e1G = 0; //enemy 1 -G value
e1Opacity = 255; //enemy 1 opacity
e1frame = 0; //determines frame of animation for enemy 1
e1act = 0; //determines type of animation (move, wait,
attack, etc.)
e1facing = 0; //determines direction enemy 1 is facing
e1projA_X = 0; //determines enemy 1's projectile A X-pos
e1projA_Y = 0; //determines enemy 1's projectile A Y-pos
e1projA_frame = 0; //determines e1 projectile A frame of
animation
e1projA_dir = 0; //determines e1 projectile A orientation
e1invBlink = 255; //makes e1 blink when invulnerable
e1knockbackTimer = 0;
e1hitTimer = 0;
e1Attack = 0;
e1armor = 0;
e1armorRed = 0;
e1FreezeColor = 0;
e1FreezeCT = 0;
e1smokeCT = 0;
e1smokeFrame = 0;
e1coinValue = 0;
e1coinCT = 0;
e1coinFrame = 0;
e1coinType = 0;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 0;
e1altAnimCT = 0;
e2HP = 0;
e2arm = 0;
e2CT = 0;
e2Y_CT = 0;
e2timer = 0;
e2invTimer = 0;
e2X = 0;
e2Y = 0;
e2Yvel = 0;
e2R = 0;
e2G = 0;
e2Opacity = 255;
e2frame = 0;
e2act = 0;
e2facing = 0;
e2projA_X = 0;
e2projA_Y = 0;
e2projA_frame = 0;
e2projA_dir = 0;
e2invBlink = 255;
e2knockbackTimer = 0;
e2hitTimer = 0;
e2Attack = 0;
e2armor = 0;
e2armorRed = 0;
e2FreezeColor = 0;
e2FreezeCT = 0;
e2smokeCT = 0;
e2smokeFrame = 0;
e2coinValue = 0;
e2coinCT = 0;
e2coinFrame = 0;
e2coinType = 0;
e2FireVul = 0;
e2BoltVul = 0;
e2AcidVul = 0;
e2altAnimCT = 0;
e3HP = 0;
e3arm = 0;
e3CT = 0;
e3Y_CT = 0;
e3timer = 0;
e3invTimer = 0;
e3X = 0;
e3Y = 0;
e3Yvel = 0;
e3R = 0;
e3G = 0;
e3Opacity = 255;
e3frame = 0;
e3act = 0;
e3facing = 0;
e3projA_X = 0;
e3projA_Y = 0;
e3projA_frame = 0;
e3projA_dir = 0;
e3invBlink = 255;
e3knockbackTimer = 0;
e3hitTimer = 0;
e3Attack = 0;
e3armor = 0;
e3armorRed = 0;
e3FreezeColor = 0;
e3FreezeCT = 0;
e3smokeCT = 0;
e3smokeFrame = 0;
e3coinValue = 0;
e3coinCT = 0;
e3coinFrame = 0;
e3coinType = 0;
e3FireVul = 0;
e3BoltVul = 0;
e3AcidVul = 0;
e3altAnimCT = 0;
e4HP = 0;
e4arm = 0;
e4CT = 0;
e4Y_CT = 0;
e4timer = 0;
e4invTimer = 0;
e4X = 0;
e4Y = 0;
e4Yvel = 0;
e4R = 0;
e4G = 0;
e4Opacity = 255;
e4frame = 0;
e4act = 0;
e4facing = 0;
e4projA_X = 0;
e4projA_Y = 0;
e4projA_frame = 0;
e4projA_dir = 0;
e4invBlink = 255;
e4knockbackTimer = 0;
e4hitTimer = 0;
e4Attack = 0;
e4armor = 0;
e4armorRed = 0;
e4FreezeColor = 0;
e4FreezeCT = 0;
e4smokeCT = 0;
e4smokeFrame = 0;
e4coinValue = 0;
e4coinCT = 0;
e4coinFrame = 0;
e4coinType = 0;
e4FireVul = 0;
e4BoltVul = 0;
e4AcidVul = 0;
e4altAnimCT = 0;
e5HP = 0;
e5arm = 0;
e5CT = 0;
e5Y_CT = 0;
e5timer = 0;
e5invTimer = 0;
e5X = 0;
e5Y = 0;
e5Yvel = 0;
e5R = 0;
e5G = 0;
e5Opacity = 255;
e5frame = 0;
e5act = 0;
e5facing = 0;
e5projA_X = 0;
e5projA_Y = 0;
e5projA_frame = 0;
e5projA_dir = 0;
e5invBlink = 255;
e5knockbackTimer = 0;
e5hitTimer = 0;
e5Attack = 0;
e5armor = 0;
e5armorRed = 0;
e5FreezeColor = 0;
e5FreezeCT = 0;
e5smokeCT = 0;
e5smokeFrame = 0;
e5coinValue = 0;
e5coinCT = 0;
e5coinFrame = 0;
e5coinType = 0;
e5FireVul = 0;
e5BoltVul = 0;
e5AcidVul = 0;
e5altAnimCT = 0;
e6HP = 0;
e6arm = 0;
e6CT = 0;
e6Y_CT = 0;
e6timer = 0;
e6invTimer = 0;
e6X = 0;
e6Y = 0;
e6Yvel = 0;
e6R = 0;
e6G = 0;
e6Opacity = 255;
e6frame = 0;
e6act = 0;
e6facing = 0;
e6projA_X = 0;
e6projA_Y = 0;
e6projA_frame = 0;
e6projA_dir = 0;
e6invBlink = 255;
e6knockbackTimer = 0;
e6hitTimer = 0;
e6Attack = 0;
e6armor = 0;
e6armorRed = 0;
e6FreezeColor = 0;
e6FreezeCT = 0;
e6smokeCT = 0;
e6smokeFrame = 0;
e6coinValue = 0;
e6coinCT = 0;
e6coinFrame = 0;
e6coinType = 0;
e6FireVul = 0;
e6BoltVul = 0;
e6AcidVul = 0;
e6altAnimCT = 0;
e7HP = 0;
e7arm = 0;
e7CT = 0;
e7Y_CT = 0;
e7timer = 0;
e7invTimer = 0;
e7X = 0;
e7Y = 0;
e7Yvel = 0;
e7R = 0;
e7G = 0;
e7Opacity = 255;
e7frame = 0;
e7act = 0;
e7facing = 0;
e7projA_X = 0;
e7projA_Y = 0;
e7projA_frame = 0;
e7projA_dir = 0;
e7invBlink = 255;
e7knockbackTimer = 0;
e7hitTimer = 0;
e7Attack = 0;
e7armor = 0;
e7armorRed = 0;
e7FreezeColor = 0;
e7FreezeCT = 0;
e7smokeCT = 0;
e7smokeFrame = 0;
e7coinValue = 0;
e7coinCT = 0;
e7coinFrame = 0;
e7coinType = 0;
e7FireVul = 0;
e7BoltVul = 0;
e7AcidVul = 0;
e7altAnimCT = 0;
e8HP = 0;
e8arm = 0;
e8CT = 0;
e8Y_CT = 0;
e8timer = 0;
e8invTimer = 0;
e8X = 0;
e8Y = 0;
e8Yvel = 0;
e8R = 0;
e8G = 0;
e8Opacity = 255;
e8frame = 0;
e8act = 0;
e8facing = 0;
e8projA_X = 0;
e8projA_Y = 0;
e8projA_frame = 0;
e8projA_dir = 0;
e8invBlink = 255;
e8knockbackTimer = 0;
e8hitTimer = 0;
e8Attack = 0;
e8armor = 0;
e8armorRed = 0;
e8FreezeColor = 0;
e8FreezeCT = 0;
e8smokeCT = 0;
e8smokeFrame = 0;
e8coinValue = 0;
e8coinCT = 0;
e8coinFrame = 0;
e8coinType = 0;
e8FireVul = 0;
e8BoltVul = 0;
e8AcidVul = 0;
e8altAnimCT = 0;
e9HP = 0;
e9arm = 0;
e9CT = 0;
e9Y_CT = 0;
e9timer = 0;
e9invTimer = 0;
e9X = 0;
e9Y = 0;
e9Yvel = 0;
e9R = 0;
e9G = 0;
e9Opacity = 255;
e9frame = 0;
e9act = 0;
e9facing = 0;
e9projA_X = 0;
e9projA_Y = 0;
e9projA_frame = 0;
e9projA_dir = 0;
e9invBlink = 255;
e9knockbackTimer = 0;
e9hitTimer = 0;
e9Attack = 0;
e9armor = 0;
e9armorRed = 0;
e9FreezeColor = 0;
e9FreezeCT = 0;
e9smokeCT = 0;
e9smokeFrame = 0;
e9coinValue = 0;
e9coinCT = 0;
e9coinFrame = 0;
e9coinType = 0;
e9FireVul = 0;
e9BoltVul = 0;
e9AcidVul = 0;
e9altAnimCT = 0;
e10HP = 0;
e10arm = 0;
e10CT = 0;
e10Y_CT = 0;
e10timer = 0;
e10invTimer = 0;
e10X = 0;
e10Y = 0;
e10Yvel = 0;
e10R = 0;
e10G = 0;
e10Opacity = 255;
e10frame = 0;
e10act = 0;
e10facing = 0;
e10projA_X = 0;
e10projA_Y = 0;
e10projA_frame = 0;
e10projA_dir = 0;
e10invBlink = 255;
e10knockbackTimer = 0;
e10hitTimer = 0;
e10Attack = 0;
e10armor = 0;
e10armorRed = 0;
e10FreezeColor = 0;
e10FreezeCT = 0;
e10smokeCT = 0;
e10smokeFrame = 0;
e10coinValue = 0;
e10coinCT = 0;
e10coinFrame = 0;
e10coinType = 0;
e10FireVul = 0;
e10BoltVul = 0;
e10AcidVul = 0;
e10altAnimCT = 0;
touchLe1 = false;
touchRe1 = false;
touchLe2 = false;
touchRe2 = false;
touchLe3 = false;
touchRe3 = false;
touchLe4 = false;
touchRe4 = false;
touchLe5 = false;
touchRe5 = false;
touchLe6 = false;
touchRe6 = false;
touchLe7 = false;
touchRe7 = false;
touchLe8 = false;
touchRe8 = false;
touchLe9 = false;
touchRe9 = false;
touchLe10 = false;
touchRe10 = false;
touchLe11 = false;
touchRe11 = false;
touchLe12 = false;
touchRe12 = false;
touchLe13 = false;
touchRe13 = false;
touchLe14 = false;
touchRe14 = false;
touchLe15 = false;
touchRe15 = false;
touchLe16 = false;
touchRe16 = false;
touchLe17 = false;
touchRe17 = false;
touchLe18 = false;
touchRe18 = false;
touchLe19 = false;
touchRe19 = false;
touchLe20 = false;
touchRe20 = false;
e1stand = false;
e2stand = false;
e3stand = false;
e4stand = false;
e5stand = false;
e6stand = false;
e7stand = false;
e8stand = false;
e9stand = false;
e10stand = false;
e11stand = false;
e12stand = false;
e13stand = false;
e14stand = false;
e15stand = false;
e16stand = false;
e17stand = false;
e18stand = false;
e19stand = false;
e20stand = false;
e1FrameHalf = 1;
e2FrameHalf = 1;
e3FrameHalf = 1;
e4FrameHalf = 1;
e5FrameHalf = 1;
e6FrameHalf = 1;
e7FrameHalf = 1;
e8FrameHalf = 1;
e9FrameHalf = 1;
e10FrameHalf = 1;
e1spawn = false;
e1frozen = false;
e1shoot = false;
e1invulnerable = false;
e1faceR = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallR = false;
e1touchWallL = false;
e1breathhit = false;
e1clawhit = false;
e1hit = false;
e1peaceful = false;
e1frRes = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1coinTouch = false;
e1BurnVul = false;
e1ShockVul = false;
e1altAnim = false;
e2spawn = false;
e2frozen = false;
e2shoot = false;
e2invulnerable = false;
e2faceR = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallR = false;
e2touchWallL = false;
e2breathhit = false;
e2clawhit = false;
e2hit = false;
e2peaceful = false;
e2frRes = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2coinTouch = false;
e2BurnVul = false;
e2ShockVul = false;
e2altAnim = false;
e3spawn = false;
e3frozen = false;
e3shoot = false;
e3invulnerable = false;
e3faceR = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallR = false;
e3touchWallL = false;
e3breathhit = false;
e3clawhit = false;
e3hit = false;
e3peaceful = false;
e3frRes = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3coinTouch = false;
e3BurnVul = false;
e3ShockVul = false;
e3altAnim = false;
e4spawn = false;
e4frozen = false;
e4shoot = false;
e4invulnerable = false;
e4faceR = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallR = false;
e4touchWallL = false;
e4breathhit = false;
e4clawhit = false;
e4hit = false;
e4peaceful = false;
e4frRes = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4coinTouch = false;
e4BurnVul = false;
e4ShockVul = false;
e4altAnim = false;
e5spawn = false;
e5frozen = false;
e5shoot = false;
e5invulnerable = false;
e5faceR = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallR = false;
e5touchWallL = false;
e5breathhit = false;
e5clawhit = false;
e5hit = false;
e5peaceful = false;
e5frRes = false;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5coinTouch = false;
e5BurnVul = false;
e5ShockVul = false;
e5altAnim = false;
e6spawn = false;
e6frozen = false;
e6shoot = false;
e6invulnerable = false;
e6faceR = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallR = false;
e6touchWallL = false;
e6breathhit = false;
e6clawhit = false;
e6hit = false;
e6peaceful = false;
e6frRes = false;
e6peaceRes = false;
e6coins = false;
e6smoke = false;
e6coinTouch = false;
e6BurnVul = false;
e6ShockVul = false;
e6altAnim = false;
e7spawn = false;
e7frozen = false;
e7shoot = false;
e7invulnerable = false;
e7faceR = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallR = false;
e7touchWallL = false;
e7breathhit = false;
e7clawhit = false;
e7hit = false;
e7peaceful = false;
e7frRes = false;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7coinTouch = false;
e7BurnVul = false;
e7ShockVul = false;
e7altAnim = false;
e8spawn = false;
e8frozen = false;
e8shoot = false;
e8invulnerable = false;
e8faceR = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallR = false;
e8touchWallL = false;
e8breathhit = false;
e8clawhit = false;
e8hit = false;
e8peaceful = false;
e8frRes = false;
e8peaceRes = false;
e8coins = false;
e8smoke = false;
e8coinTouch = false;
e8BurnVul = false;
e8ShockVul = false;
e8altAnim = false;
e9spawn = false;
e9frozen = false;
e9shoot = false;
e9invulnerable = false;
e9faceR = false;
e9knockback = false;
e9knockbackRes = false;
e9onGround = true;
e9proximity = false;
e9touchWallR = false;
e9touchWallL = false;
e9breathhit = false;
e9clawhit = false;
e9hit = false;
e9peaceful = false;
e9frRes = false;
e9peaceRes = false;
e9coins = false;
e9smoke = false;
e9coinTouch = false;
e9BurnVul = false;
e9ShockVul = false;
e9altAnim = false;
e10spawn = false;
e10frozen = false;
e10shoot = false;
e10invulnerable = false;
e10faceR = false;
e10knockback = false;
e10knockbackRes = false;
e10onGround = true;
e10proximity = false;
e10touchWallR = false;
e10touchWallL = false;
e10breathhit = false;
e10clawhit = false;
e10hit = false;
e10peaceful = false;
e10frRes = false;
e10peaceRes = false;
e10coins = false;
e10smoke = false;
e10coinTouch = false;
e10BurnVul = false;
e10ShockVul = false;
e10altAnim = false;
e1projectile = false;
e2projectile = false;
e3projectile = false;
e4projectile = false;
e5projectile = false;
e6projectile = false;
e7projectile = false;
e8projectile = false;
e9projectile = false;
e10projectile = false;
e1projRef = false;
e2projRef = false;
e3projRef = false;
e4projRef = false;
e5projRef = false;
e6projRef = false;
e7projRef = false;
e8projRef = false;
e9projRef = false;
e10projRef = false;
e1projRefY = false;
e2projRefY = false;
e3projRefY = false;
e4projRefY = false;
e5projRefY = false;
e6projRefY = false;
e7projRefY = false;
e8projRefY = false;
e9projRefY = false;
e10projRefY = false;
e1burn = false;
e2burn = false;
e3burn = false;
e4burn = false;
e5burn = false;
e6burn = false;
e7burn = false;
e8burn = false;
e9burn = false;
e10burn = false;
e1shock = false;
e2shock = false;
e3shock = false;
e4shock = false;
e5shock = false;
e6shock = false;
e7shock = false;
e8shock = false;
e9shock = false;
e10shock = false;
e1burnTimer = 0;
e2burnTimer = 0;
e3burnTimer = 0;
e4burnTimer = 0;
e5burnTimer = 0;
e6burnTimer = 0;
e7burnTimer = 0;
e8burnTimer = 0;
e9burnTimer = 0;
e10burnTimer = 0;
e1burnCT = 0;
e2burnCT = 0;
e3burnCT = 0;
e4burnCT = 0;
e5burnCT = 0;
e6burnCT = 0;
e7burnCT = 0;
e8burnCT = 0;
e9burnCT = 0;
e10burnCT = 0;
e1burnFrame = 0;
e2burnFrame = 0;
e3burnFrame = 0;
e4burnFrame = 0;
e5burnFrame = 0;
e6burnFrame = 0;
e7burnFrame = 0;
e8burnFrame = 0;
e9burnFrame = 0;
e10burnFrame = 0;
e1shockTimer = 0;
e2shockTimer = 0;
e3shockTimer = 0;
e4shockTimer = 0;
e5shockTimer = 0;
e6shockTimer = 0;
e7shockTimer = 0;
e8shockTimer = 0;
e9shockTimer = 0;
e10shockTimer = 0;
e1shockCT = 0;
e2shockCT = 0;
e3shockCT = 0;
e4shockCT = 0;
e5shockCT = 0;
e6shockCT = 0;
e7shockCT = 0;
e8shockCT = 0;
e9shockCT = 0;
e10shockCT = 0;
e1shockFrame = 0;
e2shockFrame = 0;
e3shockFrame = 0;
e4shockFrame = 0;
e5shockFrame = 0;
e6shockFrame = 0;
e7shockFrame = 0;
e8shockFrame = 0;
e9shockFrame = 0;
e10shockFrame = 0;
e1projWidth = 0;
e1projHeight = 0;
e2projWidth = 0;
e2projHeight = 0;
e3projWidth = 0;
e3projHeight = 0;
e4projWidth = 0;
e4projHeight = 0;
e5projWidth = 0;
e5projHeight = 0;
e6projWidth = 0;
e6projHeight = 0;
e7projWidth = 0;
e7projHeight = 0;
e8projWidth = 0;
e8projHeight = 0;
e9projWidth = 0;
e9projHeight = 0;
e10projWidth = 0;
e10projHeight = 0;
e1projOrigX = 0;
e1projOrigY = 0;
e2projOrigX = 0;
e2projOrigY = 0;
e3projOrigX = 0;
e3projOrigY = 0;
e4projOrigX = 0;
e4projOrigY = 0;
e5projOrigX = 0;
e5projOrigY = 0;
e6projOrigX = 0;
e6projOrigY = 0;
e7projOrigX = 0;
e7projOrigY = 0;
e8projOrigX = 0;
e8projOrigY = 0;
e9projOrigX = 0;
e9projOrigY = 0;
e10projOrigX = 0;
e10projOrigY = 0;
e1projCT = 0;
e2projCT = 0;
e3projCT = 0;
e4projCT = 0;
e5projCT = 0;
e6projCT = 0;
e7projCT = 0;
e8projCT = 0;
e9projCT = 0;
e10projCT = 0;
e11projCT = 0;
e12projCT = 0;
e13projCT = 0;
e14projCT = 0;
e15projCT = 0;
e16projCT = 0;
e17projCT = 0;
e18projCT = 0;
e19projCT = 0;
e20projCT = 0;
e21projCT = 0;
e22projCT = 0;
e23projCT = 0;
e24projCT = 0;
e25projCT = 0;
e26projCT = 0;
e27projCT = 0;
e28projCT = 0;
e29projCT = 0;
e30projCT = 0;
e1HP = 0; //enemy 1 HP
e11arm = 0; //enemy 1 armor
e11CT = 0; //enemy 1 frame counter
e11Y_CT = 0; //enemy 1 velocity timer
e11timer = 0; //enemy 1 action timer
e11invTimer = 0; //enemy 1 invincibility timer
e11X = 0; //enemy 1 X-pos
e11Y = 0; //enemy 1 Y-pos
e11Yvel = 0; //enemy 1 Y-velocity
e11R = 0; //enemy 1 -R value
e11G = 0; //enemy 1 -G value
e11Opacity = 255; //enemy 1 opacity
e11frame = 0; //determines frame of animation for enemy 1
e11act = 0; //determines type of animation (move, wait,
attack, etc.)
e11facing = 0; //determines direction enemy 1 is facing
e11projA_X = 0; //determines enemy 1's projectile A X-pos
e11projA_Y = 0; //determines enemy 1's projectile A Y-pos
e11projA_frame = 0; //determines e1 projectile A frame of
animation
e11projA_dir = 0; //determines e1 projectile A orientation
e11invBlink = 255; //makes e1 blink when invulnerable
e11knockbackTimer = 0;
e11hitTimer = 0;
e11Attack = 0;
e11armor = 0;
e11armorRed = 0;
e11FreezeColor = 0;
e11FreezeCT = 0;
e11smokeCT = 0;
e11smokeFrame = 0;
e11coinValue = 0;
e11coinCT = 0;
e11coinFrame = 0;
e11coinType = 0;
e11FireVul = 0;
e11BoltVul = 0;
e11AcidVul = 0;
e11altAnimCT = 0;
e12HP = 0;
e12arm = 0;
e12CT = 0;
e12Y_CT = 0;
e12timer = 0;
e12invTimer = 0;
e12X = 0;
e12Y = 0;
e12Yvel = 0;
e12R = 0;
e12G = 0;
e12Opacity = 255;
e12frame = 0;
e12act = 0;
e12facing = 0;
e12projA_X = 0;
e12projA_Y = 0;
e12projA_frame = 0;
e12projA_dir = 0;
e12invBlink = 255;
e12knockbackTimer = 0;
e12hitTimer = 0;
e12Attack = 0;
e12armor = 0;
e12armorRed = 0;
e12FreezeColor = 0;
e12FreezeCT = 0;
e12smokeCT = 0;
e12smokeFrame = 0;
e12coinValue = 0;
e12coinCT = 0;
e12coinFrame = 0;
e12coinType = 0;
e12FireVul = 0;
e12BoltVul = 0;
e12AcidVul = 0;
e12altAnimCT = 0;
e13HP = 0;
e13arm = 0;
e13CT = 0;
e13Y_CT = 0;
e13timer = 0;
e13invTimer = 0;
e13X = 0;
e13Y = 0;
e13Yvel = 0;
e13R = 0;
e13G = 0;
e13Opacity = 255;
e13frame = 0;
e13act = 0;
e13facing = 0;
e13projA_X = 0;
e13projA_Y = 0;
e13projA_frame = 0;
e13projA_dir = 0;
e13invBlink = 255;
e13knockbackTimer = 0;
e13hitTimer = 0;
e13Attack = 0;
e13armor = 0;
e13armorRed = 0;
e13FreezeColor = 0;
e13FreezeCT = 0;
e13smokeCT = 0;
e13smokeFrame = 0;
e13coinValue = 0;
e13coinCT = 0;
e13coinFrame = 0;
e13coinType = 0;
e13FireVul = 0;
e13BoltVul = 0;
e13AcidVul = 0;
e13altAnimCT = 0;
e14HP = 0;
e14arm = 0;
e14CT = 0;
e14Y_CT = 0;
e14timer = 0;
e14invTimer = 0;
e14X = 0;
e14Y = 0;
e14Yvel = 0;
e14R = 0;
e14G = 0;
e14Opacity = 255;
e14frame = 0;
e14act = 0;
e14facing = 0;
e14projA_X = 0;
e14projA_Y = 0;
e14projA_frame = 0;
e14projA_dir = 0;
e14invBlink = 255;
e14knockbackTimer = 0;
e14hitTimer = 0;
e14Attack = 0;
e14armor = 0;
e14armorRed = 0;
e14FreezeColor = 0;
e14FreezeCT = 0;
e14smokeCT = 0;
e14smokeFrame = 0;
e14coinValue = 0;
e14coinCT = 0;
e14coinFrame = 0;
e14coinType = 0;
e14FireVul = 0;
e14BoltVul = 0;
e14AcidVul = 0;
e14altAnimCT = 0;
e15HP = 0;
e15arm = 0;
e15CT = 0;
e15Y_CT = 0;
e15timer = 0;
e15invTimer = 0;
e15X = 0;
e15Y = 0;
e15Yvel = 0;
e15R = 0;
e15G = 0;
e15Opacity = 255;
e15frame = 0;
e15act = 0;
e15facing = 0;
e15projA_X = 0;
e15projA_Y = 0;
e15projA_frame = 0;
e15projA_dir = 0;
e15invBlink = 255;
e15knockbackTimer = 0;
e15hitTimer = 0;
e15Attack = 0;
e15armor = 0;
e15armorRed = 0;
e15FreezeColor = 0;
e15FreezeCT = 0;
e15smokeCT = 0;
e15smokeFrame = 0;
e15coinValue = 0;
e15coinCT = 0;
e15coinFrame = 0;
e15coinType = 0;
e15FireVul = 0;
e15BoltVul = 0;
e15AcidVul = 0;
e15altAnimCT = 0;
e16HP = 0;
e16arm = 0;
e16CT = 0;
e16Y_CT = 0;
e16timer = 0;
e16invTimer = 0;
e16X = 0;
e16Y = 0;
e16Yvel = 0;
e16R = 0;
e16G = 0;
e16Opacity = 255;
e16frame = 0;
e16act = 0;
e16facing = 0;
e16projA_X = 0;
e16projA_Y = 0;
e16projA_frame = 0;
e16projA_dir = 0;
e16invBlink = 255;
e16knockbackTimer = 0;
e16hitTimer = 0;
e16Attack = 0;
e16armor = 0;
e16armorRed = 0;
e16FreezeColor = 0;
e16FreezeCT = 0;
e16smokeCT = 0;
e16smokeFrame = 0;
e16coinValue = 0;
e16coinCT = 0;
e16coinFrame = 0;
e16coinType = 0;
e16FireVul = 0;
e16BoltVul = 0;
e16AcidVul = 0;
e16altAnimCT = 0;
e17HP = 0;
e17arm = 0;
e17CT = 0;
e17Y_CT = 0;
e17timer = 0;
e17invTimer = 0;
e17X = 0;
e17Y = 0;
e17Yvel = 0;
e17R = 0;
e17G = 0;
e17Opacity = 255;
e17frame = 0;
e17act = 0;
e17facing = 0;
e17projA_X = 0;
e17projA_Y = 0;
e17projA_frame = 0;
e17projA_dir = 0;
e17invBlink = 255;
e17knockbackTimer = 0;
e17hitTimer = 0;
e17Attack = 0;
e17armor = 0;
e17armorRed = 0;
e17FreezeColor = 0;
e17FreezeCT = 0;
e17smokeCT = 0;
e17smokeFrame = 0;
e17coinValue = 0;
e17coinCT = 0;
e17coinFrame = 0;
e17coinType = 0;
e17FireVul = 0;
e17BoltVul = 0;
e17AcidVul = 0;
e17altAnimCT = 0;
e18HP = 0;
e18arm = 0;
e18CT = 0;
e18Y_CT = 0;
e18timer = 0;
e18invTimer = 0;
e18X = 0;
e18Y = 0;
e18Yvel = 0;
e18R = 0;
e18G = 0;
e18Opacity = 255;
e18frame = 0;
e18act = 0;
e18facing = 0;
e18projA_X = 0;
e18projA_Y = 0;
e18projA_frame = 0;
e18projA_dir = 0;
e18invBlink = 255;
e18knockbackTimer = 0;
e18hitTimer = 0;
e18Attack = 0;
e18armor = 0;
e18armorRed = 0;
e18FreezeColor = 0;
e18FreezeCT = 0;
e18smokeCT = 0;
e18smokeFrame = 0;
e18coinValue = 0;
e18coinCT = 0;
e18coinFrame = 0;
e18coinType = 0;
e18FireVul = 0;
e18BoltVul = 0;
e18AcidVul = 0;
e18altAnimCT = 0;
e19HP = 0;
e19arm = 0;
e19CT = 0;
e19Y_CT = 0;
e19timer = 0;
e19invTimer = 0;
e19X = 0;
e19Y = 0;
e19Yvel = 0;
e19R = 0;
e19G = 0;
e19Opacity = 255;
e19frame = 0;
e19act = 0;
e19facing = 0;
e19projA_X = 0;
e19projA_Y = 0;
e19projA_frame = 0;
e19projA_dir = 0;
e19invBlink = 255;
e19knockbackTimer = 0;
e19hitTimer = 0;
e19Attack = 0;
e19armor = 0;
e19armorRed = 0;
e19FreezeColor = 0;
e19FreezeCT = 0;
e19smokeCT = 0;
e19smokeFrame = 0;
e19coinValue = 0;
e19coinCT = 0;
e19coinFrame = 0;
e19coinType = 0;
e19FireVul = 0;
e19BoltVul = 0;
e19AcidVul = 0;
e19altAnimCT = 0;
e20HP = 0;
e20arm = 0;
e20CT = 0;
e20Y_CT = 0;
e20timer = 0;
e20invTimer = 0;
e20X = 0;
e20Y = 0;
e20Yvel = 0;
e20R = 0;
e20G = 0;
e20Opacity = 255;
e20frame = 0;
e20act = 0;
e20facing = 0;
e20projA_X = 0;
e20projA_Y = 0;
e20projA_frame = 0;
e20projA_dir = 0;
e20invBlink = 255;
e20knockbackTimer = 0;
e20hitTimer = 0;
e20Attack = 0;
e20armor = 0;
e20armorRed = 0;
e20FreezeColor = 0;
e20FreezeCT = 0;
e20smokeCT = 0;
e20smokeFrame = 0;
e20coinValue = 0;
e20coinCT = 0;
e20coinFrame = 0;
e20coinType = 0;
e20FireVul = 0;
e20BoltVul = 0;
e20AcidVul = 0;
e20altAnimCT = 0;
touchLe1 = false;
touchRe1 = false;
touchLe2 = false;
touchRe2 = false;
touchLe3 = false;
touchRe3 = false;
touchLe4 = false;
touchRe4 = false;
touchLe5 = false;
touchRe5 = false;
touchLe6 = false;
touchRe6 = false;
touchLe7 = false;
touchRe7 = false;
touchLe8 = false;
touchRe8 = false;
touchLe9 = false;
touchRe9 = false;
touchLe10 = false;
touchRe10 = false;
touchLe11 = false;
touchRe11 = false;
touchLe12 = false;
touchRe12 = false;
touchLe13 = false;
touchRe13 = false;
touchLe14 = false;
touchRe14 = false;
touchLe15 = false;
touchRe15 = false;
touchLe16 = false;
touchRe16 = false;
touchLe17 = false;
touchRe17 = false;
touchLe18 = false;
touchRe18 = false;
touchLe19 = false;
touchRe19 = false;
touchLe20 = false;
touchRe20 = false;
e11FrameHalf = 1;
e12FrameHalf = 1;
e13FrameHalf = 1;
e14FrameHalf = 1;
e15FrameHalf = 1;
e16FrameHalf = 1;
e17FrameHalf = 1;
e18FrameHalf = 1;
e19FrameHalf = 1;
e20FrameHalf = 1;
e11spawn = false;
e11frozen = false;
e11shoot = false;
e11invulnerable = false;
e11faceR = false;
e11knockback = false;
e11knockbackRes = false;
e11onGround = true;
e11proximity = false;
e11touchWallR = false;
e11touchWallL = false;
e11breathhit = false;
e11clawhit = false;
e11hit = false;
e11peaceful = false;
e11frRes = false;
e11peaceRes = false;
e11coins = false;
e11smoke = false;
e11coinTouch = false;
e11BurnVul = false;
e11ShockVul = false;
e11altAnim = false;
e12spawn = false;
e12frozen = false;
e12shoot = false;
e12invulnerable = false;
e12faceR = false;
e12knockback = false;
e12knockbackRes = false;
e12onGround = true;
e12proximity = false;
e12touchWallR = false;
e12touchWallL = false;
e12breathhit = false;
e12clawhit = false;
e12hit = false;
e12peaceful = false;
e12frRes = false;
e12peaceRes = false;
e12coins = false;
e12smoke = false;
e12coinTouch = false;
e12BurnVul = false;
e12ShockVul = false;
e12altAnim = false;
e13spawn = false;
e13frozen = false;
e13shoot = false;
e13invulnerable = false;
e13faceR = false;
e13knockback = false;
e13knockbackRes = false;
e13onGround = true;
e13proximity = false;
e13touchWallR = false;
e13touchWallL = false;
e13breathhit = false;
e13clawhit = false;
e13hit = false;
e13peaceful = false;
e13frRes = false;
e13peaceRes = false;
e13coins = false;
e13smoke = false;
e13coinTouch = false;
e13BurnVul = false;
e13ShockVul = false;
e13altAnim = false;
e14spawn = false;
e14frozen = false;
e14shoot = false;
e14invulnerable = false;
e14faceR = false;
e14knockback = false;
e14knockbackRes = false;
e14onGround = true;
e14proximity = false;
e14touchWallR = false;
e14touchWallL = false;
e14breathhit = false;
e14clawhit = false;
e14hit = false;
e14peaceful = false;
e14frRes = false;
e14peaceRes = false;
e14coins = false;
e14smoke = false;
e14coinTouch = false;
e14BurnVul = false;
e14ShockVul = false;
e14altAnim = false;
e15spawn = false;
e15frozen = false;
e15shoot = false;
e15invulnerable = false;
e15faceR = false;
e15knockback = false;
e15knockbackRes = false;
e15onGround = true;
e15proximity = false;
e15touchWallR = false;
e15touchWallL = false;
e15breathhit = false;
e15clawhit = false;
e15hit = false;
e15peaceful = false;
e15frRes = false;
e15peaceRes = false;
e15coins = false;
e15smoke = false;
e15coinTouch = false;
e15BurnVul = false;
e15ShockVul = false;
e15altAnim = false;
e16spawn = false;
e16frozen = false;
e16shoot = false;
e16invulnerable = false;
e16faceR = false;
e16knockback = false;
e16knockbackRes = false;
e16onGround = true;
e16proximity = false;
e16touchWallR = false;
e16touchWallL = false;
e16breathhit = false;
e16clawhit = false;
e16hit = false;
e16peaceful = false;
e16frRes = false;
e16peaceRes = false;
e16coins = false;
e16smoke = false;
e16coinTouch = false;
e16BurnVul = false;
e16ShockVul = false;
e16altAnim = false;
e17spawn = false;
e17frozen = false;
e17shoot = false;
e17invulnerable = false;
e17faceR = false;
e17knockback = false;
e17knockbackRes = false;
e17onGround = true;
e17proximity = false;
e17touchWallR = false;
e17touchWallL = false;
e17breathhit = false;
e17clawhit = false;
e17hit = false;
e17peaceful = false;
e17frRes = false;
e17peaceRes = false;
e17coins = false;
e17smoke = false;
e17coinTouch = false;
e17BurnVul = false;
e17ShockVul = false;
e17altAnim = false;
e18spawn = false;
e18frozen = false;
e18shoot = false;
e18invulnerable = false;
e18faceR = false;
e18knockback = false;
e18knockbackRes = false;
e18onGround = true;
e18proximity = false;
e18touchWallR = false;
e18touchWallL = false;
e18breathhit = false;
e18clawhit = false;
e18hit = false;
e18peaceful = false;
e18frRes = false;
e18peaceRes = false;
e18coins = false;
e18smoke = false;
e18coinTouch = false;
e18BurnVul = false;
e18ShockVul = false;
e18altAnim = false;
e19spawn = false;
e19frozen = false;
e19shoot = false;
e19invulnerable = false;
e19faceR = false;
e19knockback = false;
e19knockbackRes = false;
e19onGround = true;
e19proximity = false;
e19touchWallR = false;
e19touchWallL = false;
e19breathhit = false;
e19clawhit = false;
e19hit = false;
e19peaceful = false;
e19frRes = false;
e19peaceRes = false;
e19coins = false;
e19smoke = false;
e19coinTouch = false;
e19BurnVul = false;
e19ShockVul = false;
e19altAnim = false;
e20spawn = false;
e20frozen = false;
e20shoot = false;
e20invulnerable = false;
e20faceR = false;
e20knockback = false;
e20knockbackRes = false;
e20onGround = true;
e20proximity = false;
e20touchWallR = false;
e20touchWallL = false;
e20breathhit = false;
e20clawhit = false;
e20hit = false;
e20peaceful = false;
e20frRes = false;
e20peaceRes = false;
e20coins = false;
e20smoke = false;
e20coinTouch = false;
e20BurnVul = false;
e20ShockVul = false;
e20altAnim = false;
e11projectile = false;
e12projectile = false;
e13projectile = false;
e14projectile = false;
e15projectile = false;
e16projectile = false;
e17projectile = false;
e18projectile = false;
e19projectile = false;
e20projectile = false;
e11projRef = false;
e12projRef = false;
e13projRef = false;
e14projRef = false;
e15projRef = false;
e16projRef = false;
e17projRef = false;
e18projRef = false;
e19projRef = false;
e20projRef = false;
e11projRefY = false;
e12projRefY = false;
e13projRefY = false;
e14projRefY = false;
e15projRefY = false;
e16projRefY = false;
e17projRefY = false;
e18projRefY = false;
e19projRefY = false;
e20projRefY = false;
e11burn = false;
e12burn = false;
e13burn = false;
e14burn = false;
e15burn = false;
e16burn = false;
e17burn = false;
e18burn = false;
e19burn = false;
e20burn = false;
e11shock = false;
e12shock = false;
e13shock = false;
e14shock = false;
e15shock = false;
e16shock = false;
e17shock = false;
e18shock = false;
e19shock = false;
e20shock = false;
e11burnTimer = 0;
e12burnTimer = 0;
e13burnTimer = 0;
e14burnTimer = 0;
e15burnTimer = 0;
e16burnTimer = 0;
e17burnTimer = 0;
e18burnTimer = 0;
e19burnTimer = 0;
e20burnTimer = 0;
e11burnCT = 0;
e12burnCT = 0;
e13burnCT = 0;
e14burnCT = 0;
e15burnCT = 0;
e16burnCT = 0;
e17burnCT = 0;
e18burnCT = 0;
e19burnCT = 0;
e20burnCT = 0;
e11burnFrame = 0;
e12burnFrame = 0;
e13burnFrame = 0;
e14burnFrame = 0;
e15burnFrame = 0;
e16burnFrame = 0;
e17burnFrame = 0;
e18burnFrame = 0;
e19burnFrame = 0;
e20burnFrame = 0;
e11shockTimer = 0;
e12shockTimer = 0;
e13shockTimer = 0;
e14shockTimer = 0;
e15shockTimer = 0;
e16shockTimer = 0;
e17shockTimer = 0;
e18shockTimer = 0;
e19shockTimer = 0;
e20shockTimer = 0;
e11shockCT = 0;
e12shockCT = 0;
e13shockCT = 0;
e14shockCT = 0;
e15shockCT = 0;
e16shockCT = 0;
e17shockCT = 0;
e18shockCT = 0;
e19shockCT = 0;
e20shockCT = 0;
e11shockFrame = 0;
e12shockFrame = 0;
e13shockFrame = 0;
e14shockFrame = 0;
e15shockFrame = 0;
e16shockFrame = 0;
e17shockFrame = 0;
e18shockFrame = 0;
e19shockFrame = 0;
e20shockFrame = 0;
e11projWidth = 0;
e11projHeight = 0;
e12projWidth = 0;
e12projHeight = 0;
e13projWidth = 0;
e13projHeight = 0;
e14projWidth = 0;
e14projHeight = 0;
e15projWidth = 0;
e15projHeight = 0;
e16projWidth = 0;
e16projHeight = 0;
e17projWidth = 0;
e17projHeight = 0;
e18projWidth = 0;
e18projHeight = 0;
e19projWidth = 0;
e19projHeight = 0;
e20projWidth = 0;
e20projHeight = 0;
e11projOrigX = 0;
e11projOrigY = 0;
e12projOrigX = 0;
e12projOrigY = 0;
e13projOrigX = 0;
e13projOrigY = 0;
e14projOrigX = 0;
e14projOrigY = 0;
e15projOrigX = 0;
e15projOrigY = 0;
e16projOrigX = 0;
e16projOrigY = 0;
e17projOrigX = 0;
e17projOrigY = 0;
e18projOrigX = 0;
e18projOrigY = 0;
e19projOrigX = 0;
e19projOrigY = 0;
e20projOrigX = 0;
e20projOrigY = 0;
e11projCT = 0;
e12projCT = 0;
e13projCT = 0;
e14projCT = 0;
e15projCT = 0;
e16projCT = 0;
e17projCT = 0;
e18projCT = 0;
e19projCT = 0;
e20projCT = 0;
#endregion
#region sound reset
acid1 = false;
acid2 = false;
acid3 = false;
acid4 = false;
flame1 = false;
flame2 = false;
flame3 = false;
flame4 = false;
flame5 = false;
spin1 = false;
spin2 = false;
spin3 = false;
spin4 = false;
laser1 = false;
laser2 = false;
laser3 = false;
laser4 = false;
flameProx1 = false;
flameProx2 = false;
flameProx3 = false;
flameProx4 = false;
flameProx5 = false;
spinProx1 = false;
spinProx2 = false;
spinProx3 = false;
sprayProx1 = false;
sprayProx2 = false;
sprayProx3 = false;
laserProx1 = false;
laserProx2 = false;
laserProx3 = false;
laserProx4 = false;
#endregion
boss1invBlink = 255;
helpOpacity = 0;
helpCT = 0;
alexHitDelay = 0;
baldwinHitDelay = 0;
rootHitDelay = 0;
bodyHitDelay = 0;
redHitDelay = 0;
greenHitDelay = 0;
purpleHitDelay = 0;
headHitDelay = 0;
#region Boss 5 reset
boss5Phase1 = false;
boss5Phase2 = false;
boss5Transition = false;
kingAngry = false;
kingTantrum = false;
greenSmoke = false;
yellowSmoke = false;
redSmoke = false;
purpleSmoke = false;
e1Escape = false;
e1Dodge = false;
e1Throw = false;
e1ProjHit = false;
e2Escape = false;
e2Dodge = false;
e2Throw = false;
e2ProjHit = false;
e3Escape = false;
e3Dodge = false;
e3Throw = false;
e3ProjHit = false;
e3PillarOn = false;
e4Escape = false;
e4Dodge = false;
e4Throw = false;
e4ProjHit = false;
e4GasOn = false;
e1ScarecrowFrame = 0;
e1EscapeFrame = 0;
thunderCall1X = 0; thunderCall2X = 0; thunderCall3X = 0;
e2ScarecrowFrame = 0;
e2EscapeFrame = 0;
satlaser1X = 0; satlaser2X = 0; satlaser3X = 0;
e3ScarecrowFrame = 0;
e3EscapeFrame = 0;
e3attackTimer = 0;
e3projOrientation = 0;
spark1X = 0; spark1Y = 0; spark2X = 0; spark2Y = 0; spark3X
= 0; spark3Y = 0;
sparkvelX1 = 0; sparkvelX2 = 0; sparkvelX3 = 0;
pillar1X = 0; pillar2X = 0; pillar3X = 0;
e3projectileVel = 0;
e3YvelCT = 0;
pillarAct = 0;
pillarDuration = 0;
e4ScarecrowFrame = 0;
e4EscapeFrame = 0;
orb1X = 0; orb1Y = 0; orb2X = 0; orb2Y = 0; orb3X = 0; orb3Y
= 0;
orbVelX1 = 0; orbVelX2 = 0; orbVelX3 = 0;
gas1X = 0; gas2X = 0; gas3X = 0;
e4projectileVel = 0;
e4YvelCT = 0;
kingAct = 0;
kingFrame = 0;
crownX = 0;
crownY = 0;
#endregion
#region NPC Reset
npc1Act = 0;
npc1Frame = 0;
npc1CT = 0;
npc1VarAct = 0;
npc1Facing = 0;
npc1FaceR = false;
npc2Act = 0;
npc2Frame = 0;
npc2CT = 0;
npc2VarAct = 0;
npc2FaceR = false;
npc3Act = 0;
npc3Frame = 0;
npc3CT = 0;
npc3VarAct = 0;
npc3FaceR = false;
npc4Act = 0;
npc4Frame = 0;
npc4CT = 0;
npc4VarAct = 0;
npc4FaceR = false;
npc5Act = 0;
npc5Frame = 0;
npc5CT = 0;
npc5VarAct = 0;
npc6Act = 0;
npc6Frame = 0;
npc6CT = 0;
npc6VarAct = 0;
npc7Act = 0;
npc7Frame = 0;
npc7CT = 0;
npc7VarAct = 0;
npc8Act = 0;
npc8Frame = 0;
npc8CT = 0;
npc8VarAct = 0;
npc9Act = 0;
npc9Frame = 0;
npc9CT = 0;
npc9VarAct = 0;
niaOn = false;
squireOn = false;
bowOn = false;
heavyOn = false;
light1X = 0;
light2X = 0;
light3X = 0;
light4X = 0;
light1Frame = 0;
light2Frame = 0;
light3Frame = 0;
light4Frame = 0;
light1CT = 0;
light2CT = 0;
light3CT = 0;
light4CT = 0;
light1Act = 0;
light2Act = 0;
light3Act = 0;
light4Act = 0;
light1Wait = 0;
light2Wait = 0;
light3Wait = 0;
light4Wait = 0;
light1On = false;
light2On = false;
light3On = false;
light4On = false;
#endregion
//END RESET SETTINGS
}
#endregion
#region toActionStage == true
if (toActionStage == true)
{
worldBGM.Dispose();
worldBGM = new ContentManager(Services, "Content");
mapManager.Dispose();
mapManager = new ContentManager(Services, "Content");
drawWorldMap = new DrawWorldMap(false, null);
drawStory = new DrawStory(0, languageType, fontSetting,
null);
#region Always Perform
loadDragon = new LoadDragon(true, stageManager);
loadExplosion = new LoadExplosion(true, stageManager);
playFireSFX = new PlayFireSFX(1, breathSFX);
playThunderSFX = new PlayThunderSFX(1, breathSFX);
playIceSFX = new PlayIceSFX(1, breathSFX);
playAcidSFX = new PlayAcidSFX(1, breathSFX);
playMagicSFX = new PlayMagicSFX(1, breathSFX);
playWaterSFX = new PlayWaterSFX(1, breathSFX);
playWings = new PlayWings(1, breathSFX);
actionStagePause = false;
hovercraftExplosion = false;
cameraMinY = 0;
jumpWait = 0;
independentBackgroundXY = 0;
drgnSpikeDamage = false;
inMud = false;
spikeDamage = 0;
breathType = 0;
storyFGFrameX1 = 0;
storyFGFrameY1 = 0;
whiteMatte = false;
blackMatte = false;
defeatCT = 0;
drgnDashing = 1;
warpFrame = 0;
warpCT = 0;
titleScreen = false;
seenEvent1 = false;
seenEvent2 = false;
needRand = false;
haveRand = false;
runEvent = false;
waterfallKnockback = false;
xWhileJumping = false;
splashIn = false;
splashOut = false;
needSplashInLoc = false;
needSplashOutLoc = false;
splashOutLocX = 0;
splashInLocX = 0;
splashOutLocY = 0;
splashInLocY = 0;
splashInFrame = 0;
splashOutFrame = 0;
splashInCT = 0;
splashOutCT = 0;
waveFrame = 0;
acidFrame = 0;
waveCT = 0;
treasureWindowCT = 0;
treasureWindowFrame = 0;
treasureWindowX = -150;
treasureWindowUp = false;
treasureWindowDown = false;
whiteMatteOpacity = 0;
blackMatteOpacity = 0;
worldMap = false;
storybook = false;
story1 = false;
story1_2pre = false;
story1_Bpre = false;
story1_Bpost = false;
story2_2post = false;
story2_Bpre = false;
story2_Bpost = false;
story3_Bpre = false;
story3_Bpost = false;
story4_4post = false;
story4_Bpre = false;
story4_Bpost = false;
story5_Bpre = false;
story5_Bpost = false;
story6_1post = false;
story7_Bpre = false;
story7_Bmid = false;
duckStop = false;
runEvent = false;
dragonDash = false;
drgnOnGround = true;
drgnFlight = false;
drgnInvulnerable = false;
drgnKnockback = false;
drgnHit = false;
drgnAction = 0;
drgnInvTimer = 0;
drgnInvOpacity = 255;
drgnKnockbackTimer = 0;
drgnFrame = 0;
drgnDamageTaken = 0;
damageCheck = 0;
ducking = 1;
duckingYMod = 0;
if (clawSize >= 0)
{
clawhitboxsize = 60;
clawhitboxmod = 0;
}
else if (clawSize <= 1)
{
clawhitboxsize = 120;
clawhitboxmod = 60;
}
clawTimer = 0;
usingClaw = false;
drgnFire = true;
drgnFire = false;
drgnHPNow = drgnHPMax;
eventWait = 0;
eventXVel = 0;
eventYVel = 0;
drgnCamVel = 0;
note1CT = 0;
note2CT = 0;
note3CT = 0;
note4CT = 0;
puzzle1Opacity = 255;
puzzle2Opacity = 255;
puzzle3Opacity = 255;
puzzle4Opacity = 255;
puzzle5Opacity = 255;
puzzle6Opacity = 255;
puzzle7Opacity = 255;
#region Boat
boat1X = 0;
boat1Y = 0;
boat2X = 0;
boat2Y = 0;
boat1Vel = 0;
boat1VelCT = 0;
boat2Vel = 0;
boat2VelCT = 0;
boat1Left = false;
boat1Right = false;
boat2Left = false;
boat2Right = false;
boat1TouchL = false;
boat1TouchR = false;
boat2TouchL = false;
boat2TouchR = false;
onBoat1 = false;
onBoat2 = false;
#endregion
#endregion
#region toHome
if (toHome == true) //Home loadout
{
drgnUnderwater = false;
underwaterBreath = false;
playStageMusic = new PlayStageMusic(2, stageBGM);
houseVarAct = 0;
npc1Act = generateRandom.Next(0, 5);
drawHome = new DrawHome(true, stageManager, npc1Act);
drawSky = new DrawSky(1, stageManager);
cameraMinY = 49;
#region floor
floor1 = new Rectangle(0, 668, 1360, 70);
floor2 = new Rectangle(0, 700, 1360, 70);
floor3 = new Rectangle(590, 570, 140, 40);
#endregion
#region wall
wall1 = new Rectangle(283, 275, 7, 404); //wall box 1
wall2 = new Rectangle(815, 333, 106, 130); //wall box 2
wall3 = new Rectangle(720, 0, 10, 2000);
wall4 = new Rectangle(150, 0, 10, 2000);
#endregion
roof1 = new Rectangle(815, 470, 106, 10); //roof box 1
drgnDRTotal = drgnDRTreasure1 + drgnDRTreasure2 +
drgnDRBonus;
drgnClawTotal = clawDmg + clawDmgBonus +
clawDmgTreasure1 + clawDmgTreasure2 + clawLV;
drgnBreathTotal = breathDmg + breathDmgBonus +
breathDmgTreasure1 + breathDmgTreasure2 + breathLV;
#region set menu level values
printHPMax = 6 + drgnHPBonus + drgnHPLV +
drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean + boss3Clean +
boss4Clean + boss5Clean + questHPBonus;
#region HP
#region ten
if (printHPMax - 90 >= 0)
{
hpTen = 9;
}
else if (printHPMax - 80 >= 0)
{
hpTen = 8;
}
else if (printHPMax - 70 >= 0)
{
hpTen = 7;
}
else if (printHPMax - 60 >= 0)
{
hpTen = 6;
}
else if (printHPMax - 50 >= 0)
{
hpTen = 5;
}
else if (printHPMax - 40 >= 0)
{
hpTen = 4;
}
else if (printHPMax - 30 >= 0)
{
hpTen = 3;
}
else if (printHPMax - 20 >= 0)
{
hpTen = 2;
}
else if (printHPMax - 10 >= 0)
{
hpTen = 1;
}
else if (printHPMax - 10 < 0)
{
hpTen = 0;
}
#endregion
#region one
if ((printHPMax - ((hpTen * 10))) - 9 >= 0)
{
hpOne = 9;
}
else if ((printHPMax - ((hpTen * 10))) - 8 >= 0)
{
hpOne = 8;
}
else if ((printHPMax - ((hpTen * 10))) - 7 >= 0)
{
hpOne = 7;
}
else if ((printHPMax - ((hpTen * 10))) - 6 >= 0)
{
hpOne = 6;
}
else if ((printHPMax - ((hpTen * 10))) - 5 >= 0)
{
hpOne = 5;
}
else if ((printHPMax - ((hpTen * 10))) - 4 >= 0)
{
hpOne = 4;
}
else if ((printHPMax - ((hpTen * 10))) - 3 >= 0)
{
hpOne = 3;
}
else if ((printHPMax - ((hpTen * 10))) - 2 >= 0)
{
hpOne = 2;
}
else if ((printHPMax - ((hpTen * 10))) - 1 >= 0)
{
hpOne = 1;
}
else if ((printHPMax - ((hpTen * 10))) - 1 <= 0)
{
hpOne = 0;
}
#endregion
#endregion
#region Claw
#region ten
if (drgnClawTotal - 90 >= 0)
{
clawTen = 9;
}
else if (drgnClawTotal - 80 >= 0)
{
clawTen = 8;
}
else if (drgnClawTotal - 70 >= 0)
{
clawTen = 7;
}
else if (drgnClawTotal - 60 >= 0)
{
clawTen = 6;
}
else if (drgnClawTotal - 50 >= 0)
{
clawTen = 5;
}
else if (drgnClawTotal - 40 >= 0)
{
clawTen = 4;
}
else if (drgnClawTotal - 30 >= 0)
{
clawTen = 3;
}
else if (drgnClawTotal - 20 >= 0)
{
clawTen = 2;
}
else if (drgnClawTotal - 10 >= 0)
{
clawTen = 1;
}
else if (drgnClawTotal - 10 < 0)
{
clawTen = 0;
}
#endregion
#region one
if ((drgnClawTotal - ((clawTen * 10))) - 9 >= 0)
{
clawOne = 9;
}
else if ((drgnClawTotal - ((clawTen * 10))) - 8 >= 0)
{
clawOne = 8;
}
else if ((drgnClawTotal - ((clawTen * 10))) - 7 >= 0)
{
clawOne = 7;
}
else if ((drgnClawTotal - ((clawTen * 10))) - 6 >= 0)
{
clawOne = 6;
}
else if ((drgnClawTotal - ((clawTen * 10))) - 5 >= 0)
{
clawOne = 5;
}
else if ((drgnClawTotal - ((clawTen * 10))) - 4 >= 0)
{
clawOne = 4;
}
else if ((drgnClawTotal - ((clawTen * 10))) - 3 >= 0)
{
clawOne = 3;
}
else if ((drgnClawTotal - ((clawTen * 10))) - 2 >= 0)
{
clawOne = 2;
}
else if ((drgnClawTotal - ((clawTen * 10))) - 1 >= 0)
{
clawOne = 1;
}
else if ((drgnClawTotal - ((clawTen * 10))) - 1 <= 0)
{
clawOne = 0;
}
#endregion
#endregion
#region Breath
#region ten
if (drgnBreathTotal - 90 >= 0)
{
breathTen = 9;
}
else if (drgnBreathTotal - 80 >= 0)
{
breathTen = 8;
}
else if (drgnBreathTotal - 70 >= 0)
{
breathTen = 7;
}
else if (drgnBreathTotal - 60 >= 0)
{
breathTen = 6;
}
else if (drgnBreathTotal - 50 >= 0)
{
breathTen = 5;
}
else if (drgnBreathTotal - 40 >= 0)
{
breathTen = 4;
}
else if (drgnBreathTotal - 30 >= 0)
{
breathTen = 3;
}
else if (drgnBreathTotal - 20 >= 0)
{
breathTen = 2;
}
else if (drgnBreathTotal - 10 >= 0)
{
breathTen = 1;
}
else if (drgnBreathTotal - 10 < 0)
{
breathTen = 0;
}
#endregion
#region one
if ((drgnBreathTotal - ((breathTen * 10))) - 9 >= 0)
{
breathOne = 9;
}
else if ((drgnBreathTotal - ((breathTen * 10))) - 8 >=
0)
{
breathOne = 8;
}
else if ((drgnBreathTotal - ((breathTen * 10))) - 7 >=
0)
{
breathOne = 7;
}
else if ((drgnBreathTotal - ((breathTen * 10))) - 6 >=
0)
{
breathOne = 6;
}
else if ((drgnBreathTotal - ((breathTen * 10))) - 5 >=
0)
{
breathOne = 5;
}
else if ((drgnBreathTotal - ((breathTen * 10))) - 4 >=
0)
{
breathOne = 4;
}
else if ((drgnBreathTotal - ((breathTen * 10))) - 3 >=
0)
{
breathOne = 3;
}
else if ((drgnBreathTotal - ((breathTen * 10))) - 2 >=
0)
{
breathOne = 2;
}
else if ((drgnBreathTotal - ((breathTen * 10))) - 1 >=
0)
{
breathOne = 1;
}
else if ((drgnBreathTotal - ((breathTen * 10))) - 1 <=
0)
{
breathOne = 0;
}
#endregion
#endregion
#endregion
#region have treasure total
if (have01Hatchling == true)
{
haveTreasure1 = 1;
}
if (have02Smile == true)
{
haveTreasure2 = 1;
}
if (have03Crest == true)
{
haveTreasure3 = 1;
}
if (have04Underpants == true)
{
haveTreasure4 = 1;
}
if (have05Sollerets == true)
{
haveTreasure5 = 1;
}
if (have06Scepter == true)
{
haveTreasure6 = 1;
}
if (have07Momiji == true)
{
haveTreasure7 = 1;
}
if (have08Ninjato == true)
{
haveTreasure8 = 1;
}
if (have09Ring == true)
{
haveTreasure9 = 1;
}
if (have10Sunset == true)
{
haveTreasure10 = 1;
}
if (have11Dreihander == true)
{
haveTreasure11 = 1;
}
if (have12Endeavour == true)
{
haveTreasure12 = 1;
}
if (have13Doll == true)
{
haveTreasure13 = 1;
}
if (have14Liqueur == true)
{
haveTreasure14 = 1;
}
if (have15Penultima == true)
{
haveTreasure15 = 1;
}
if (have16Leaf == true)
{
haveTreasure16 = 1;
}
if (have17HTTYD == true)
{
haveTreasure17 = 1;
}
if (have18Gust == true)
{
haveTreasure18 = 1;
}
if (have19Shirt == true)
{
haveTreasure19 = 1;
}
if (have20Deduction == true)
{
haveTreasure20 = 1;
}
if (have21Topaz == true)
{
haveTreasure21 = 1;
}
if (have22Sapphire == true)
{
haveTreasure22 = 1;
}
if (have23Garnet == true)
{
haveTreasure23 = 1;
}
if (have24Ruby == true)
{
haveTreasure24 = 1;
}
if (have25Diamond == true)
{
haveTreasure25 = 1;
}
if (haveAcid == true)
{
haveTreasure26 = 1;
}
#endregion
achievements.UpdateAch(-1, -1, -1, -1, -1, -1, -1, -1,
haveTreasure2 + haveTreasure4 + haveTreasure8 + haveTreasure11 + haveTreasure15, -1,
-1, -1, -1, -1, -1);
achievements.UpdateAch(-1, -1, -1, -1, -1, -1, -1, -1,
-1, haveTreasure5 + haveTreasure21 + haveTreasure22 + haveTreasure23 +
haveTreasure24 + haveTreasure25, -1, -1, -1, -1, -1);
stageEndCT = 0;
cameraMaxX = 80;
cameraMaxY = 130;
drgnX = 1185;
drgnY = 528;
drgnFacingDir = 13;
clawDir = 2;
breathDir = 6;
clawX = -80 - clawhitboxmod;
breathX = -196;
drgnFaceR = false;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = -3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = -3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = -3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = -3;
note4yVel = -2;
#endregion
if (depositedGP == false)
{
depositedGP = true;
goldAvailable = goldAvailable + goldNow;
if (goldAvailable > 9999999)
{
goldAvailable = 9999999;
}
goldTotal = goldTotal + goldNow;
if (goldTotal > 9999999)
{
goldTotal = 9999999;
}
goldNow = 0;
}
if (goldTotal < 2500)
{
hoardAmt = 0;
}
if (goldTotal >= 2500 && goldTotal < 10000)
{
hoardAmt = 1;
}
if (goldTotal >= 10000 && goldTotal < 25000)
{
hoardAmt = 2;
}
if (goldTotal >= 25000 && goldTotal < 46000)
{
hoardAmt = 3;
}
if (goldTotal >= 46000)
{
hoardAmt = 4;
}
home1F = true;
home2F = false;
toHome = false;
stageHome = true;
}
#endregion
#region toStage1-1
if (toStage1e1 == true) //1-1 loadout
{
drgnUnderwater = false;
underwaterBreath = false;
drawStages = new DrawStages(2, stageManager);
drawSky = new DrawSky(1, stageManager);
loadSquire = new LoadSquire(true, stageManager);
loadSheep = new LoadSheep(true, stageManager);
loadRam = new LoadRam(true, stageManager);
playStageMusic = new PlayStageMusic(3, stageBGM);
drawTreasureText = new DrawTreasureText(1, stageManager,
languageType);
toStage1e1 = false;
stageEndCT = 0;
cameraMaxX = 4200;
cameraMaxY = 1513;
drgnX = 12;
drgnY = 774;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
#region floor
floor1 = new Rectangle(0, 917, 977, 20);
floor2 = new Rectangle(947, 1111, 555, 20);
floor3 = new Rectangle(1476, 1241, 548, 20);
floor4 = new Rectangle(2004, 1109, 789, 20);
floor5 = new Rectangle(2766, 1239, 838, 20);
floor6 = new Rectangle(2848, 1777, 633, 20);
floor7 = new Rectangle(4146, 1338, 1440, 20);
#endregion
#region wall
wall1 = new Rectangle(944, 926, 7, 197);
wall2 = new Rectangle(1473, 1114, 7, 133);
wall3 = new Rectangle(2018, 1112, 7, 135);
wall4 = new Rectangle(2766, 1112, 7, 133);
wall5 = new Rectangle(3545, 1244, 7, 223);
wall6 = new Rectangle(2848, 1459, 7, 323);
wall7 = new Rectangle(3478, 1783, 7, 666);
wall8 = new Rectangle(4256, 1358, 7, 1905);
wall9 = new Rectangle(0, 0, 7, 2453);
wall10 = new Rectangle(5497, 0, 7, 2453);
#endregion
#region roof
roof1 = new Rectangle(2848, 1439, 710, 20);
#endregion
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
//Squire
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 6;
e1armor = 0;
e1X = 1200;
e1Y = 967;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 10;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
//Squire
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 6;
e2armor = 0;
e2X = 1776;
e2Y = 1097;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 0;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = false;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 10;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
//Sheep
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 1;
e3armor = 0;
e3X = 2314;
e3Y = 955;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 0;
e3FireVul = 0;
e3BoltVul = 0;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = true;
e3BurnVul = false;
e3ShockVul = false;
e3peaceRes = true;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 0;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
//Squire
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 6;
e4armor = 0;
e4X = 2500;
e4Y = 955;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 0;
e4BoltVul = 0;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = false;
e4ShockVul = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 20;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
//Sheep
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 1;
e5armor = 0;
e5X = 2966;
e5Y = 1085;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 0;
e5FireVul = 0;
e5BoltVul = 0;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = true;
e5BurnVul = false;
e5ShockVul = false;
e5peaceRes = true;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 0;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
//Ram
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6HP = 6;
e6armor = 4;
e6X = 4610;
e6Y = 1184;
e6act = 0;
e6facing = 0;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 0;
e6FireVul = 0;
e6BoltVul = 0;
e6AcidVul = 0;
e6faceR = false;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = true;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = true;
e6BurnVul = false;
e6ShockVul = false;
e6peaceRes = true;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 0;
e6coinType = 0;
e6altAnimCT = 0;
#endregion
//end enemy data
stage1e1 = true;
}
#endregion
#region toStage1-2
if (toStage1e2 == true)
{
drgnUnderwater = false;
underwaterBreath = false;
drawStages = new DrawStages(3, stageManager);
drawSky = new DrawSky(1, stageManager);
loadSquire = new LoadSquire(true, stageManager);
loadArcher = new LoadArcher(true, stageManager);
loadStampede = new LoadStampede(true, stageManager);
loadCD = new LoadCD(true, stageManager);
npc1e2 = new Npc1e2(true, stageManager);
playStageMusic = new PlayStageMusic(3, stageBGM);
drawTreasureText = new DrawTreasureText(2, stageManager,
languageType);
toStage1e2 = false;
stageEndCT = 0;
cameraMaxX = 9440;
cameraMaxY = 1300;
drgnX = 12;
drgnY = 1644;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
#region floor
floor1 = new Rectangle(0, 1787, 2100, 20);
floor2 = new Rectangle(2100, 1681, 139, 20);
floor3 = new Rectangle(2239, 1587, 85, 20);
floor4 = new Rectangle(2324, 1626, 100, 20);
floor5 = new Rectangle(2424, 1769, 1135, 20);
floor6 = new Rectangle(3460, 1617, 425, 20);
floor7 = new Rectangle(3875, 1446, 826, 20);
floor8 = new Rectangle(4691, 1287, 555, 20);
floor9 = new Rectangle(5242, 1192, 216, 20);
floor10 = new Rectangle(5454, 1096, 91, 20);
floor11 = new Rectangle(5541, 1122, 87, 20);
floor12 = new Rectangle(5628, 1265, 148, 20);
floor13 = new Rectangle(5776, 1173, 80, 20);
floor14 = new Rectangle(5856, 1127, 87, 20);
floor15 = new Rectangle(5943, 1269, 617, 20);
floor16 = new Rectangle(7118, 1377, 994, 20);
floor17 = new Rectangle(8115, 1531, 783, 20);
floor18 = new Rectangle(8898, 1672, 1328, 20);
floor19 = new Rectangle(10371, 1635, 7000, 20);
floor20 = new Rectangle(1930, 1563, 155, 20);
floor21 = new Rectangle(1418, 1483, 431, 20);
floor22 = new Rectangle(1119, 1374, 210, 20);
#endregion
#region wall
wall1 = new Rectangle(2098, 1682, 7, 101);
wall2 = new Rectangle(2235, 1588, 7, 94);
wall3 = new Rectangle(2325, 1588, 7, 39);
wall4 = new Rectangle(2420, 1627, 7, 153);
wall5 = new Rectangle(3477, 1618, 7, 170);
wall6 = new Rectangle(3885, 1447, 7, 170);
wall7 = new Rectangle(4701, 1288, 7, 158);
wall8 = new Rectangle(5242, 1193, 7, 94);
wall9 = new Rectangle(5454, 1103, 7, 90);
wall10 = new Rectangle(5541, 1103, 7, 20);
wall11 = new Rectangle(5624, 1123, 7, 142);
wall12 = new Rectangle(5776, 1174, 7, 91);
wall13 = new Rectangle(5856, 1128, 7, 46);
wall14 = new Rectangle(5939, 1128, 7, 141);
wall15 = new Rectangle(6530, 1270, 7, 1000);
wall16 = new Rectangle(7138, 1419, 7, 1000);
wall17 = new Rectangle(8093, 1382, 8, 157);
wall18 = new Rectangle(8877, 1536, 8, 151);
wall19 = new Rectangle(10162, 1677, 8, 1000);
wall20 = new Rectangle(10543, 1640, 8, 1000);
wall21 = new Rectangle(0, 0, 7, 2276);
#endregion
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
//Stampede Type A
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 30;
e1armor = 0;
e1X = 2200;
e1Y = 1489;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 2;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 0;
e1coinType = 0;
e1altAnimCT = 0;
e1FrameHalf = 4;
#endregion
//Archer
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 5;
e2armor = 0;
e2X = 1633;
e2Y = 1353;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 0;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = true;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 20;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
//Heavy CD
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 12;
e3armor = 2;
e3X = 3620;
e3Y = 1477;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 0;
e3BoltVul = 0;
e3AcidVul = 2;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = false;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 30;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
//Heavy CD
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 12;
e4armor = 2;
e4X = 9978;
e4Y = 1518;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 0;
e4BoltVul = 0;
e4AcidVul = 2;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = false;
e4ShockVul = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 200;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
//Squire
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 6;
e5armor = 0;
e5X = 8648;
e5Y = 1391;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 1;
e5FireVul = 0;
e5BoltVul = 0;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = false;
e5ShockVul = false;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 100;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
//Archer
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 5;
e7armor = 0;
e7X = 8878;
e7Y = 1530;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 0;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = true;
e7ShockVul = false;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 0;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
stage1e2 = true;
}
#endregion
#region toStage1-3
if (toStage1e3 == true)
{
drawStages = new DrawStages(4, stageManager);
drawSky = new DrawSky(1, stageManager);
loadSquire = new LoadSquire(true, stageManager);
loadArcher = new LoadArcher(true, stageManager);
loadCD = new LoadCD(true, stageManager);
puzzleTruck = new PuzzleTruck(true, stageManager);
npc1e3 = new Npc1e3(true, stageManager);
playStageMusic = new PlayStageMusic(3, stageBGM);
drawTreasureText = new DrawTreasureText(3, stageManager,
languageType);
toStage1e3 = false;
stageEndCT = 0;
cameraMaxX = 11358;
cameraMaxY = 1997;
drgnX = 12;
drgnY = 1098;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
#region floor
floor1 = new Rectangle(0, 1241, 299, 20);
floor2 = new Rectangle(641, 1696, 740, 20);
floor3 = new Rectangle(1834, 2140, 1923, 20);
floor4 = new Rectangle(3698, 2013, 767, 20);
floor5 = new Rectangle(1891, 1167, 1953, 20);
floor6 = new Rectangle(3770, 1042, 721, 20);
floor7 = new Rectangle(4565, 2211, 1103, 20);
floor8 = new Rectangle(5871, 2243, 922, 20);
floor9 = new Rectangle(4222, 3050, 5017, 20);
floor10 = new Rectangle(6827, 2159, 728, 20);
floor11 = new Rectangle(7554, 2292, 941, 20);
floor12 = new Rectangle(8490, 2161, 671, 20);
floor13 = new Rectangle(9305, 2778, 736, 20);
floor14 = new Rectangle(9880, 3425, 752, 20);
floor15 = new Rectangle(9535, 4081, 822, 20);
floor16 = new Rectangle(9007, 4666, 3700, 20);
floor17 = new Rectangle(7052, 1836, 189, 20);
floor18 = new Rectangle(7818, 1654, 198, 20);
floor19 = new Rectangle(7043, 1490, 185, 20);
floor20 = new Rectangle(8707, 1474, 166, 20);
floor21 = new Rectangle(6848, 1369, 2229, 20);
floor22 = new Rectangle(6951, 1238, 159, 20);
floor23 = new Rectangle(7062, 1128, 177, 20);
floor24 = new Rectangle(7182, 1009, 186, 20);
floor25 = new Rectangle(7291, 886, 1325, 20);
floor26 = new Rectangle(8825, 1234, 155, 20);
floor27 = new Rectangle(8690, 1112, 180, 20);
floor28 = new Rectangle(8554, 995, 171, 20);
floor29 = new Rectangle(7477, 731, 955, 20);
floor30 = new Rectangle(7585, 608, 738, 20);
floor31 = new Rectangle(7766, 562, 369, 20);
floor32 = new Rectangle(7821, 524, 233, 20);
floor33 = new Rectangle(6142, 2913, 100, 20);
floor34 = new Rectangle(6250, 2833, 515, 20);
#endregion
#region wall
//WALL L
wall1 = new Rectangle(211, 1247, 6, 5500);
wall3 = new Rectangle(1281, 1702, 6, 5500);
wall6 = new Rectangle(4390, 2019, 6, 5500);
wall10 = new Rectangle(8822, 1117, 6, 120);
wall11 = new Rectangle(8658, 1000, 6, 115);
wall12 = new Rectangle(8592, 891, 6, 107);
wall13 = new Rectangle(9093, 3060, 6, 588);
wall14 = new Rectangle(9012, 3625, 6, 5500);
wall15 = new Rectangle(7549, 2164, 6, 180);
//WALL R
wall2 = new Rectangle(747, 1702, 6, 5500);
wall4 = new Rectangle(2013, 2143, 6, 5500);
wall5 = new Rectangle(3698, 2022, 6, 500);
wall7 = new Rectangle(7109, 1133, 6, 118);
wall8 = new Rectangle(7279, 1014, 6, 116);
wall9 = new Rectangle(7366, 891, 6, 120);
wall16 = new Rectangle(8495, 2166, 6, 180);
wall17 = new Rectangle(3770, 1047, 6, 125);
wall18 = new Rectangle(0, 0, 10, 5500);
wall19 = new Rectangle(12678, 0, 10, 5500);
wall20 = new Rectangle(6142, 2918, 8, 150);
wall21 = new Rectangle(6251, 2837, 8, 150);
wall22 = new Rectangle(6762, 2837, 8, 150);
#endregion
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
if (have08Ninjato == false)
{
truckCT = 0;
truckAct = 0;
truckFrame = 0;
truckSmokeFrame = 0;
truckSpawn = true;
truckCharge = 0;
truckX = 6117;
}
else
{
truckSpawn = false;
truckCharge = 0;
truckX = -1000;
}
npc2CT = 4;
npc2Frame = 5;
//Squire
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 6;
e1armor = 0;
e1X = 8590;
e1Y = 2017;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 30;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
//Archer
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 5;
e2armor = 0;
e2X = 7550;
e2Y = 2162;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 0;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = true;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 40;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
//Heavy CD
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 12;
e3armor = 2;
e3X = 7660;
e3Y = 2162;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 0;
e3BoltVul = 0;
e3AcidVul = 2;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = false;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 40;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
//Squire
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 6;
e4armor = 0;
e4X = 2740;
e4Y = 2000;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 0;
e4BoltVul = 0;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = false;
e4ShockVul = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 20;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
//Archer
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 5;
e5armor = 0;
e5X = 3898;
e5Y = 1873;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 1;
e5FireVul = 0;
e5BoltVul = 0;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = true;
e5ShockVul = false;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 30;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
//Archer
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6HP = 5;
e6armor = 0;
e6X = 2379;
e6Y = 1027;
e6act = 0;
e6facing = 0;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 1;
e6FireVul = 0;
e6BoltVul = 0;
e6AcidVul = 0;
e6faceR = false;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = false;
e6BurnVul = true;
e6ShockVul = false;
e6peaceRes = false;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 40;
e6coinType = 0;
e6altAnimCT = 0;
#endregion
//Archer
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 5;
e7armor = 0;
e7X = 6332;
e7Y = 2103;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 0;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = true;
e7ShockVul = false;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 30;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
//Archer
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 5;
e8armor = 0;
e8X = 10610;
e8Y = 4506;
e8act = 0;
e8facing = 0;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 1;
e8FireVul = 0;
e8BoltVul = 0;
e8AcidVul = 0;
e8faceR = false;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = false;
e8BurnVul = true;
e8ShockVul = false;
e8peaceRes = false;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 40;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
//Heavy CD
#region e9
e9spawn = true;
e9CT = 0;
e9timer = 0;
e9HP = 12;
e9armor = 2;
e9X = 10490;
e9Y = 4506;
e9act = 0;
e9facing = 0;
e9frame = 0;
e9Opacity = 255;
e9invTimer = 0;
e9knockbackTimer = 0;
e9hitTimer = 0;
e9invBlink = 255;
e9Attack = 1;
e9FireVul = 0;
e9BoltVul = 0;
e9AcidVul = 2;
e9faceR = false;
e9invulnerable = false;
e9knockback = false;
e9knockbackRes = false;
e9onGround = true;
e9proximity = false;
e9touchWallL = false;
e9touchWallR = false;
e9breathhit = false;
e9clawhit = false;
e9frozen = false;
e9peaceful = false;
e9frRes = false;
e9BurnVul = false;
e9ShockVul = false;
e9peaceRes = false;
e9coins = false;
e9smoke = false;
e9smokeCT = 0;
e9coinValue = 50;
e9coinType = 0;
e9altAnimCT = 0;
#endregion
//Squire
#region e10
e10spawn = true;
e10CT = 0;
e10timer = 0;
e10HP = 6;
e10armor = 0;
e10X = 5300;
e10Y = 2900;
e10act = 0;
e10facing = 0;
e10frame = 0;
e10Opacity = 255;
e10invTimer = 0;
e10knockbackTimer = 0;
e10hitTimer = 0;
e10invBlink = 255;
e10Attack = 1;
e10FireVul = 0;
e10BoltVul = 0;
e10AcidVul = 0;
e10faceR = false;
e10invulnerable = false;
e10knockback = false;
e10knockbackRes = false;
e10onGround = true;
e10proximity = false;
e10touchWallL = false;
e10touchWallR = false;
e10breathhit = false;
e10clawhit = false;
e10frozen = false;
e10peaceful = false;
e10frRes = false;
e10BurnVul = false;
e10ShockVul = false;
e10peaceRes = false;
e10coins = false;
e10smoke = false;
e10smokeCT = 0;
e10coinValue = 30;
e10coinType = 0;
e10altAnimCT = 0;
#endregion
//Archer
#region e11
e11spawn = true;
e11CT = 0;
e11timer = 0;
e11HP = 5;
e11armor = 0;
e11X = 941;
e11Y = 1556;
e11act = 0;
e11facing = 0;
e11frame = 0;
e11Opacity = 255;
e11invTimer = 0;
e11knockbackTimer = 0;
e11hitTimer = 0;
e11invBlink = 255;
e11Attack = 1;
e11FireVul = 0;
e11BoltVul = 0;
e11AcidVul = 0;
e11faceR = false;
e11invulnerable = false;
e11knockback = false;
e11knockbackRes = false;
e11onGround = true;
e11proximity = false;
e11touchWallL = false;
e11touchWallR = false;
e11breathhit = false;
e11clawhit = false;
e11frozen = false;
e11peaceful = false;
e11frRes = false;
e11BurnVul = true;
e11ShockVul = false;
e11peaceRes = false;
e11coins = false;
e11smoke = false;
e11smokeCT = 0;
e11coinValue = 20;
e11coinType = 0;
e11altAnimCT = 0;
#endregion
#region e12
e12spawn = true;
e12CT = 0;
e12timer = 0;
e12HP = 5;
e12armor = 0;
e12X = 2222;
e12Y = 2000;
e12act = 0;
e12facing = 0;
e12frame = 0;
e12Opacity = 255;
e12invTimer = 0;
e12knockbackTimer = 0;
e12hitTimer = 0;
e12invBlink = 255;
e12Attack = 1;
e12FireVul = 0;
e12BoltVul = 0;
e12AcidVul = 0;
e12faceR = false;
e12invulnerable = false;
e12knockback = false;
e12knockbackRes = false;
e12onGround = true;
e12proximity = false;
e12touchWallL = false;
e12touchWallR = false;
e12breathhit = false;
e12clawhit = false;
e12frozen = false;
e12peaceful = false;
e12frRes = false;
e12BurnVul = true;
e12ShockVul = false;
e12peaceRes = false;
e12coins = false;
e12smoke = false;
e12smokeCT = 0;
e12coinValue = 30;
e12coinType = 0;
e12altAnimCT = 0;
#endregion
#region e13
e13spawn = true;
e13CT = 0;
e13timer = 0;
e13HP = 5;
e13armor = 0;
e13X = 9600;
e13Y = 2638;
e13act = 0;
e13facing = 0;
e13frame = 0;
e13Opacity = 255;
e13invTimer = 0;
e13knockbackTimer = 0;
e13hitTimer = 0;
e13invBlink = 255;
e13Attack = 1;
e13FireVul = 0;
e13BoltVul = 0;
e13AcidVul = 0;
e13faceR = false;
e13invulnerable = false;
e13knockback = false;
e13knockbackRes = false;
e13onGround = true;
e13proximity = false;
e13touchWallL = false;
e13touchWallR = false;
e13breathhit = false;
e13clawhit = false;
e13frozen = false;
e13peaceful = false;
e13frRes = false;
e13BurnVul = true;
e13ShockVul = false;
e13peaceRes = false;
e13coins = false;
e13smoke = false;
e13smokeCT = 0;
e13coinValue = 20;
e13coinType = 0;
e13altAnimCT = 0;
#endregion
#region e14
e14spawn = true;
e14CT = 0;
e14timer = 0;
e14HP = 5;
e14armor = 0;
e14X = 10480;
e14Y = 3285;
e14act = 0;
e14facing = 0;
e14frame = 0;
e14Opacity = 255;
e14invTimer = 0;
e14knockbackTimer = 0;
e14hitTimer = 0;
e14invBlink = 255;
e14Attack = 1;
e14FireVul = 0;
e14BoltVul = 0;
e14AcidVul = 0;
e14faceR = false;
e14invulnerable = false;
e14knockback = false;
e14knockbackRes = false;
e14onGround = true;
e14proximity = false;
e14touchWallL = false;
e14touchWallR = false;
e14breathhit = false;
e14clawhit = false;
e14frozen = false;
e14peaceful = false;
e14frRes = false;
e14BurnVul = true;
e14ShockVul = false;
e14peaceRes = false;
e14coins = false;
e14smoke = false;
e14smokeCT = 0;
e14coinValue = 20;
e14coinType = 0;
e14altAnimCT = 0;
#endregion
stage1e3 = true;
}
#endregion
#region toStage 1-B
if (toStage1eB == true)
{
drawStages = new DrawStages(5, stageManager);
drawSky = new DrawSky(1, stageManager);
loadBoss1 = new LoadTM061(true, stageManager);
playStageMusic = new PlayStageMusic(9, stageBGM);
loopThunderBlast = new LoopThunderBlast(true,
breathSFX);
loopLaser = new LoopLaser(true, breathSFX);
toStage1eB = false;
stageEndCT = 0;
cameraMaxX = 0;
cameraMaxY = 0;
drgnX = 1093;
drgnY = 560;
drgnFacingDir = 13;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 2;
breathDir = 6;
clawX = -80 - clawhitboxmod;
breathX = -196;
drgnFaceR = false;
floor1 = new Rectangle(-30, 703, 1400, 20);
wall1 = new Rectangle(0, 0, 8, 1000);
wall2 = new Rectangle(1280, 0, 8, 1000);
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = -3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = -3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = -3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = -3;
note4yVel = -2;
#endregion
boss1HP = 15;
boss1X = 60;
boss1Y = 560;
boss1Stamina = 10;
boss1CT = 0;
boss1Frame = 0;
boss1Act = 1;
boss1Facing = 0; //flip 13
boss1AttackTimer = 0;
boss1ExhaustedRecharge = 0;
boss1Exhausted = false;
boss1Disappear = 255;
bossCounterCooldown = 0;
boss1Opacity = 255;
boss1invTimer = 0;
boss1knockbackTimer = 0;
boss1hitTimer = 0;
boss1invBlink = 255;
boss1AttackCT = 0;
boss1ClawHit = false;
boss1BreathHit = false;
boss1Knockback = false;
boss1Counter = false;
attackThundercloud = false;
attackThunderbolt = false;
attackThunderslash = false;
attackThunderblast = false;
slash1 = false;
slash2 = false;
slash3 = false;
slash4 = false;
slash5 = false;
slash6 = false;
slash7 = false;
slash8 = false;
boltUp = false;
boltDn = false;
boss1FaceL = false;
slash1CT = 0;
slash1Frame = 0;
slash2CT = 0;
slash2Frame = 0;
slash3CT = 0;
slash3Frame = 0;
slash4CT = 0;
slash4Frame = 0;
slash5CT = 0;
slash5Frame = 0;
slash6CT = 0;
slash6Frame = 0;
slash7CT = 0;
slash7Frame = 0;
slash8CT = 0;
slash8Frame = 0;
dragonLook = false;
dragonLookY = 305;
dragonLookWait = 0;
dragonLookCT = 0;
mogLook = false;
mogLookX = 6;
mogLookWait = 0;
mogLookCT = 0;
ninjaLook = false;
ninjaLookY = 475;
ninjaLookWait = 0;
ninjaLookCT = 0;
stage1eB = true;
}
#endregion
#region toStage 2-1
if (toStage2e1 == true)
{
drawStages = new DrawStages(6, stageManager);
draw2e1 = new Draw2e1(true, stageManager);
drawSky = new DrawSky(1, stageManager);
drawWater = new DrawWater(1, stageManager);
loadOcean = new LoadOcean(1, stageManager);
loadWaterfall = new LoadWaterfall(1, stageManager);
loadArcher = new LoadArcher(true, stageManager);
loadHandler = new LoadHandler(true, stageManager);
loadSecurity = new LoadSecurity(true, stageManager);
npc2e1 = new Npc2e1(true, stageManager);
puzzleWater = new PuzzleWater(true, stageManager);
playStageMusic = new PlayStageMusic(4, stageBGM);
loopSpin = new LoopSpin(true, breathSFX);
drawTreasureText = new DrawTreasureText(4, stageManager,
languageType);
gateY = 0;
gateX = 0;
waterRisingHeight = 0;
puzzleCT = 0;
waterRisingOn = false;
waterPuzzleComplete = false;
if (npcQuest == 0)
{
niaOn = true;
squireOn = true;
}
if (on2e2 == false && on3e2 == false)
{
tutorialOn = true;
}
#region floor
floor1 = new Rectangle(0, 1200, 1413, 20);
floor2 = new Rectangle(1407, 1247, 198, 20);
floor3 = new Rectangle(1600, 1297, 203, 20);
floor4 = new Rectangle(1797, 1343, 199, 20);
floor5 = new Rectangle(1991, 1397, 1962, 20);
floor6 = new Rectangle(3941, 1476, 1181, 20);
floor7 = new Rectangle(5112, 1844, 923, 20);
floor8 = new Rectangle(6030, 1780, 1140, 20);
floor9 = new Rectangle(7164, 1780, 265, 20);
floor10 = new Rectangle(7416, 2067, 507, 20);
floor11 = new Rectangle(7919, 1861, 485, 20);
floor12 = new Rectangle(8532, 1861, 75, 20);
floor13 = new Rectangle(8068, 2358, 1242, 20);
floor14 = new Rectangle(9276, 2060, 1562, 20);
floor15 = new Rectangle(10805, 2206, 1423, 20);
floor16 = new Rectangle(7166, 1718, 64, 20);
floor17 = new Rectangle(7223, 1666, 67, 20);
floor18 = new Rectangle(7286, 1617, 67, 20);
floor19 = new Rectangle(7348, 1564, 60, 20);
floor20 = new Rectangle(7401, 1514, 65, 20);
floor21 = new Rectangle(7461, 1462, 52, 20);
floor22 = new Rectangle(7507, 1417, 58, 20);
floor23 = new Rectangle(7557, 1371, 47, 20);
floor24 = new Rectangle(7597, 1314, 58, 20);
floor25 = new Rectangle(7645, 1270, 791, 20);
floor26 = new Rectangle(8595, 1276, 620, 20);
floor27 = new Rectangle(9205, 1331, 46, 20);
floor28 = new Rectangle(9242, 1376, 58, 20);
floor29 = new Rectangle(9291, 1427, 53, 20);
floor30 = new Rectangle(9331, 1465, 56, 20);
floor31 = new Rectangle(9374, 1522, 57, 20);
floor32 = new Rectangle(9424, 1573, 55, 20);
floor33 = new Rectangle(9475, 1621, 50, 20);
floor34 = new Rectangle(9521, 1675, 52, 20);
floor35 = new Rectangle(9566, 1721, 57, 20);
floor36 = new Rectangle(9619, 1786, 61, 20);
floor37 = new Rectangle(8306 - gateX, 1861, 276, 32);
#endregion
#region wall
wall1 = new Rectangle(1407, 1205, 6, 48);
wall2 = new Rectangle(1600, 1252, 6, 51);
wall3 = new Rectangle(1797, 1302, 6, 47);
wall4 = new Rectangle(1986, 1348, 6, 55);
wall5 = new Rectangle(3941, 1402, 6, 80);
wall6 = new Rectangle(5112, 1481, 6, 369);
wall7 = new Rectangle(6032, 1785, 6, 65);
wall8 = new Rectangle(7416, 1782, 6, 291);
wall9 = new Rectangle(7655, 1275, 6, 44);
wall10 = new Rectangle(7922, 1866, 6, 207);
wall11 = new Rectangle(8398, 1866, 6, 253);
wall12 = new Rectangle(8555, 1866, 6, 498);
wall13 = new Rectangle(8068, 2114, 6, 235);
wall14 = new Rectangle(8453, 1275, 6, 416);
wall15 = new Rectangle(8614, 1281, 6, 411);
wall16 = new Rectangle(9284, 2065, 6, 299);
wall17 = new Rectangle(9205, 1281, 6, 55);
wall18 = new Rectangle(10805, 2065, 6, 147);
wall19 = new Rectangle(12227, 2211, 6, 700);
wall20 = new Rectangle(0, 0, 6, 3000);
wall21 = new Rectangle(8640, 1866, 6, 800);
#endregion
roof1 = new Rectangle(8068, 2108, 325, 10);
toStage2e1 = false;
stageEndCT = 0;
cameraMaxX = 11803;
cameraMaxY = 2079;
drgnX = 12;
drgnY = 1057;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
waterfall1Act = 0;
waterfall2Act = 0;
waterfallFrame = 0;
waterfallCT = 0;
sprinkler1HP = 60;
sprinkler2HP = 60;
waterRisingPos = 0;
waterRising = false;
drgnUnderwater = false;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
//handler / shallow
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 12;
e1armor = 0;
e1X = 5412;
e1Y = 1701;
e1projA_X = 5412;
e1projA_Y = 1701;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1projHeight = 0;
e1projWidth = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 1;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 50;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
//handler / swim
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 12;
e2armor = 0;
e2X = 8900;
e2Y = 2030;
e2projA_X = 8886;
e2projA_Y = 1990;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2projHeight = 0;
e2projWidth = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 1;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = false;
e2ShockVul = false;
e2peaceRes = true;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 0;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 12;
e3armor = 0;
e3X = 8120;
e3Y = 1718;
e3projA_X = 8120;
e3projA_Y = 1718;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3projHeight = 0;
e3projWidth = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 0;
e3BoltVul = 1;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = false;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 50;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
//handler /land
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 12;
e4armor = 0;
e4X = 10155;
e4Y = 1922;
e4projA_X = 10155;
e4projA_Y = 1922;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4projHeight = 0;
e4projWidth = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 0;
e4BoltVul = 1;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = false;
e4ShockVul = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 40;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
//security
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 99;
e5armor = 99;
e5X = 2800;
e5Y = 1254;
e5projA_X = 2800;
e5projA_Y = 1182;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5projHeight = 0;
e5projWidth = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 2;
e5FireVul = 0;
e5BoltVul = 0;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = true;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = false;
e5ShockVul = false;
e5peaceRes = true;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 0;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6HP = 99;
e6armor = 99;
e6X = 7166;
e6Y = 1634;
e6projA_X = 7166;
e6projA_Y = 1674;
e6act = 0;
e6facing = 0;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6projHeight = 0;
e6projWidth = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 2;
e6FireVul = 0;
e6BoltVul = 0;
e6AcidVul = 0;
e6faceR = false;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = true;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = false;
e6BurnVul = false;
e6ShockVul = false;
e6peaceRes = true;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 0;
e6coinType = 0;
e6altAnimCT = 0;
#endregion
//archer
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 5;
e7armor = 0;
e7X = 7900;
e7Y = 1127;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 0;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = true;
e7ShockVul = false;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 60;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 5;
e8armor = 0;
e8X = 8600;
e8Y = 1133;
e8act = 0;
e8facing = 0;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 1;
e8FireVul = 0;
e8BoltVul = 0;
e8AcidVul = 0;
e8faceR = false;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = false;
e8BurnVul = true;
e8ShockVul = false;
e8peaceRes = false;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 60;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
stage2e1 = true;
}
#endregion
#region toStage 2-2
if (toStage2e2 == true)
{
drawStages = new DrawStages(7, stageManager);
drawSky = new DrawSky(1, stageManager);
loadOcean = new LoadOcean(1, stageManager);
loadHandler = new LoadHandler(true, stageManager);
loadXbow = new LoadXbow(true, stageManager);
loadTentacle = new LoadTentacle(true, stageManager);
npc2e2 = new Npc2e2(true, stageManager);
playStageMusic = new PlayStageMusic(4, stageBGM);
loopSpin = new LoopSpin(true, breathSFX);
puzzleHovercraft = new PuzzleHovercraft(true,
stageManager);
loadFlyss = new LoadFlyss(true, stageManager);
drawTreasureText = new DrawTreasureText(5, stageManager,
languageType);
#region floor
floor1 = new Rectangle(0, 1326, 158, 10);
floor2 = new Rectangle(352, 1216, 627, 10);
floor3 = new Rectangle(122, 1528, 553, 10);
floor4 = new Rectangle(575, 1913, 671, 10);
floor5 = new Rectangle(899, 2129, 224, 10);
floor6 = new Rectangle(582, 2321, 331, 10);
floor7 = new Rectangle(165, 2732, 277, 10);
floor8 = new Rectangle(435, 2868, 228, 10);
floor9 = new Rectangle(502, 3123, 464, 10);
floor10 = new Rectangle(944, 3423, 224, 10);
floor11 = new Rectangle(0, 3817, 5574, 10);
floor12 = new Rectangle(2763, 3531, 1030, 10);
floor13 = new Rectangle(3965, 3538, 900, 10);
floor14 = new Rectangle(2308, 3112, 487, 10);
floor15 = new Rectangle(2934, 3112, 360, 10);
floor16 = new Rectangle(2246, 2601, 875, 10);
floor17 = new Rectangle(3346, 3234, 895, 10);
floor18 = new Rectangle(4325, 3140, 235, 10);
floor19 = new Rectangle(3977, 2629, 602, 10);
floor20 = new Rectangle(3396, 2609, 375, 10);
floor21 = new Rectangle(2203, 2100, 511, 10);
floor22 = new Rectangle(3621, 2089, 64, 10);
floor23 = new Rectangle(3678, 1971, 235, 10);
floor24 = new Rectangle(3910, 1884, 627, 10);
floor25 = new Rectangle(4755, 2114, 819, 10);
floor26 = new Rectangle(4712, 1583, 256, 10);
floor27 = new Rectangle(4373, 1578, 241, 10);
floor28 = new Rectangle(3167, 1583, 1027, 10);
floor29 = new Rectangle(2693, 1220, 512, 10);
floor30 = new Rectangle(3350, 1351, 716, 10);
floor31 = new Rectangle(4042, 1217, 1532, 10);
floor32 = new Rectangle(1560, 1209, 393, 10);
floor33 = new Rectangle(1551, 3537, 392, 10);
#endregion
#region wall
wall1 = new Rectangle(122, 1331, 6, 202);
wall2 = new Rectangle(357, 1226, 6, 131);
wall3 = new Rectangle(651, 1532, 6, 240);
wall4 = new Rectangle(951, 1226, 6, 523);
wall5 = new Rectangle(821, 1340, 6, 426);
wall6 = new Rectangle(449, 1731, 6, 844);
wall7 = new Rectangle(589, 1918, 6, 250);
wall8 = new Rectangle(797, 1968, 6, 196);
wall9 = new Rectangle(5574, 0, 6, 5000);
wall10 = new Rectangle(193, 2134, 6, 194);
wall11 = new Rectangle(1212, 1917, 6, 1694);
wall12 = new Rectangle(165, 2425, 6, 308);
wall13 = new Rectangle(320, 2423, 6, 181);
wall14 = new Rectangle(435, 2737, 6, 137);
wall15 = new Rectangle(817, 2669, 6, 308);
wall16 = new Rectangle(651, 2873, 6, 85);
wall17 = new Rectangle(1148, 2954, 6, 470);
wall18 = new Rectangle(951, 3128, 6, 301);
wall19 = new Rectangle(330, 2940, 6, 878);
wall20 = new Rectangle(507, 3128, 6, 507);
wall21 = new Rectangle(2254, 2606, 6, 1003);
wall22 = new Rectangle(2247, 2105, 6, 308);
wall23 = new Rectangle(2714, 1225, 6, 881);
wall24 = new Rectangle(2310, 2886, 6, 227);
wall25 = new Rectangle(2780, 3117, 6, 420);
wall26 = new Rectangle(3293, 2413, 6, 699);
wall27 = new Rectangle(2936, 3117, 6, 243);
wall28 = new Rectangle(3739, 3536, 6, 104);
wall29 = new Rectangle(3970, 3543, 6, 100);
wall30 = new Rectangle(4548, 3145, 6, 175);
wall31 = new Rectangle(4336, 2924, 6, 217);
wall32 = new Rectangle(4565, 2634, 6, 330);
wall33 = new Rectangle(4755, 2119, 6, 1426);
wall34 = new Rectangle(4577, 1852, 6, 544);
wall35 = new Rectangle(4697, 1588, 6, 260);
wall36 = new Rectangle(4718, 1386, 6, 199);
wall37 = new Rectangle(5143, 1375, 6, 430);
wall38 = new Rectangle(3978, 2634, 6, 321);
wall39 = new Rectangle(3752, 2614, 6, 307);
wall40 = new Rectangle(3499, 2927, 6, 90);
wall41 = new Rectangle(3351, 3014, 6, 220);
wall42 = new Rectangle(4240, 2930, 6, 305);
wall43 = new Rectangle(3402, 1588, 6, 1027);
wall44 = new Rectangle(3643, 2094, 6, 337);
wall45 = new Rectangle(3681, 1976, 6, 119);
wall46 = new Rectangle(3912, 1889, 6, 88);
wall47 = new Rectangle(4521, 1665, 6, 220);
wall48 = new Rectangle(4383, 1583, 6, 80);
wall49 = new Rectangle(4193, 1588, 6, 44);
wall50 = new Rectangle(4606, 1290, 6, 289);
wall51 = new Rectangle(4372, 1289, 6, 148);
wall52 = new Rectangle(3167, 1225, 6, 364);
wall53 = new Rectangle(3353, 1356, 6, 76);
wall54 = new Rectangle(4056, 1222, 6, 136);
wall55 = new Rectangle(-12, 0, 10, 5000);
wall56 = new Rectangle(1098, 1968, 6, 161);
wall57 = new Rectangle(913, 2134, 6, 194);
wall58 = new Rectangle(586, 2326, 6, 368);
wall59 = new Rectangle(1530, 925, 95, 280);
wall60 = new Rectangle(1550, 3542, 30, 400);
wall61 = new Rectangle(1914, 3542, 30, 400);
wall62 = new Rectangle(3098, 2606, 6, 328);
#endregion
#region roof
roof1 = new Rectangle(357, 1339, 465, 10);
roof2 = new Rectangle(449, 1740, 203, 10);
roof3 = new Rectangle(821, 1743, 131, 10);
roof4 = new Rectangle(797, 1973, 302, 10);
roof5 = new Rectangle(589, 2154, 209, 10);
roof6 = new Rectangle(165, 2431, 156, 10);
roof7 = new Rectangle(320, 2596, 130, 10);
roof8 = new Rectangle(586, 2675, 232, 10);
roof9 = new Rectangle(330, 2941, 322, 10);
roof10 = new Rectangle(817, 2963, 332, 10);
roof11 = new Rectangle(507, 3599, 706, 10);
roof12 = new Rectangle(4372, 1292, 235, 10);
roof13 = new Rectangle(3353, 1434, 1020, 10);
roof14 = new Rectangle(4718, 1384, 426, 10);
roof15 = new Rectangle(3402, 1628, 792, 10);
roof16 = new Rectangle(4383, 1667, 139, 10);
roof17 = new Rectangle(4577, 1857, 391, 10);
roof18 = new Rectangle(5143, 1835, 431, 10);
roof19 = new Rectangle(2247, 2419, 1047, 10);
roof20 = new Rectangle(3643, 2410, 935, 10);
roof21 = new Rectangle(2310, 2909, 789, 10);
roof22 = new Rectangle(3499, 2935, 254, 10);
roof23 = new Rectangle(3978, 2943, 263, 10);
roof24 = new Rectangle(4336, 2952, 230, 10);
roof25 = new Rectangle(3351, 3020, 149, 10);
roof26 = new Rectangle(2936, 3347, 1613, 10);
roof27 = new Rectangle(2254, 3628, 1525, 10);
roof28 = new Rectangle(3970, 3653, 1604, 10);
#endregion
toStage2e2 = false;
stageEndCT = 0;
cameraMaxX = 4246;
cameraMaxY = 3335;
drgnX = 12;
drgnY = 1183;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
#region light
light1X = 0;
light2X = 0;
light3X = 0;
light4X = 0;
light1Frame = 0;
light2Frame = 0;
light3Frame = 0;
light4Frame = 0;
light1CT = 0;
light2CT = 0;
light3CT = 0;
light4CT = 0;
light1Act = 0;
light2Act = 0;
light3Act = 0;
light4Act = 0;
light1Wait = 299;
light2Wait = 239;
light3Wait = 119;
light4Wait = 29;
light1On = false;
light2On = false;
light3On = false;
light4On = false;
#endregion
fishermanCT = 0;
fishermanFrame = 0;
fishermanAct = 0;
fishermanLoc = 0;
hoverCT = 0;
hoverFrame = 0;
hoverAct = 0;
hoverHP = 60;
hoverY = 0;
puzzleExplosionCT = 0;
puzzleExplosion = false;
eventYVel = 0;
chestAct = 0;
hovercraftOn = true;
hovercraftSink = false;
attackedFish = false;
drgnUnderwater = true;
#region enemies
//crossbow
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 12;
e1armor = 0;
e1X = 552;
e1Y = 1073;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1projHeight = 0;
e1projWidth = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 1;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 60;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 12;
e2armor = 0;
e2X = 905;
e2Y = 1770;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2projHeight = 0;
e2projWidth = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 1;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = false;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 70;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 12;
e3armor = 0;
e3X = 527;
e3Y = 2985;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3projHeight = 0;
e3projWidth = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 0;
e3BoltVul = 1;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = false;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 60;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 12;
e4armor = 0;
e4X = 2780;
e4Y = 3674;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4projHeight = 0;
e4projWidth = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 0;
e4BoltVul = 1;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = false;
e4ShockVul = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 60;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 12;
e5armor = 0;
e5X = 3421;
e5Y = 3091;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5projHeight = 0;
e5projWidth = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 1;
e5FireVul = 0;
e5BoltVul = 1;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = false;
e5ShockVul = false;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 600;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 12;
e7armor = 0;
e7X = 4742;
e7Y = 1440;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7projHeight = 0;
e7projWidth = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 0;
e7BoltVul = 1;
e7AcidVul = 0;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = false;
e7ShockVul = false;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 80;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
//handler - swim
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 12;
e8armor = 0;
e8X = 3681;
e8Y = 1185;
e8projA_X = 3667;
e8projA_Y = 1225;
e8act = 0;
e8facing = 0;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8projHeight = 0;
e8projWidth = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 1;
e8FireVul = 0;
e8BoltVul = 1;
e8AcidVul = 0;
e8faceR = false;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = false;
e8BurnVul = false;
e8ShockVul = false;
e8peaceRes = true;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 0;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
#region e9
e9spawn = true;
e9CT = 0;
e9timer = 0;
e9HP = 12;
e9armor = 0;
e9X = 3600;
e9Y = 3388;
e9act = 0;
e9facing = 0;
e9frame = 0;
e9Opacity = 255;
e9invTimer = 0;
e9knockbackTimer = 0;
e9projHeight = 0;
e9projWidth = 0;
e9hitTimer = 0;
e9invBlink = 255;
e9Attack = 1;
e9FireVul = 0;
e9BoltVul = 1;
e9AcidVul = 0;
e9faceR = false;
e9invulnerable = false;
e9knockback = false;
e9knockbackRes = false;
e9onGround = true;
e9proximity = false;
e9touchWallL = false;
e9touchWallR = false;
e9breathhit = false;
e9clawhit = false;
e9frozen = false;
e9peaceful = false;
e9frRes = false;
e9BurnVul = false;
e9ShockVul = false;
e9peaceRes = false;
e9coins = false;
e9smoke = false;
e9smokeCT = 0;
e9coinValue = 60;
e9coinType = 0;
e9altAnimCT = 0;
#endregion
#region e10
e10spawn = true;
e10CT = 0;
e10timer = 0;
e10HP = 12;
e10armor = 0;
e10X = 3402;
e10Y = 2466;
e10act = 0;
e10facing = 0;
e10frame = 0;
e10Opacity = 255;
e10invTimer = 0;
e10knockbackTimer = 0;
e10projHeight = 0;
e10projWidth = 0;
e10hitTimer = 0;
e10invBlink = 255;
e10Attack = 1;
e10FireVul = 0;
e10BoltVul = 1;
e10AcidVul = 0;
e10faceR = false;
e10invulnerable = false;
e10knockback = false;
e10knockbackRes = false;
e10onGround = true;
e10proximity = false;
e10touchWallL = false;
e10touchWallR = false;
e10breathhit = false;
e10clawhit = false;
e10frozen = false;
e10peaceful = false;
e10frRes = false;
e10BurnVul = false;
e10ShockVul = false;
e10peaceRes = false;
e10coins = false;
e10smoke = false;
e10smokeCT = 0;
e10coinValue = 60;
e10coinType = 0;
e10altAnimCT = 0;
#endregion
#region e11
e11spawn = true;
e11CT = 0;
e11timer = 0;
e11HP = 12;
e11armor = 0;
e11X = 2693;
e11Y = 2458;
e11act = 0;
e11facing = 0;
e11frame = 0;
e11Opacity = 255;
e11invTimer = 0;
e11knockbackTimer = 0;
e11projHeight = 0;
e11projWidth = 0;
e11hitTimer = 0;
e11invBlink = 255;
e11Attack = 1;
e11FireVul = 0;
e11BoltVul = 1;
e11AcidVul = 0;
e11faceR = false;
e11invulnerable = false;
e11knockback = false;
e11knockbackRes = false;
e11onGround = true;
e11proximity = false;
e11touchWallL = false;
e11touchWallR = false;
e11breathhit = false;
e11clawhit = false;
e11frozen = false;
e11peaceful = false;
e11frRes = false;
e11BurnVul = false;
e11ShockVul = false;
e11peaceRes = false;
e11coins = false;
e11smoke = false;
e11smokeCT = 0;
e11coinValue = 60;
e11coinType = 0;
e11altAnimCT = 0;
#endregion
#endregion
#region tentacles
obs1Frame = 0;
obs2Frame = 1;
obs3Frame = 2;
#endregion
#region NPC
e18X = 2180;
e19X = 651;
e20X = 1412;
npc1FaceR = false;
npc2FaceR = false;
npc3FaceR = false;
#endregion
stage2e2 = true;
}
#endregion
#region toStage 2-3
if (toStage2e3 == true)
{
drawStages = new DrawStages(8, stageManager);
drawSky = new DrawSky(1, stageManager);
drawAbyss = new DrawAbyss(true, stageManager);
loadStampede = new LoadStampede(true, stageManager);
loadHandler = new LoadHandler(true, stageManager);
loadBone = new LoadBone(true, stageManager);
loadTuba = new LoadTuba(true, stageManager);
loadSquire = new LoadSquire(true, stageManager);
loadXbow = new LoadXbow(true, stageManager);
loadGust = new LoadGust(true, stageManager);
npc2e3 = new Npc2e3(true, stageManager);
loadOcean = new LoadOcean(1, stageManager);
playStageMusic = new PlayStageMusic(4, stageBGM);
loopSpin = new LoopSpin(true, breathSFX);
drawTreasureText = new DrawTreasureText(6, stageManager,
languageType);
talk2e3 = new Rectangle(4722, 1347, 40, 144);
#region floor
floor1 = new Rectangle(0, 1785, 501, 10);
floor2 = new Rectangle(721, 1740, 544, 10);
floor3 = new Rectangle(1349, 1740, 560, 10);
floor4 = new Rectangle(2032, 1725, 73, 10);
floor5 = new Rectangle(2101, 1781, 255, 10);
floor6 = new Rectangle(2349, 1720, 54, 10);
floor7 = new Rectangle(2563, 1692, 817, 10);
floor8 = new Rectangle(2619, 1562, 615, 10);
floor9 = new Rectangle(3439, 1497, 450, 10);
floor10 = new Rectangle(3877, 1386, 512, 10);
floor11 = new Rectangle(4380, 1490, 612, 10);
floor12 = new Rectangle(4443, 1845, 485, 10);
floor13 = new Rectangle(4982, 1439, 249, 10);
floor14 = new Rectangle(5216, 1391, 323, 10);
floor15 = new Rectangle(5733, 1754, 340, 10);
floor16 = new Rectangle(6061, 1829, 298, 10);
floor17 = new Rectangle(6751, 1790, 446, 10);
floor18 = new Rectangle(6793, 1710, 102, 10);
floor19 = new Rectangle(7033, 1637, 96, 10);
floor20 = new Rectangle(6802, 1554, 94, 10);
floor21 = new Rectangle(6804, 1487, 100, 10);
floor22 = new Rectangle(6504, 1355, 247, 10);
floor23 = new Rectangle(6960, 1369, 410, 10);
floor24 = new Rectangle(7368, 1545, 563, 10);
floor25 = new Rectangle(7926, 1467, 523, 10);
floor26 = new Rectangle(8445, 1547, 496, 10);
floor27 = new Rectangle(9497, 1794, 503, 10);
#endregion
#region temp wall
L1 = new Rectangle(741, 1745, 6, 100);
R1 = new Rectangle(1255, 1745, 6, 100);
L2 = new Rectangle(1369, 1745, 6, 100);
R2 = new Rectangle(1879, 1745, 6, 100);
L3 = new Rectangle(2052, 1730, 6, 125);
R3 = new Rectangle(2383, 1725, 6, 125);
L4 = new Rectangle(2583, 1697, 6, 150);
R4 = new Rectangle(3330, 1697, 6, 150);
L5 = new Rectangle(3427, 1502, 6, 20);
R5 = new Rectangle(5551, 1396, 6, 100);
L6 = new Rectangle(5743, 1759, 6, 100);
R6 = new Rectangle(6349, 1834, 6, 29);
L7 = new Rectangle(6492, 1360, 6, 20);
R7 = new Rectangle(6763, 1360, 6, 20);
L8 = new Rectangle(6948, 1374, 6, 20);
R8 = new Rectangle(8953, 1552, 6, 20);
L9 = new Rectangle(9485, 1799, 6, 20);
R9 = new Rectangle(10012, 1799, 6, 20);
L10 = new Rectangle(6739, 1795, 6, 20);
R10 = new Rectangle(7209, 1795, 6, 20);
#endregion
#region wall
wall1 = new Rectangle(401, 1790, 6, 1000);
wall2 = new Rectangle(-20, 0, 6, 4000);
wall3 = new Rectangle(2095, 1730, 6, 57);
wall4 = new Rectangle(2352, 1725, 6, 62);
wall5 = new Rectangle(3880, 1391, 6, 112);
wall6 = new Rectangle(4387, 1391, 6, 105);
wall7 = new Rectangle(4983, 1444, 6, 52);
wall8 = new Rectangle(5219, 1396, 6, 49);
wall9 = new Rectangle(6060, 1759, 6, 76);
wall10 = new Rectangle(7368, 1374, 6, 171);
wall11 = new Rectangle(7927, 1472, 6, 73);
wall12 = new Rectangle(8446, 1472, 6, 81);
wall13 = new Rectangle(9797, 0, 6, 4000);
wall14 = new Rectangle(5516, 1396, 6, 175);
#endregion
#region roof
roof1 = new Rectangle(9497, 1814, 503, 10);
roof2 = new Rectangle(741, 1845, 514, 10);
roof3 = new Rectangle(1369, 1845, 510, 10);
roof4 = new Rectangle(2052, 1850, 331, 10);
roof5 = new Rectangle(2583, 1847, 747, 10);
roof6 = new Rectangle(3527, 1606, 2024, 10);
roof7 = new Rectangle(5743, 1859, 606, 10);
#endregion
toStage2e3 = false;
stageEndCT = 0;
cameraMaxX = 8523;
cameraMaxY = 1377;
drgnX = 12;
drgnY = 1642;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
gustYMod = 0;
drgnUnderwater = false;
if (npcQuest == 1)
{
niaOn = true;
bowOn = true;
}
else
{
niaOn = false;
bowOn = false;
}
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
#region enemies
//squire
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 6;
e1armor = 0;
e1X = 930;
e1Y = 1597;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 30;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
//crossbow
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 12;
e2armor = 0;
e2X = 3000;
e2Y = 1549;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2projHeight = 0;
e2projWidth = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 1;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = false;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 70;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 12;
e3armor = 0;
e3X = 6161;
e3Y = 1686;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3projHeight = 0;
e3projWidth = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 0;
e3BoltVul = 1;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = false;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 60;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
//tuba
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4reload = 121;
e4HP = 25;
e4armor = 0;
e4X = 7210;
e4Y = 1226;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4projHeight = 0;
e4projWidth = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 2;
e4BoltVul = 0;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = true;
e4ShockVul = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 40;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5reload = 121;
e5HP = 25;
e5armor = 0;
e5X = 8126;
e5Y = 1324;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5projHeight = 0;
e5projWidth = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 1;
e5FireVul = 2;
e5BoltVul = 0;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = true;
e5ShockVul = false;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 40;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
//trombone
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6HP = 26;
e6armor = 0;
e6X = 6555;
e6Y = 1212;
e6act = 0;
e6facing = 0;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6projHeight = 0;
e6projWidth = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 1;
e6FireVul = 2;
e6BoltVul = 0;
e6AcidVul = 0;
e6faceR = false;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = false;
e6BurnVul = true;
e6ShockVul = false;
e6peaceRes = false;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 60;
e6coinType = 0;
e6altAnimCT = 0;
#endregion
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 26;
e7armor = 0;
e7X = 7368;
e7Y = 1402;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7projHeight = 0;
e7projWidth = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 2;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = true;
e7ShockVul = false;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 60;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
//handler - swim
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 12;
e8armor = 0;
e8X = 3837;
e8Y = 1774;
e8projA_X = 3823;
e8projA_Y = 1814;
e8act = 0;
e8facing = 0;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8projHeight = 0;
e8projWidth = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 1;
e8FireVul = 0;
e8BoltVul = 1;
e8AcidVul = 0;
e8faceR = false;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = false;
e8BurnVul = false;
e8ShockVul = false;
e8peaceRes = true;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 0;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
#region e9
e9spawn = true;
e9CT = 0;
e9timer = 0;
e9HP = 12;
e9armor = 0;
e9X = 6960;
e9Y = 1774;
e9projA_X = 6946;
e9projA_Y = 1814;
e9act = 0;
e9facing = 0;
e9frame = 0;
e9Opacity = 255;
e9invTimer = 0;
e9knockbackTimer = 0;
e9projHeight = 0;
e9projWidth = 0;
e9hitTimer = 0;
e9invBlink = 255;
e9Attack = 1;
e9FireVul = 0;
e9BoltVul = 1;
e9AcidVul = 0;
e9faceR = false;
e9invulnerable = false;
e9knockback = false;
e9knockbackRes = false;
e9onGround = true;
e9proximity = false;
e9touchWallL = false;
e9touchWallR = false;
e9breathhit = false;
e9clawhit = false;
e9frozen = false;
e9peaceful = false;
e9frRes = false;
e9BurnVul = false;
e9ShockVul = false;
e9peaceRes = true;
e9coins = false;
e9smoke = false;
e9smokeCT = 0;
e9coinValue = 0;
e9coinType = 0;
e9altAnimCT = 0;
#endregion
#region e10
e10spawn = true;
e10CT = 0;
e10timer = 0;
e10HP = 12;
e10armor = 0;
e10X = 8950;
e10Y = 1774;
e10projA_X = 8936;
e10projA_Y = 1814;
e10act = 0;
e10facing = 0;
e10frame = 0;
e10Opacity = 255;
e10invTimer = 0;
e10knockbackTimer = 0;
e10projHeight = 0;
e10projWidth = 0;
e10hitTimer = 0;
e10invBlink = 255;
e10Attack = 1;
e10FireVul = 0;
e10BoltVul = 1;
e10AcidVul = 0;
e10faceR = false;
e10invulnerable = false;
e10knockback = false;
e10knockbackRes = false;
e10onGround = true;
e10proximity = false;
e10touchWallL = false;
e10touchWallR = false;
e10breathhit = false;
e10clawhit = false;
e10frozen = false;
e10peaceful = false;
e10frRes = false;
e10BurnVul = false;
e10ShockVul = false;
e10peaceRes = true;
e10coins = false;
e10smoke = false;
e10smokeCT = 0;
e10coinValue = 0;
e10coinType = 0;
e10altAnimCT = 0;
#endregion
//stampede
#region e11
e11HP = 100;
e11X = -600;
e11spawn = true;
#endregion
#endregion
stage2e3 = true;
}
#endregion
#region toStage 2-4
if (toStage2e4 == true)
{
drawStages = new DrawStages(9, stageManager);
drawSky = new DrawSky(1, stageManager);
draw2e4 = new Draw2e4(true, stageManager);
loadOcean = new LoadOcean(1, stageManager);
loadArcher = new LoadArcher(true, stageManager);
loadCD = new LoadCD(true, stageManager);
loadSecurity = new LoadSecurity(true, stageManager);
loadHandler = new LoadHandler(true, stageManager);
loadSwordmaster = new LoadSwordmaster(true,
stageManager);
loadBone = new LoadBone(true, stageManager);
loadSax = new LoadSax(true, stageManager);
loadTuba = new LoadTuba(true, stageManager);
npc2e4 = new Npc2e4(true, stageManager);
playStageMusic = new PlayStageMusic(4, stageBGM);
puzzleCruise = new PuzzleCruise(true, stageManager);
loopFlameAtk = new LoopFlameAtk(true, breathSFX);
loopFireBreathAlt = new LoopFireBreathAlt(true,
breathSFX);
loopSpin = new LoopSpin(true, breathSFX);
drawTreasureText = new DrawTreasureText(7, stageManager,
languageType);
#region floor
floor1 = new Rectangle(507, 2555, 2887, 10);
#region West
floor2 = new Rectangle(505, 2481, 390, 10);
floor3 = new Rectangle(505, 2416, 339, 10);
floor4 = new Rectangle(505, 2357, 283, 10);
floor5 = new Rectangle(505, 2300, 227, 10);
floor6 = new Rectangle(505, 2245, 173, 10);
floor7 = new Rectangle(507, 2195, 127, 10);
floor8 = new Rectangle(508, 2149, 66, 10);
floor9 = new Rectangle(516, 2110, 2292, 10);
floor10 = new Rectangle(2523, 2064, 283, 10);
floor11 = new Rectangle(2564, 2011, 245, 10);
floor12 = new Rectangle(2611, 1949, 195, 10);
floor13 = new Rectangle(2653, 1897, 155, 10);
floor14 = new Rectangle(2691, 1849, 118, 10);
floor15 = new Rectangle(2721, 1808, 86, 10);
floor16 = new Rectangle(2756, 1758, 51, 10);
floor17 = new Rectangle(505, 1706, 2889, 10);
floor18 = new Rectangle(553, 1690, 316, 10);
floor19 = new Rectangle(552, 1644, 272, 10);
floor20 = new Rectangle(555, 1599, 241, 10);
floor21 = new Rectangle(556, 1554, 196, 10);
floor22 = new Rectangle(557, 1510, 156, 10);
floor23 = new Rectangle(556, 1468, 113, 10);
floor24 = new Rectangle(556, 1429, 83, 10);
floor25 = new Rectangle(555, 1394, 57, 10);
floor26 = new Rectangle(553, 1360, 28, 10);
floor27 = new Rectangle(539, 1322, 2314, 10);
floor28 = new Rectangle(2507, 1285, 346, 10);
floor29 = new Rectangle(2537, 1249, 316, 10);
floor30 = new Rectangle(2558, 1206, 293, 10);
floor31 = new Rectangle(2608, 1158, 243, 10);
floor32 = new Rectangle(2633, 1116, 218, 10);
floor33 = new Rectangle(2671, 1074, 180, 10);
floor34 = new Rectangle(2707, 1034, 144, 10);
floor35 = new Rectangle(2730, 997, 121, 10);
floor36 = new Rectangle(2766, 963, 85, 10);
floor37 = new Rectangle(0, 907, 3394, 10);
floor38 = new Rectangle(1268, 867, 742, 10);
floor39 = new Rectangle(1304, 824, 669, 10);
floor40 = new Rectangle(1345, 777, 593, 10);
floor41 = new Rectangle(1380, 732, 516, 10);
floor42 = new Rectangle(1418, 695, 444, 10);
floor43 = new Rectangle(1447, 659, 387, 10);
floor44 = new Rectangle(1477, 626, 320, 10);
floor45 = new Rectangle(1514, 597, 253, 10);
floor46 = new Rectangle(1546, 565, 180, 10);
floor47 = new Rectangle(0, 510, 3394, 10);
#endregion
#region East
floor48 = new Rectangle(2487, 2498, 118, 10);
floor49 = new Rectangle(2559, 2458, 95, 10);
floor50 = new Rectangle(2607, 2421, 106, 10);
floor51 = new Rectangle(2650, 2381, 142, 10);
floor52 = new Rectangle(2625, 2342, 93, 10);
floor53 = new Rectangle(2560, 2304, 106, 10);
floor54 = new Rectangle(2498, 2267, 122, 10);
floor55 = new Rectangle(2493, 2244, 98, 10);
floor56 = new Rectangle(2541, 2206, 103, 10);
floor57 = new Rectangle(2587, 2171, 100, 10);
floor58 = new Rectangle(2648, 2133, 139, 10);
floor59 = new Rectangle(2624, 2092, 93, 10);
floor60 = new Rectangle(2577, 2058, 93, 10);
floor61 = new Rectangle(2503, 2023, 100, 10);
floor62 = new Rectangle(2491, 1978, 111, 10);
floor63 = new Rectangle(2545, 1947, 111, 10);
floor64 = new Rectangle(2603, 1914, 120, 10);
floor65 = new Rectangle(2659, 1883, 129, 10);
floor66 = new Rectangle(2638, 1856, 94, 10);
floor67 = new Rectangle(2574, 1818, 92, 10);
floor68 = new Rectangle(2492, 1787, 121, 10);
floor69 = new Rectangle(2489, 1753, 100, 10);
floor70 = new Rectangle(1819, 1719, 1575, 10);
floor71 = new Rectangle(1623, 1755, 206, 10);
floor72 = new Rectangle(0, 1728, 1632, 10);
floor73 = new Rectangle(0, 1686, 477, 10);
floor74 = new Rectangle(0, 1656, 395, 10);
floor75 = new Rectangle(0, 1611, 314, 10);
floor76 = new Rectangle(0, 1564, 263, 10);
floor77 = new Rectangle(0, 1507, 212, 10);
floor78 = new Rectangle(0, 1447, 149, 10);
floor79 = new Rectangle(0, 1398, 103, 10);
floor80 = new Rectangle(0, 1354, 46, 10);
floor81 = new Rectangle(0, 1324, 598, 10);
floor82 = new Rectangle(809, 1327, 473, 10);
floor83 = new Rectangle(1415, 1271, 241, 10);
floor84 = new Rectangle(1653, 1205, 268, 10);
floor85 = new Rectangle(2056, 1182, 1338, 10);
floor86 = new Rectangle(2044, 932, 154, 10);
floor87 = new Rectangle(2349, 828, 1045, 10);
floor88 = new Rectangle(1470, 1061, 472, 10);
floor89 = new Rectangle(1070, 1057, 253, 10);
floor90 = new Rectangle(815, 965, 267, 10);
floor91 = new Rectangle(581, 1030, 137, 10);
floor92 = new Rectangle(312, 937, 160, 10);
floor93 = new Rectangle(150, 972, 93, 10);
floor94 = new Rectangle(0, 825, 125, 10);
floor95 = new Rectangle(476, 734, 613, 10);
#endregion
#endregion
#region temp wall
L1 = new Rectangle(-12, 1325, 6, 20);
L2 = new Rectangle(797, 1332, 6, 20);
L3 = new Rectangle(1403, 1276, 6, 20);
L4 = new Rectangle(2044, 1187, 6, 20);
L5 = new Rectangle(2032, 937, 6, 20);
L6 = new Rectangle(2337, 833, 6, 20);
L7 = new Rectangle(1458, 1066, 6, 20);
L8 = new Rectangle(1058, 1062, 6, 20);
L9 = new Rectangle(803, 970, 6, 20);
L10 = new Rectangle(569, 1035, 6, 20);
L11 = new Rectangle(300, 942, 6, 20);
L12 = new Rectangle(138, 977, 6, 20);
L13 = new Rectangle(-12, 830, 6, 20);
L14 = new Rectangle(464, 739, 6, 20);
R1 = new Rectangle(610, 1329, 6, 20);
R2 = new Rectangle(1294, 1332, 6, 20);
R3 = new Rectangle(1668, 1276, 6, 20);
R4 = new Rectangle(1933, 1210, 6, 20);
R5 = new Rectangle(3406, 1187, 6, 20);
R6 = new Rectangle(2210, 937, 6, 20);
R7 = new Rectangle(3406, 833, 6, 20);
R8 = new Rectangle(1954, 1066, 6, 20);
R9 = new Rectangle(1335, 1062, 6, 20);
R10 = new Rectangle(730, 1035, 6, 20);
R11 = new Rectangle(484, 942, 6, 20);
R12 = new Rectangle(255, 977, 6, 20);
R13 = new Rectangle(137, 830, 6, 20);
R14 = new Rectangle(1101, 739, 6, 20);
#endregion
#region wall
wall1 = new Rectangle(-12, 0, 20, 2900);
wall2 = new Rectangle(3390, 0, 20, 2900);
wall3 = new Rectangle(543, 1731, 6, 1127);
wall4 = new Rectangle(2807, 1731, 600, 379);
wall5 = new Rectangle(894, 1332, 6, 30);
wall6 = new Rectangle(2524, 1731, 6, 30);
wall7 = new Rectangle(2817, 1332, 6, 161);
wall8 = new Rectangle(552, 927, 6, 804);
wall9 = new Rectangle(2817, 927, 6, 405);
wall10 = new Rectangle(2508, 927, 6, 30);
wall12 = new Rectangle(533, 530, 6, 150);
wall13 = new Rectangle(1269, 530, 6, 30);
wall14 = new Rectangle(2009, 530, 6, 30);
wall15 = new Rectangle(2288, 1724, 6, 404);
wall16 = new Rectangle(1820, 1724, 6, 37);
wall17 = new Rectangle(1631, 1733, 6, 28);
wall18 = new Rectangle(1655, 1210, 6, 67);
wall19 = new Rectangle(1081, 970, 6, 93);
wall20 = new Rectangle(1718, 465, 6, 170);
wall21 = new Rectangle(1753, 611, 6, 134);
wall22 = new Rectangle(603, 0, 6, 500);
wall23 = new Rectangle(894, 2115, 6, 30);
wall24 = new Rectangle(1180, 557, 12, 500); //Flame
Pillar 3
wall25 = new Rectangle(533, 705, 6, 218); //Door L
wall26 = new Rectangle(2816, 687, 6, 218); //Door R
wall27 = new Rectangle(0, 1733, 1632, 40);
wall28 = new Rectangle(0, 1691, 477, 40);
wall29 = new Rectangle(0, 1661, 395, 40);
wall30 = new Rectangle(0, 1616, 314, 40);
wall31 = new Rectangle(0, 1569, 263, 40);
wall32 = new Rectangle(0, 1512, 212, 40);
wall33 = new Rectangle(0, 1452, 149, 40);
wall34 = new Rectangle(0, 1403, 103, 40);
wall35 = new Rectangle(0, 1359, 46, 40);
#endregion
#region roof
roof1 = new Rectangle(894, 2116, 1393, 10);
roof2 = new Rectangle(0, 1726, 2524, 10);
roof3 = new Rectangle(868, 1327, 2526, 10);
roof4 = new Rectangle(0, 922, 2508, 10);
roof5 = new Rectangle(0, 525, 1269, 10);
roof6 = new Rectangle(2009, 525, 1385, 10);
roof7 = new Rectangle(0, 133, 3394, 10);
roof8 = new Rectangle(2349, 828, 1045, 10);
roof9 = new Rectangle(455, 745, 1262, 10);
roof10 = new Rectangle(0, 465, 1719, 10);
roof11 = new Rectangle(1718, 611, 1676, 10);
roof12 = new Rectangle(1070, 1067, 253, 10);
roof13 = new Rectangle(1470, 1071, 322, 10);
#endregion
toStage2e4 = false;
stageEndCT = 0;
cameraMaxX = 2107;
cameraMaxY = 1916;
cameraMinY = 40;
drgnX = 1360;
drgnY = 2412;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
stage2e4Left = false;
stage2e4Right = false;
e20X = 400;
#region puzzle
door1CT = 0;
door1Frame = 0;
door2CT = 0;
door2Frame = 0;
fire1Wait = 0;
fire1CT = 0;
fire1Frame = 0;
fire1Act = 0;
fire1Freeze = 0;
fire2Wait = 0;
fire2CT = 0;
fire2Frame = 0;
fire2Act = 0;
fire2Freeze = 0;
fire3Wait = 0;
fire3CT = 0;
fire3Frame = 0;
fire3Act = 0;
fire3Freeze = 0;
fire4Wait = 0;
fire4CT = 0;
fire4Frame = 0;
fire4Act = 0;
fire4Freeze = 0;
fire5Wait = 0;
fire5CT = 0;
fire5Frame = 0;
fire5Act = 0;
fire5Freeze = 0;
haveKey = false;
door1Open = false;
door2Open = false;
#endregion
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
#region enemies
//swordmaster
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 45;
e1armor = 1;
e1X = 2246;
e1Y = 1573;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1projHeight = 0;
e1projWidth = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 3;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 0;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
//sax
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 17;
e2armor = 0;
e2X = 1600;
e2Y = 764;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2projHeight = 0;
e2projWidth = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 2;
e2BoltVul = 0;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = true;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 30;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
//trombone
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 26;
e3armor = 0;
e3X = 1141;
e3Y = 764;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3projHeight = 0;
e3projWidth = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 2;
e3BoltVul = 0;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = true;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 60;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
//tuba
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4reload = 121;
e4HP = 25;
e4armor = 0;
e4X = 2010;
e4Y = 764;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4projHeight = 0;
e4projWidth = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 2;
e4BoltVul = 0;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = true;
e4ShockVul = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 40;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
//handler - land
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 12;
e5armor = 0;
e5X = 1304;
e5Y = 1973;
e5projA_X = 10155;
e5projA_Y = 1922;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5projHeight = 0;
e5projWidth = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 1;
e5FireVul = 0;
e5BoltVul = 1;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = false;
e5ShockVul = false;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 40;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
//heavy CD
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6HP = 12;
e6armor = 2;
e6X = 900;
e6Y = 1184;
e6act = 0;
e6facing = 0;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 1;
e6FireVul = 0;
e6BoltVul = 0;
e6AcidVul = 2;
e6faceR = false;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = false;
e6BurnVul = false;
e6ShockVul = false;
e6peaceRes = false;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 30;
e6coinType = 0;
e6altAnimCT = 0;
#endregion
//archer
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 5;
e7armor = 0;
e7X = 1050;
e7Y = 1184;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 0;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = true;
e7ShockVul = false;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 40;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
//security
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 99;
e8armor = 99;
e8X = 809;
e8Y = 1585;
e8projA_X = 2800;
e8projA_Y = 1657;
e8act = 0;
e8facing = 0;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8projHeight = 0;
e8projWidth = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 2;
e8FireVul = 0;
e8BoltVul = 0;
e8AcidVul = 0;
e8faceR = false;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = true;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = false;
e8BurnVul = false;
e8ShockVul = false;
e8peaceRes = true;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 0;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
#region e9
e9spawn = true;
e9CT = 0;
e9timer = 0;
e9HP = 99;
e9armor = 99;
e9X = 1570;
e9Y = 918;
e9projA_X = 2800;
e9projA_Y = 990;
e9act = 0;
e9facing = 0;
e9frame = 0;
e9Opacity = 255;
e9invTimer = 0;
e9knockbackTimer = 0;
e9projHeight = 0;
e9projWidth = 0;
e9hitTimer = 0;
e9invBlink = 255;
e9Attack = 2;
e9FireVul = 0;
e9BoltVul = 0;
e9AcidVul = 0;
e9faceR = false;
e9invulnerable = false;
e9knockback = false;
e9knockbackRes = true;
e9onGround = true;
e9proximity = false;
e9touchWallL = false;
e9touchWallR = false;
e9breathhit = false;
e9clawhit = false;
e9frozen = false;
e9peaceful = false;
e9frRes = false;
e9BurnVul = false;
e9ShockVul = false;
e9peaceRes = true;
e9coins = false;
e9smoke = false;
e9smokeCT = 0;
e9coinValue = 0;
e9coinType = 0;
e9altAnimCT = 0;
#endregion
#endregion
stage2e4 = true;
}
#endregion
#region toStage 2-B
if (toStage2eB == true)
{
drawStages = new DrawStages(10, stageManager);
drawSky = new DrawSky(1, stageManager);
loadCaptain = new LoadCaptain(true, stageManager);
playStageMusic = new PlayStageMusic(9, stageBGM);
#region floor
floor1 = new Rectangle(0, 570, 779, 10);
floor2 = new Rectangle(778, 530, 551, 10);
#endregion
#region wall
wall1 = new Rectangle(-12, -2000, 6, 4000);
wall2 = new Rectangle(780, 535, 6, 41);
wall3 = new Rectangle(1282, -2000, 6, 4000);
#endregion
toStage2eB = false;
stageEndCT = 0;
cameraMaxX = 0;
cameraMaxY = 0;
drgnX = 993;
drgnY = 387;
drgnFacingDir = 13;
clawDir = 2;
breathDir = 6;
clawX = -80 - clawhitboxmod;
breathX = -196;
drgnFaceR = false;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = -3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = -3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = -3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = -3;
note4yVel = -2;
#endregion
#region Boss 2 Variables
shipExplosionCT = 0;
captainCT = 0;
captainFrame = 0;
captainAct = 0;
captainInvBlink = 255;
captainInvCounter = 0;
rocket1Z = 0;
rocket2Z = 0;
rocket3Z = 0;
rocket4Z = 0;
shipHP = 60;
captainAttackSide = false;
captainAttackTop = false;
captainAttackLaser = false;
standOnRocket = false;
rocketStandVel = 0;
captainReload = 0;
captainRNG = 0;
smoke1CT = 0;
smoke1Frame = 0;
smoke1Act = 0;
rocketDiag1X = 0;
rocketDiag1Y = 0;
smoke1On = false;
rocketDiag1X = 0;
rocketDiag1Y = 0;
rocketDiag1On = false;
smoke2CT = 0;
smoke2Frame = 0;
smoke2Act = 0;
rocketDiag2X = 0;
rocketDiag2Y = 0;
smoke2On = false;
rocketDiag2On = false;
smoke3CT = 0;
smoke3Frame = 0;
smoke3Act = 0;
rocketDiag3X = 0;
rocketDiag3Y = 0;
smoke3On = false;
rocketDiag3On = false;
smoke4CT = 0;
smoke4Frame = 0;
smoke4Act = 0;
rocketDiag4X = 0;
rocketDiag4Y = 0;
smoke4On = false;
rocketDiag4On = false;
rocket1Atk = 2;
rocket1CT = 0;
rocket1Frame = 0;
rocket1Act = 0;
rocket1Vel = 0;
rocket1VelTimer = 0;
rocket1On = false;
rocket1Move = false;
rocket2Atk = 2;
rocket2CT = 0;
rocket2Frame = 0;
rocket2Act = 0;
rocket2Vel = 0;
rocket2VelTimer = 0;
rocket2On = false;
rocket2Move = false;
rocket3Atk = 2;
rocket3CT = 0;
rocket3Frame = 0;
rocket3Act = 0;
rocket3Vel = 0;
rocket3VelTimer = 0;
rocket3On = false;
rocket3Move = false;
rocket4Atk = 2;
rocket4CT = 0;
rocket4Frame = 0;
rocket4Act = 0;
rocket4Vel = 0;
rocket4VelTimer = 0;
rocket4On = false;
rocket4Move = false;
rocket1X = 0;
rocket1Y = 0;
rocket2X = 0;
rocket2Y = 0;
rocket3X = 0;
rocket3Y = 0;
rocket4X = 0;
rocket4Y = 0;
scanAtk = 8;
scanCounter = 0;
scanLaserCT = 0;
scanLaserFrame = 0;
scanLaserX = 0;
scanLaserY = 0;
scanLaserOn = false;
trackerCT = 0;
trackerFrame = 0;
trackerVerticalX = 0;
trackerVerticalY = 0;
trackerHorizontalX = 0;
trackerHorizontalY = 0;
trackerOn = false;
#endregion
stage2eB = true;
}
#endregion
#region toStage 3-1
if (toStage3e1 == true)
{
drawStages = new DrawStages(11, stageManager);
drawSky = new DrawSky(3, stageManager);
loadOcean = new LoadOcean(2, stageManager);
loadHazmat = new LoadHazmat(true, stageManager);
loadLancer = new LoadLancer(true, stageManager);
loadCD = new LoadCD(true, stageManager);
loadArcher = new LoadArcher(true, stageManager);
loadToxicball = new LoadToxicball(true, stageManager);
npc3e1 = new Npc3e1(true, stageManager);
loopAcid = new LoopAcid(true, breathSFX);
playStageMusic = new PlayStageMusic(5, stageBGM);
drawTreasureText = new DrawTreasureText(8, stageManager,
languageType);
puzzleBoat = new PuzzleBoat(true, stageManager);
if (on2e2 == false && on3e2 == false)
{
tutorialOn = true;
}
#region floor
floor1 = new Rectangle(9305, 1303, 190, 20);
floor2 = new Rectangle(9252, 1327, 53, 20);
floor3 = new Rectangle(9221, 1369, 84, 20);
floor4 = new Rectangle(9177, 1417, 130, 20);
floor5 = new Rectangle(9125, 1467, 182, 20);
floor6 = new Rectangle(9067, 1519, 242, 20);
floor7 = new Rectangle(9026, 1574, 284, 20);
floor8 = new Rectangle(8974, 1630, 336, 20);
floor9 = new Rectangle(8921, 1676, 390, 20);
floor10 = new Rectangle(8764, 1719, 548, 20);
floor11 = new Rectangle(0, 1791, 10000, 20); // ACID
LAYER
floor12 = new Rectangle(5620, 1732, 1025, 20);
floor13 = new Rectangle(5980, 1707, 268, 20);
floor14 = new Rectangle(5963, 1658, 259, 20);
floor15 = new Rectangle(5954, 1604, 210, 20);
floor16 = new Rectangle(5938, 1549, 183, 20);
floor17 = new Rectangle(5924, 1501, 148, 20);
floor18 = new Rectangle(5905, 1445, 114, 20);
floor19 = new Rectangle(5897, 1393, 81, 20);
floor20 = new Rectangle(5888, 1349, 64, 20);
floor21 = new Rectangle(6169, 1310, 2773, 20);
floor22 = new Rectangle(4670, 1333, 1222, 20);
floor23 = new Rectangle(4154, 1333, 254, 20);
floor24 = new Rectangle(3519, 1333, 578, 20);
floor25 = new Rectangle(507, 1333, 2862, 20);
floor26 = new Rectangle(0, 1741, 659, 20);
floor27 = new Rectangle(224, 1656, 327, 20);
floor28 = new Rectangle(225, 1587, 278, 20);
floor29 = new Rectangle(225, 1526, 218, 20);
floor30 = new Rectangle(222, 1462, 170, 20);
floor31 = new Rectangle(219, 1407, 120, 20);
floor32 = new Rectangle(220, 1351, 61, 20);
floor33 = new Rectangle(0, 1318, 223, 20);
#endregion
#region temp wall
L1 = new Rectangle(6157, 1315, 6, 20);
L2 = new Rectangle(4658, 1338, 6, 20);
L3 = new Rectangle(4142, 1338, 6, 20);
L4 = new Rectangle(3507, 1338, 6, 20);
L5 = new Rectangle(495, 1338, 6, 20);
R1 = new Rectangle(8954, 1315, 6, 20);
R2 = new Rectangle(5904, 1338, 6, 20);
R3 = new Rectangle(4420, 1338, 6, 20);
R4 = new Rectangle(4109, 1338, 6, 20);
R5 = new Rectangle(3381, 1338, 6, 20);
#endregion
#region wall
wall1 = new Rectangle(9312, 1308, 6, 417);
wall2 = new Rectangle(6174, 1315, 6, 40);
wall3 = new Rectangle(8929, 1315, 6, 40);
wall4 = new Rectangle(5891, 1338, 6, 40);
wall5 = new Rectangle(220, 1323, 6, 424);
wall6 = new Rectangle(512, 1338, 6, 40);
wall7 = new Rectangle(0, 0, 6, 4000);
wall8 = new Rectangle(8749, 1724, 6, 1000);
wall9 = new Rectangle(6635, 1737, 6, 1000);
wall10 = new Rectangle(5625, 1737, 6, 1000);
wall11 = new Rectangle(650, 1746, 6, 1000);
wall12 = new Rectangle(285, 1356, 6, 1000);
wall13 = new Rectangle(343, 1412, 6, 1000);
wall14 = new Rectangle(396, 1477, 6, 1000);
wall15 = new Rectangle(447, 1531, 6, 1000);
wall16 = new Rectangle(507, 1592, 6, 1000);
wall17 = new Rectangle(555, 1661, 6, 1000);
wall18 = new Rectangle(9257, 1332, 6, 1000);
wall19 = new Rectangle(9226, 1374, 6, 1000);
wall20 = new Rectangle(9182, 1422, 6, 1000);
wall21 = new Rectangle(9130, 1472, 6, 1000);
wall22 = new Rectangle(9072, 1524, 6, 1000);
wall23 = new Rectangle(9031, 1579, 6, 1000);
wall24 = new Rectangle(8979, 1635, 6, 1000);
wall25 = new Rectangle(8926, 1681, 6, 1000);
wall26 = new Rectangle(9510, 0, 200, 2000);
#endregion
#region roof
roof1 = new Rectangle(1619, 1320, 2773, 10);
roof2 = new Rectangle(4670, 1333, 1222, 10);
roof3 = new Rectangle(507, 1336, 2862, 10);
#endregion
toStage3e1 = false;
stageEndCT = 0;
cameraMaxX = 8187;
cameraMaxY = 1160;
drgnX = 9310;
drgnY = 1160;
drgnFacingDir = 13;
clawDir = 2;
breathDir = 6;
clawX = -80 - clawhitboxmod;
breathX = -196;
drgnFaceR = false;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = -3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = -3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = -3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = -3;
note4yVel = -2;
#endregion
#region enemies
//archer
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 5;
e1armor = 0;
e1X = 1457;
e1Y = 1178;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = true;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 40;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 5;
e4armor = 0;
e4X = 6467;
e4Y = 1589;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 0;
e4BoltVul = 0;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = true;
e4ShockVul = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 40;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
//heavy CD
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 12;
e2armor = 2;
e2X = 1607;
e2Y = 1178;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 0;
e2AcidVul = 2;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = false;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 50;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
//lancer
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 28;
e3armor = 0;
e3X = 8000;
e3Y = 1167;
e3reload = 120;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3projHeight = 0;
e3projWidth = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 0;
e3BoltVul = 1;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = true;
e3BurnVul = false;
e3ShockVul = false;
e3peaceRes = true;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 110;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
//hazmat
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6HP = 16;
e6armor = 0;
e6X = 8200;
e6Y = 1172;
e6act = 1;
e6facing = 6;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6projHeight = 0;
e6projWidth = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 1;
e6FireVul = 1;
e6BoltVul = 0;
e6AcidVul = 0;
e6faceR = true;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = false;
e6BurnVul = false;
e6ShockVul = false;
e6peaceRes = true;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 40;
e6coinType = 0;
e6altAnimCT = 0;
#endregion
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 16;
e7armor = 0;
e7X = 5600;
e7Y = 1190;
e7act = 1;
e7facing = 6;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7projHeight = 0;
e7projWidth = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 1;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = true;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = false;
e7ShockVul = false;
e7peaceRes = true;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 60;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 16;
e8armor = 0;
e8X = 2700;
e8Y = 1178;
e8act = 1;
e8facing = 6;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8projHeight = 0;
e8projWidth = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 1;
e8FireVul = 1;
e8BoltVul = 0;
e8AcidVul = 0;
e8faceR = true;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = false;
e8BurnVul = false;
e8ShockVul = false;
e8peaceRes = true;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 40;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
#endregion
#region obstacles
obs1Wait = 180;
obs2Wait = 120;
obs3Wait = 60;
obs4Wait = 0;
obs5Wait = 180;
obs6Wait = 120;
obs7Wait = 160;
obs8Wait = 0;
obs9Wait = 180;
obs10Wait = 120;
#endregion
stage3e1 = true;
}
#endregion
#region toStage 3-2
if (toStage3e2 == true)
{
drawStages = new DrawStages(12, stageManager);
drawSky = new DrawSky(3, stageManager);
loadSwordmaster = new LoadSwordmaster(true,
stageManager);
loadXX = new LoadXX(true, stageManager);
loadCD = new LoadCD(true, stageManager);
loadTuba = new LoadTuba(true, stageManager);
loadLancer = new LoadLancer(true, stageManager);
loadHazmat = new LoadHazmat(true, stageManager);
playStageMusic = new PlayStageMusic(5, stageBGM);
loopFlame = new LoopFlame(true, breathSFX);
loopAcid = new LoopAcid(true, breathSFX);
loopFlameAtk = new LoopFlameAtk(true, breathSFX);
loopSpin = new LoopSpin(true, breathSFX);
loopFireBreathAlt = new LoopFireBreathAlt(true,
breathSFX);
drawTreasureText = new DrawTreasureText(9, stageManager,
languageType);
puzzleFlamewall = new PuzzleFlamewall(true,
stageManager);
#region floor
#region 1-10
floor1 = new Rectangle(9438, 1805, 738, 20);
floor2 = new Rectangle(8971, 1900, 475, 20);
floor3 = new Rectangle(8224, 1802, 753, 20);
floor4 = new Rectangle(7621, 1900, 608, 20);
floor5 = new Rectangle(6912, 1801, 718, 20);
floor6 = new Rectangle(6779, 1894, 140, 20);
floor7 = new Rectangle(5846, 1802, 940, 20);
floor8 = new Rectangle(4520, 1902, 1338, 20);
floor9 = new Rectangle(2856, 1820, 1670, 20);
floor10 = new Rectangle(2342, 1748, 572, 20);
#endregion
#region 11-20
floor11 = new Rectangle(2079, 1831, 315, 20);
floor12 = new Rectangle(1974, 1692, 158, 20);
floor13 = new Rectangle(1592, 1784, 398, 20);
floor14 = new Rectangle(1404, 1693, 206, 20);
floor15 = new Rectangle(1458, 1932, 614, 20);
floor16 = new Rectangle(0, 1844, 1466, 20);
floor17 = new Rectangle(8680, 1670, 189, 20);
floor18 = new Rectangle(8545, 1514, 142, 20);
floor19 = new Rectangle(8131, 1348, 427, 20);
floor20 = new Rectangle(8006, 1506, 152, 20);
#endregion
#region 21-30
floor21 = new Rectangle(7603, 1654, 552, 20);
floor22 = new Rectangle(7603, 1505, 177, 20);
floor23 = new Rectangle(8087, 1210, 231, 20);
floor24 = new Rectangle(8385, 1061, 159, 20);
floor25 = new Rectangle(8087, 1057, 109, 20);
floor26 = new Rectangle(7891, 914, 225, 20);
floor27 = new Rectangle(7590, 1214, 335, 20);
floor28 = new Rectangle(7348, 1364, 245, 20);
floor29 = new Rectangle(7168, 1214, 210, 20);
floor30 = new Rectangle(6833, 1068, 287, 20);
#endregion
#region 31-40
floor31 = new Rectangle(7217, 907, 421, 20);
floor32 = new Rectangle(7622, 764, 220, 20);
floor33 = new Rectangle(6397, 761, 680, 20);
floor34 = new Rectangle(6244, 911, 167, 20);
floor35 = new Rectangle(5935, 1067, 206, 20);
floor36 = new Rectangle(5935, 1209, 537, 20);
floor37 = new Rectangle(5546, 1502, 1645, 20);
floor38 = new Rectangle(5772, 1361, 214, 20);
floor39 = new Rectangle(4390, 1220, 1184, 20);
floor40 = new Rectangle(4757, 1061, 213, 20);
#endregion
#region 41-50
floor41 = new Rectangle(4924, 918, 493, 20);
floor42 = new Rectangle(4724, 763, 278, 20);
floor43 = new Rectangle(4932, 624, 277, 20);
floor44 = new Rectangle(4180, 477, 594, 20);
floor45 = new Rectangle(4051, 622, 546, 20);
floor46 = new Rectangle(4220, 763, 507, 20);
floor47 = new Rectangle(4048, 924, 538, 20);
floor48 = new Rectangle(4182, 1071, 535, 20);
floor49 = new Rectangle(3416, 1367, 990, 20);
floor50 = new Rectangle(3076, 1238, 388, 20);
#endregion
#region 51-60
floor51 = new Rectangle(3074, 1075, 170, 20);
floor52 = new Rectangle(3254, 932, 183, 20);
floor53 = new Rectangle(2674, 779, 440, 20);
floor54 = new Rectangle(3410, 608, 486, 20);
floor55 = new Rectangle(1615, 502, 1459, 20);
floor56 = new Rectangle(1852, 643, 438, 20);
floor57 = new Rectangle(2011, 792, 424, 20);
floor58 = new Rectangle(1865, 941, 420, 20);
floor59 = new Rectangle(1814, 1090, 610, 20);
floor60 = new Rectangle(1663, 1237, 1024, 20);
#endregion
#region 61-70
floor61 = new Rectangle(1027, 941, 838, 20);
floor62 = new Rectangle(1182, 802, 161, 20);
floor63 = new Rectangle(1024, 650, 205, 20);
floor64 = new Rectangle(769, 512, 289, 20);
floor65 = new Rectangle(639, 651, 216, 20);
floor66 = new Rectangle(413, 511, 233, 20);
floor67 = new Rectangle(787, 805, 219, 20);
floor68 = new Rectangle(632, 952, 229, 20);
floor69 = new Rectangle(774, 1106, 242, 20);
floor70 = new Rectangle(627, 1261, 222, 20);
#endregion
#region 71-73
floor71 = new Rectangle(828, 1400, 121, 20);
floor72 = new Rectangle(933, 1563, 140, 20);
floor73 = new Rectangle(1059, 1690, 135, 20);
#endregion
#endregion
#region temp wall
L1 = new Rectangle(8373, 1066, 6, 20);
L2 = new Rectangle(7205, 912, 6, 20);
L3 = new Rectangle(6232, 916, 6, 20);
L4 = new Rectangle(5760, 1366, 6, 20);
L5 = new Rectangle(4912, 923, 6, 20);
L6 = new Rectangle(4920, 629, 6, 20);
L7 = new Rectangle(4168, 482, 6, 20);
L8 = new Rectangle(4208, 768, 6, 20);
L9 = new Rectangle(3242, 937, 6, 20);
L10 = new Rectangle(1802, 1095, 6, 20);
L11 = new Rectangle(1999, 797, 6, 20);
L12 = new Rectangle(1170, 807, 6, 20);
L13 = new Rectangle(757, 517, 6, 20);
L14 = new Rectangle(401, 516, 6, 20);
L15 = new Rectangle(775, 810, 6, 20);
L16 = new Rectangle(762, 1111, 6, 20);
R1 = new Rectangle(7792, 1510, 6, 20);
R2 = new Rectangle(8330, 1215, 6, 20);
R3 = new Rectangle(8208, 1062, 6, 20);
R4 = new Rectangle(7132, 1073, 6, 20);
R5 = new Rectangle(7089, 766, 6, 20);
R6 = new Rectangle(6153, 1072, 6, 20);
R7 = new Rectangle(4982, 1066, 6, 20);
R8 = new Rectangle(5014, 768, 6, 20);
R9 = new Rectangle(4609, 627, 6, 20);
R10 = new Rectangle(4598, 929, 6, 20);
R11 = new Rectangle(3256, 1080, 6, 20);
R12 = new Rectangle(2302, 648, 6, 20);
R13 = new Rectangle(2299, 946, 6, 20);
R14 = new Rectangle(1241, 655, 6, 20);
R15 = new Rectangle(867, 656, 6, 20);
R16 = new Rectangle(873, 957, 6, 20);
R17 = new Rectangle(1218, 1695, 6, 20);
#endregion
#region wall
wall1 = new Rectangle(9439, 1810, 6, 96);
wall2 = new Rectangle(8973, 1807, 6, 99);
wall3 = new Rectangle(8226, 1807, 6, 99);
wall4 = new Rectangle(7625, 1806, 6, 100);
wall5 = new Rectangle(6914, 1806, 6, 94);
wall6 = new Rectangle(6781, 1807, 6, 93);
wall7 = new Rectangle(5850, 1807, 6, 101);
wall8 = new Rectangle(4522, 1825, 6, 83);
wall9 = new Rectangle(2900, 1753, 6, 73);
wall10 = new Rectangle(2349, 1753, 6, 84);
wall11 = new Rectangle(2083, 1836, 6, 102);
wall12 = new Rectangle(2122, 1697, 6, 140);
wall13 = new Rectangle(1979, 1697, 6, 68);
wall14 = new Rectangle(1600, 1698, 6, 72);
wall15 = new Rectangle(1460, 1849, 6, 89);
wall16 = new Rectangle(1038, 1568, 6, 218);
wall17 = new Rectangle(10186, 0, 6, 3000);
wall18 = new Rectangle(912, 1405, 6, 164);
wall19 = new Rectangle(808, 1266, 6, 140);
wall20 = new Rectangle(607, 516, 6, 751);
wall21 = new Rectangle(1005, 517, 6, 595);
wall22 = new Rectangle(1362, 0, 6, 803);
wall23 = new Rectangle(1628, 507, 6, 248);
wall24 = new Rectangle(1848, 648, 6, 299);
wall25 = new Rectangle(1643, 947, 6, 297);
wall26 = new Rectangle(2443, 507, 6, 589);
wall27 = new Rectangle(2694, 507, 6, 100);
wall28 = new Rectangle(2680, 784, 6, 459);
wall29 = new Rectangle(3050, 507, 6, 100);
wall30 = new Rectangle(3047, 784, 6, 460);
wall31 = new Rectangle(3533, 0, 6, 446);
wall32 = new Rectangle(3895, 442, 6, 167);
wall33 = new Rectangle(3446, 613, 6, 325);
wall34 = new Rectangle(3416, 1243, 6, 130);
wall35 = new Rectangle(4038, 162, 6, 1075);
wall36 = new Rectangle(4193, 1076, 6, 160);
wall37 = new Rectangle(4405, 1225, 6, 148);
wall38 = new Rectangle(4737, 482, 6, 595);
wall39 = new Rectangle(5209, 0, 6, 919);
wall40 = new Rectangle(5546, 1226, 6, 283);
wall41 = new Rectangle(5995, 1214, 6, 153);
wall42 = new Rectangle(6433, 1214, 6, 160);
wall43 = new Rectangle(6410, 766, 6, 280);
wall44 = new Rectangle(6833, 766, 6, 563);
wall45 = new Rectangle(7190, 1219, 6, 289);
wall46 = new Rectangle(7348, 1219, 6, 151);
wall47 = new Rectangle(7601, 1219, 30, 441);
wall48 = new Rectangle(7919, 919, 6, 300);
wall49 = new Rectangle(8157, 1353, 6, 307);
wall50 = new Rectangle(7637, 769, 6, 144);
wall51 = new Rectangle(7841, 0, 6, 765);
wall52 = new Rectangle(8087, 919, 6, 267);
wall53 = new Rectangle(8545, 0, 6, 1200);
wall54 = new Rectangle(8545, 1353, 6, 167);
wall55 = new Rectangle(8670, 1519, 6, 157);
wall56 = new Rectangle(5904, 0, 6, 1210);
#endregion
#region roof
roof1 = new Rectangle(8670, 1649, 180, 10);
roof2 = new Rectangle(8010, 1487, 147, 10);
roof3 = new Rectangle(7602, 1655, 555, 10);
roof4 = new Rectangle(7602, 1483, 174, 10);
roof5 = new Rectangle(8387, 1038, 160, 10);
roof6 = new Rectangle(8087, 1033, 109, 10);
roof7 = new Rectangle(7609, 1193, 700, 10);
roof8 = new Rectangle(7634, 746, 207, 10);
roof9 = new Rectangle(6830, 744, 243, 10);
roof10 = new Rectangle(6248, 888, 162, 10);
roof11 = new Rectangle(5925, 1044, 212, 10);
roof12 = new Rectangle(5925, 1190, 505, 10);
roof13 = new Rectangle(5773, 1335, 222, 10);
roof14 = new Rectangle(4946, 901, 998, 10);
roof15 = new Rectangle(4952, 604, 257, 10);
roof16 = new Rectangle(4182, 460, 510, 10);
roof17 = new Rectangle(4050, 605, 559, 10);
roof18 = new Rectangle(4197, 745, 782, 10);
roof19 = new Rectangle(4038, 903, 546, 10);
roof20 = new Rectangle(4215, 1050, 752, 10);
roof21 = new Rectangle(3075, 1058, 150, 10);
roof22 = new Rectangle(3273, 907, 174, 10);
roof23 = new Rectangle(3534, 441, 361, 10);
roof24 = new Rectangle(2695, 610, 355, 10);
roof25 = new Rectangle(1833, 1066, 600, 10);
roof26 = new Rectangle(1069, 921, 1218, 10);
roof27 = new Rectangle(2001, 770, 432, 10);
roof28 = new Rectangle(1870, 628, 419, 10);
roof29 = new Rectangle(1631, 484, 1415, 10);
roof30 = new Rectangle(1204, 780, 158, 10);
roof31 = new Rectangle(1006, 628, 201, 10);
roof32 = new Rectangle(792, 489, 202, 10);
roof33 = new Rectangle(620, 626, 216, 10);
roof34 = new Rectangle(808, 782, 199, 10);
roof35 = new Rectangle(608, 928, 232, 10);
roof36 = new Rectangle(795, 1079, 210, 10);
roof37 = new Rectangle(1029, 1666, 124, 10);
roof38 = new Rectangle(1419, 1685, 175, 10);
roof39 = new Rectangle(1601, 1771, 373, 10);
roof40 = new Rectangle(1979, 1692, 140, 10);
roof41 = new Rectangle(913, 1563, 120, 10);
roof42 = new Rectangle(5546, 1502, 1645, 10);
roof43 = new Rectangle(6411, 1044, 704, 10);
roof44 = new Rectangle(7267, 887, 371, 10);
roof45 = new Rectangle(8545, 1514, 112, 10);
#endregion
toStage3e2 = false;
stageEndCT = 0;
cameraMaxX = 8895;
cameraMaxY = 1253;
cameraMinY = 150;
drgnX = 10038;
drgnY = 1662;
drgnFacingDir = 13;
clawDir = 2;
breathDir = 6;
clawX = -80 - clawhitboxmod;
breathX = -196;
drgnFaceR = false;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = -3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = -3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = -3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = -3;
note4yVel = -2;
#endregion
s3e2enemiesOn = true;
#region puzzle
flameWallX = 0;
flameWallVel = 0;
sprinklerCT = 0;
sprinklerFrame = 0;
sprinkler1Frozen = 0;
sprinkler2Frozen = 0;
sprinkler3Frozen = 0;
sprinkler4Frozen = 0;
sprinkler5Frozen = 0;
sprinkler6Frozen = 0;
sprinkler7Frozen = 0;
sprinkler1HP = 60;
sprinkler2HP = 60;
sprinkler3HP = 60;
sprinkler4HP = 60;
sprinkler5HP = 60;
sprinkler6HP = 60;
sprinkler7HP = 60;
tempVolumeA = 0;
#endregion
#region enemies
//tuba
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1reload = 121;
e1HP = 25;
e1armor = 0;
e1X = 6200;
e1Y = 1659;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1projHeight = 0;
e1projWidth = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 2;
e1BoltVul = 0;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = true;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 80;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2reload = 121;
e2HP = 25;
e2armor = 0;
e2X = 2606;
e2Y = 1605;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2projHeight = 0;
e2projWidth = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 2;
e2BoltVul = 0;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = true;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 90;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
//swordmaster
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 150;
e3armor = 1;
e3X = 6912;
e3Y = 1677;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3projHeight = 0;
e3projWidth = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 3;
e3FireVul = 0;
e3BoltVul = 0;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = false;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 1000;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
//lancer
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 28;
e4armor = 0;
e4X = 5120;
e4Y = 1677;
e4reload = 120;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4projHeight = 0;
e4projWidth = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 0;
e4BoltVul = 1;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = true;
e4BurnVul = false;
e4ShockVul = false;
e4peaceRes = true;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 110;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
//heavy XX
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 50;
e5armor = 5;
e5X = 1388;
e5Y = 1701;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 1;
e5FireVul = 0;
e5BoltVul = 0;
e5AcidVul = 2;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = false;
e5ShockVul = false;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 300;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
//hazmat
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6HP = 16;
e6armor = 0;
e6X = 7802;
e6Y = 1511;
e6act = 1;
e6facing = 6;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6projHeight = 0;
e6projWidth = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 1;
e6FireVul = 1;
e6BoltVul = 0;
e6AcidVul = 0;
e6faceR = true;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = false;
e6BurnVul = false;
e6ShockVul = false;
e6peaceRes = true;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 40;
e6coinType = 0;
e6altAnimCT = 0;
#endregion
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 16;
e7armor = 0;
e7X = 3500;
e7Y = 1677;
e7act = 1;
e7facing = 6;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7projHeight = 0;
e7projWidth = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 1;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = true;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = false;
e7ShockVul = false;
e7peaceRes = true;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 40;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
#endregion
stage3e2 = true;
}
#endregion
#region toStage 3-3
if (toStage3e3 == true)
{
drawStages = new DrawStages(13, stageManager);
drawSky = new DrawSky(3, stageManager);
loadBone = new LoadBone(true, stageManager);
loadSax = new LoadSax(true, stageManager);
loadArcher = new LoadArcher(true, stageManager);
loadHazmat = new LoadHazmat(true, stageManager);
playStageMusic = new PlayStageMusic(5, stageBGM);
loopAcid = new LoopAcid(true, breathSFX);
puzzleRock = new PuzzleRock(true, stageManager);
drawTreasureText = new DrawTreasureText(10,
stageManager, languageType);
#region floor
floor1 = new Rectangle(3102, floor1y = 5200, 6098, 50);
floor2 = new Rectangle(6202, floor2y = 5063, 453, 20);
floor3 = new Rectangle(6759, floor3y = 4947, 418, 20);
floor4 = new Rectangle(7315, floor4y = 4818, 352, 20);
floor5 = new Rectangle(7847, floor5y = 4694, 175, 20);
floor6 = new Rectangle(7518, floor6y = 4634, 147, 20);
floor7 = new Rectangle(8117, floor7y = 4572, 173, 20);
floor8 = new Rectangle(7775, floor8y = 4443, 198, 20);
floor9 = new Rectangle(7205, floor9y = 4446, 294, 20);
floor10 = new Rectangle(6962, floor10y = 4328, 90, 20);
floor11 = new Rectangle(6764, floor11y = 4200, 53, 20);
floor12 = new Rectangle(6563, floor12y = 4076, 59, 20);
floor13 = new Rectangle(6158, floor13y = 4071, 193, 20);
floor14 = new Rectangle(6735, floor14y = 3949, 248, 20);
floor15 = new Rectangle(7107, floor15y = 3821, 770, 20);
floor16 = new Rectangle(6974, floor16y = 3700, 106, 20);
floor17 = new Rectangle(7444, floor17y = 3697, 94, 20);
floor18 = new Rectangle(6575, floor18y = 3572, 240, 20);
floor19 = new Rectangle(7680, floor19y = 3568, 56, 20);
floor20 = new Rectangle(7935, floor20y = 3560, 56, 20);
floor21 = new Rectangle(8110, floor21y = 3446, 185, 20);
floor22 = new Rectangle(6242, floor22y = 3445, 271, 20);
floor23 = new Rectangle(6847, floor23y = 3314, 43, 20);
floor24 = new Rectangle(7060, floor24y = 3317, 33, 20);
floor25 = new Rectangle(7276, floor25y = 3318, 40, 20);
floor26 = new Rectangle(7441, floor26y = 3318, 32, 20);
floor27 = new Rectangle(7636, floor27y = 3318, 49, 20);
floor28 = new Rectangle(7890, floor28y = 3311, 79, 20);
floor29 = new Rectangle(6271, floor29y = 3187, 432, 20);
floor30 = new Rectangle(6851, floor30y = 3066, 112, 20);
floor31 = new Rectangle(7258, floor31y = 3070, 50, 20);
floor32 = new Rectangle(7401, floor32y = 3070, 48, 20);
floor33 = new Rectangle(7536, floor33y = 3070, 49, 20);
floor34 = new Rectangle(7681, floor34y = 3072, 49, 20);
floor35 = new Rectangle(7084, floor35y = 2939, 59, 20);
floor36 = new Rectangle(7773, floor36y = 2940, 158, 20);
floor37 = new Rectangle(7642, floor37y = 2817, 54, 20);
floor38 = new Rectangle(7302, floor38y = 2689, 249, 20);
floor39 = new Rectangle(7119, floor39y = 2572, 89, 20);
floor40 = new Rectangle(6820, floor40y = 2440, 185, 20);
floor41 = new Rectangle(6620, floor41y = 2314, 47, 20);
floor42 = new Rectangle(6466, floor42y = 2188, 39, 20);
floor43 = new Rectangle(6560, floor43y = 2060, 43, 20);
floor44 = new Rectangle(6459, floor44y = 1939, 42, 20);
floor45 = new Rectangle(6579, floor45y = 1817, 42, 20);
floor46 = new Rectangle(6757, floor46y = 1816, 183, 20);
floor47 = new Rectangle(6666, floor47y = 1687, 43, 20);
floor48 = new Rectangle(6760, floor48y = 1568, 43, 20);
floor49 = new Rectangle(6594, floor49y = 1444, 85, 20);
floor50 = new Rectangle(6916, floor50y = 1449, 52, 20);
floor51 = new Rectangle(7097, floor51y = 1447, 80, 20);
floor52 = new Rectangle(7288, floor52y = 1448, 50, 20);
floor53 = new Rectangle(7448, floor53y = 1564, 34, 20);
floor54 = new Rectangle(7518, floor54y = 1690, 37, 20);
floor55 = new Rectangle(7593, floor55y = 1810, 31, 20);
floor56 = new Rectangle(7661, floor56y = 1934, 37, 20);
floor57 = new Rectangle(7759, floor57y = 2064, 56, 20);
floor58 = new Rectangle(7826, floor58y = 2192, 2091,
20);
floor59 = new Rectangle(8032, floor59y = 1944, 732, 20);
floor60 = new Rectangle(3624, floor60y = 3530, 2526,
20); //NO CHANGE
floor61 = new Rectangle(5531, floor61y = 3275, 197, 20);
floor62 = new Rectangle(4433, floor62y = 3149, 545, 20);
floor63 = new Rectangle(5172, floor63y = 3143, 263, 20);
floor64 = new Rectangle(4225, floor64y = 3017, 98, 20);
floor65 = new Rectangle(5509, floor65y = 3019, 123, 20);
floor66 = new Rectangle(5780, floor66y = 3014, 207, 20);
floor67 = new Rectangle(4457, floor67y = 2896, 948, 20);
floor68 = new Rectangle(4228, floor68y = 2768, 180, 20);
floor69 = new Rectangle(4623, floor69y = 2641, 313, 20);
floor70 = new Rectangle(4215, floor70y = 2525, 321, 20);
floor71 = new Rectangle(5045, floor71y = 2523, 63, 20);
floor72 = new Rectangle(5200, floor72y = 2520, 49, 20);
floor73 = new Rectangle(5335, floor73y = 2525, 250, 20);
floor74 = new Rectangle(4372, floor74y = 2390, 338, 20);
floor75 = new Rectangle(5443, floor75y = 2396, 44, 20);
floor76 = new Rectangle(5643, floor76y = 2397, 97, 20);
floor77 = new Rectangle(4227, floor77y = 2270, 68, 20);
floor78 = new Rectangle(5146, floor78y = 2276, 117, 20);
floor79 = new Rectangle(5353, floor79y = 2279, 42, 20);
floor80 = new Rectangle(4358, floor80y = 2143, 186, 20);
floor81 = new Rectangle(4718, floor81y = 2153, 324, 20);
floor82 = new Rectangle(5110, floor82y = 2153, 41, 20);
floor83 = new Rectangle(5278, floor83y = 2155, 45, 20);
floor84 = new Rectangle(4608, floor84y = 2021, 44, 20);
floor85 = new Rectangle(5384, floor85y = 2030, 43, 20);
floor86 = new Rectangle(4405, floor86y = 1900, 148, 20);
floor87 = new Rectangle(4703, floor87y = 1903, 43, 20);
floor88 = new Rectangle(5472, floor88y = 1897, 43, 20);
floor89 = new Rectangle(4829, floor89y = 1778, 38, 20);
floor90 = new Rectangle(5373, floor90y = 1777, 46, 20);
floor91 = new Rectangle(4729, floor91y = 1634, 47, 20);
floor92 = new Rectangle(5295, floor92y = 1646, 41, 20);
floor93 = new Rectangle(4863, floor93y = 1520, 371, 20);
floor94 = new Rectangle(5403, floor94y = 1517, 49, 20);
floor95 = new Rectangle(5293, floor95y = 1404, 33, 20);
floor96 = new Rectangle(5187, floor96y = 1278, 41, 20);
floor97 = new Rectangle(5293, floor97y = 1155, 48, 20);
floor98 = new Rectangle(5366, floor98y = 1030, 40, 20);
floor99 = new Rectangle(5444, floor99y = 907, 43, 20);
floor100 = new Rectangle(5180, floor100y = 781, 121,
20);
floor101 = new Rectangle(5105, floor101y = 652, 41, 20);
floor102 = new Rectangle(5033, floor102y = 533, 46, 20);
floor103 = new Rectangle(5125, floor103y = 405, 34, 20);
floor104 = new Rectangle(5070, floor104y = 287, 27, 20);
floor105 = new Rectangle(3394, floor105y = 2331, 471,
20); //NO CHANGE
floor106 = new Rectangle(3892, floor106y = 2779, 35,
20); // NO CHANGE
floor107 = new Rectangle(3926, floor107y = 3059, 53,
20); //NO CHANGE
floor108 = new Rectangle(3307, floor108y = 2696, 166,
20); // NO CHANGE
floor109 = new Rectangle(3229, floor109y = 3227, 167,
20); // NO CHANGE
floor110 = new Rectangle(3175, floor110y = 3694, 99,
20); // NO CHANGE
floor111 = new Rectangle(3115, floor111y = 3921, 160,
20); //NO CHANGE
floor112 = new Rectangle(3031, floor112y = 4516, 177,
20); // NO CHANGE
floor113 = new Rectangle(2988, floor113y = 5112, 649,
20); // NO CHANGE
floor114 = new Rectangle(2355, floor114y = 369, 29, 20);
floor115 = new Rectangle(2308, floor115y = 500, 31, 20);
floor116 = new Rectangle(2255, floor116y = 625, 33, 20);
floor117 = new Rectangle(2371, floor117y = 624, 40, 20);
floor118 = new Rectangle(2464, floor118y = 621, 35, 20);
floor119 = new Rectangle(1907, floor119y = 750, 37, 20);
floor120 = new Rectangle(2332, floor120y = 750, 134,
20);
floor121 = new Rectangle(1813, floor121y = 872, 30, 20);
floor122 = new Rectangle(1772, floor122y = 1004, 32,
20);
floor123 = new Rectangle(2346, floor123y = 989, 33, 20);
floor124 = new Rectangle(1733, floor124y = 1123, 33,
20);
floor125 = new Rectangle(2459, floor125y = 1116, 138,
20);
floor126 = new Rectangle(1787, floor126y = 1252, 30,
20);
floor127 = new Rectangle(2681, floor127y = 1246, 50,
20);
floor128 = new Rectangle(1719, floor128y = 1367, 229,
20);
floor129 = new Rectangle(2731, floor129y = 1371, 33,
20);
floor130 = new Rectangle(1982, floor130y = 1486, 36,
20);
floor131 = new Rectangle(2862, floor131y = 1495, 49,
20);
floor132 = new Rectangle(1926, floor132y = 1618, 28,
20);
floor133 = new Rectangle(2942, floor133y = 1617, 66,
20);
floor134 = new Rectangle(1980, floor134y = 1742, 26,
20);
floor135 = new Rectangle(2731, floor135y = 1733, 156,
20);
floor136 = new Rectangle(2055, floor136y = 1866, 46,
20);
floor137 = new Rectangle(2649, floor137y = 1860, 37,
20);
floor138 = new Rectangle(2141, floor138y = 1989, 51,
20);
floor139 = new Rectangle(2742, floor139y = 1988, 39,
20);
floor140 = new Rectangle(2209, floor140y = 2106, 36,
20);
floor141 = new Rectangle(2826, floor141y = 2102, 34,
20);
floor142 = new Rectangle(2251, floor142y = 2233, 33,
20);
floor143 = new Rectangle(2896, floor143y = 2234, 40,
20);
floor144 = new Rectangle(1756, floor144y = 2356, 35,
20);
floor145 = new Rectangle(2203, floor145y = 2356, 39,
20);
floor146 = new Rectangle(3017, floor146y = 2355, 275,
20);
floor147 = new Rectangle(1667, floor147y = 2486, 37,
20);
floor148 = new Rectangle(1886, floor148y = 2485, 133,
20);
floor149 = new Rectangle(2083, floor149y = 2484, 22,
20);
floor150 = new Rectangle(2610, floor150y = 2482, 280,
20);
floor151 = new Rectangle(1618, floor151y = 2754, 106,
20);
floor152 = new Rectangle(1853, floor152y = 2749, 67,
20);
floor153 = new Rectangle(2161, floor153y = 2735, 375,
20);
floor154 = new Rectangle(2987, floor154y = 2726, 123,
20);
floor155 = new Rectangle(2024, floor155y = 2863, 55,
20);
floor156 = new Rectangle(2688, floor156y = 2981, 172,
20);
floor157 = new Rectangle(2485, floor157y = 3219, 137,
20);
floor158 = new Rectangle(2977, floor158y = 3223, 38,
20);
floor159 = new Rectangle(2917, floor159y = 3352, 25,
20);
floor160 = new Rectangle(1797, floor160y = 3473, 248,
20);
floor161 = new Rectangle(2284, floor161y = 3468, 134,
20);
floor162 = new Rectangle(2989, floor162y = 3469, 37,
20);
floor163 = new Rectangle(1403, floor163y = 3662, 37,
20);
floor164 = new Rectangle(2400, floor164y = 3660, 459,
20);
floor165 = new Rectangle(1530, floor165y = 3788, 98,
20);
floor166 = new Rectangle(2043, floor166y = 3781, 275,
20);
floor167 = new Rectangle(1285, floor167y = 3914, 37,
20);
floor168 = new Rectangle(1443, floor168y = 3909, 44,
20);
floor169 = new Rectangle(1871, floor169y = 3913, 114,
20);
floor170 = new Rectangle(2895, floor170y = 3912, 38,
20);
floor171 = new Rectangle(1225, floor171y = 4033, 254,
20);
floor172 = new Rectangle(2884, floor172y = 4021, 212,
20);
floor173 = new Rectangle(1558, floor173y = 4156, 279,
20);
floor174 = new Rectangle(2710, floor174y = 4153, 133,
20);
floor175 = new Rectangle(1894, floor175y = 4282, 708,
20);
floor176 = new Rectangle(2632, floor176y = 4401, 39,
20);
floor177 = new Rectangle(1291, floor177y = 4535, 48,
20);
floor178 = new Rectangle(1370, floor178y = 4532, 35,
20);
floor179 = new Rectangle(1625, floor179y = 4528, 151,
20);
floor180 = new Rectangle(2710, floor180y = 4523, 58,
20);
floor181 = new Rectangle(1209, floor181y = 4662, 381,
20);
floor182 = new Rectangle(1836, floor182y = 4662, 41,
20);
floor183 = new Rectangle(2609, floor183y = 4652, 41,
20);
floor184 = new Rectangle(2343, floor184y = 4781, 85,
20);
floor185 = new Rectangle(2511, floor185y = 4777, 43,
20);
floor186 = new Rectangle(1832, floor186y = 4916, 34,
20);
floor187 = new Rectangle(2444, floor187y = 4910, 39,
20);
floor188 = new Rectangle(2093, floor188y = 5033, 305,
20);
floor189 = new Rectangle(2476, floor189y = 5152, 303,
20);
floor190 = new Rectangle(1610, floor190y = 5280, 53,
20);
floor191 = new Rectangle(1852, floor191y = 5276, 199,
20);
floor192 = new Rectangle(2914, floor192y = 5284, 47,
20);
floor193 = new Rectangle(0, floor193y = 5416, 2997, 20);
//NO CHANGE
floor194 = new Rectangle(1753, floor194y = 2613, 44,
20);
#endregion
#region wall
wall1 = new Rectangle(6108, 3536, 6, 2166);
wall2 = new Rectangle(8321, 0, 6, 1944);
wall3 = new Rectangle(8321, 2198, 6, 5000);
wall4 = new Rectangle(7916, 2198, 6, 742);
wall5 = new Rectangle(3402, 3292, 6, 1613);
wall6 = new Rectangle(3636, 3542, 6, 2173);
wall7 = new Rectangle(3978, 3064, 6, 221);
wall8 = new Rectangle(3926, 2784, 6, 282);
wall9 = new Rectangle(3864, 2336, 6, 451);
wall10 = new Rectangle(3394, 2336, 6, 367);
wall11 = new Rectangle(3307, 2701, 6, 536);
wall12 = new Rectangle(3229, 3232, 6, 480);
wall13 = new Rectangle(3175, 3694, 6, 228);
wall14 = new Rectangle(3115, 3926, 6, 658);
wall15 = new Rectangle(3031, 4521, 6, 382);
wall16 = new Rectangle(2988, 5117, 6, 329);
wall17 = new Rectangle(1184, 0, 6, 4662);
#endregion
#region roof
roof1 = new Rectangle(3382, 3292, 629, 10);
roof2 = new Rectangle(3012, 4095, 402, 10);
roof3 = new Rectangle(8027, 1944, 739, 10);
#endregion
toStage3e3 = false;
stageEndCT = 0;
cameraMaxX = 7021;
cameraMaxY = 4597;
drgnX = 8181;
drgnY = 5058;
drgnOnGround = true;
drgnFacingDir = 13;
clawDir = 2;
breathDir = 6;
clawX = -80 - clawhitboxmod;
breathX = -196;
drgnFaceR = false;
guardAct = 0;
guardFrame = 0;
guardCT = 0;
doorYPos = 0;
boulderHP = 420;
boulderCT = 0;
boulderFrame = 0;
doorOpen = false;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = -3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = -3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = -3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = -3;
note4yVel = -2;
#endregion
#region enemies
//cannoneer
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 26;
e1armor = 0;
e1X = 6287;
e1Y = 3302;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1projHeight = 0;
e1projWidth = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 2;
e1BoltVul = 0;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = true;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 60;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 26;
e2armor = 0;
e2X = 3594;
e2Y = 2188;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2projHeight = 0;
e2projWidth = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 2;
e2BoltVul = 0;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = true;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 60;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 26;
e3armor = 0;
e3X = 1897;
e3Y = 5133;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3projHeight = 0;
e3projWidth = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 2;
e3BoltVul = 0;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = true;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 60;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
//mortar
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 17;
e4armor = 0;
e4X = 7297;
e4Y = 2546;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4projHeight = 0;
e4projWidth = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 2;
e4BoltVul = 0;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = true;
e4ShockVul = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 30;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 17;
e5armor = 0;
e5X = 5151;
e5Y = 2133;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5projHeight = 0;
e5projWidth = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 1;
e5FireVul = 2;
e5BoltVul = 0;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = true;
e5ShockVul = false;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 30;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
#region e9
e9spawn = true;
e9CT = 0;
e9timer = 0;
e9HP = 17;
e9armor = 0;
e9X = 2188;
e9Y = 4890;
e9act = 0;
e9facing = 0;
e9frame = 0;
e9Opacity = 255;
e9invTimer = 0;
e9knockbackTimer = 0;
e9projHeight = 0;
e9projWidth = 0;
e9hitTimer = 0;
e9invBlink = 255;
e9Attack = 1;
e9FireVul = 2;
e9BoltVul = 0;
e9AcidVul = 0;
e9faceR = false;
e9invulnerable = false;
e9knockback = false;
e9knockbackRes = false;
e9onGround = true;
e9proximity = false;
e9touchWallL = false;
e9touchWallR = false;
e9breathhit = false;
e9clawhit = false;
e9frozen = false;
e9peaceful = false;
e9frRes = false;
e9BurnVul = true;
e9ShockVul = false;
e9peaceRes = false;
e9coins = false;
e9smoke = false;
e9smokeCT = 0;
e9coinValue = 30;
e9coinType = 0;
e9altAnimCT = 0;
#endregion
#region e16
e16spawn = true;
e16CT = 0;
e16timer = 0;
e16HP = 17;
e16armor = 0;
e16X = 2357;
e16Y = 607;
e16act = 0;
e16facing = 0;
e16frame = 0;
e16Opacity = 255;
e16invTimer = 0;
e16knockbackTimer = 0;
e16projHeight = 0;
e16projWidth = 0;
e16hitTimer = 0;
e16invBlink = 255;
e16Attack = 1;
e16FireVul = 2;
e16BoltVul = 0;
e16AcidVul = 0;
e16faceR = false;
e16invulnerable = false;
e16knockback = false;
e16knockbackRes = false;
e16onGround = true;
e16proximity = false;
e16touchWallL = false;
e16touchWallR = false;
e16breathhit = false;
e16clawhit = false;
e16frozen = false;
e16peaceful = false;
e16frRes = false;
e16BurnVul = true;
e16ShockVul = false;
e16peaceRes = false;
e16coins = false;
e16smoke = false;
e16smokeCT = 0;
e16coinValue = 30;
e16coinType = 0;
e16altAnimCT = 0;
#endregion
//archer
#region e10
e10spawn = true;
e10CT = 0;
e10timer = 0;
e10HP = 5;
e10armor = 0;
e10X = 6717;
e10Y = 3429;
e10act = 0;
e10facing = 0;
e10frame = 0;
e10Opacity = 255;
e10invTimer = 0;
e10knockbackTimer = 0;
e10hitTimer = 0;
e10invBlink = 255;
e10Attack = 1;
e10FireVul = 0;
e10BoltVul = 0;
e10AcidVul = 0;
e10faceR = false;
e10invulnerable = false;
e10knockback = false;
e10knockbackRes = false;
e10onGround = true;
e10proximity = false;
e10touchWallL = false;
e10touchWallR = false;
e10breathhit = false;
e10clawhit = false;
e10frozen = false;
e10peaceful = false;
e10frRes = false;
e10BurnVul = true;
e10ShockVul = false;
e10peaceRes = false;
e10coins = false;
e10smoke = false;
e10smokeCT = 0;
e10coinValue = 40;
e10coinType = 0;
e10altAnimCT = 0;
#endregion
#region e11
e11spawn = true;
e11CT = 0;
e11timer = 0;
e11HP = 5;
e11armor = 0;
e11X = 4373;
e11Y = 2000;
e11act = 0;
e11facing = 0;
e11frame = 0;
e11Opacity = 255;
e11invTimer = 0;
e11knockbackTimer = 0;
e11hitTimer = 0;
e11invBlink = 255;
e11Attack = 1;
e11FireVul = 0;
e11BoltVul = 0;
e11AcidVul = 0;
e11faceR = false;
e11invulnerable = false;
e11knockback = false;
e11knockbackRes = false;
e11onGround = true;
e11proximity = false;
e11touchWallL = false;
e11touchWallR = false;
e11breathhit = false;
e11clawhit = false;
e11frozen = false;
e11peaceful = false;
e11frRes = false;
e11BurnVul = true;
e11ShockVul = false;
e11peaceRes = false;
e11coins = false;
e11smoke = false;
e11smokeCT = 0;
e11coinValue = 40;
e11coinType = 0;
e11altAnimCT = 0;
#endregion
#region e12
e12spawn = true;
e12CT = 0;
e12timer = 0;
e12HP = 5;
e12armor = 0;
e12X = 2318;
e12Y = 4638;
e12act = 0;
e12facing = 0;
e12frame = 0;
e12Opacity = 255;
e12invTimer = 0;
e12knockbackTimer = 0;
e12hitTimer = 0;
e12invBlink = 255;
e12Attack = 1;
e12FireVul = 0;
e12BoltVul = 0;
e12AcidVul = 0;
e12faceR = false;
e12invulnerable = false;
e12knockback = false;
e12knockbackRes = false;
e12onGround = true;
e12proximity = false;
e12touchWallL = false;
e12touchWallR = false;
e12breathhit = false;
e12clawhit = false;
e12frozen = false;
e12peaceful = false;
e12frRes = false;
e12BurnVul = true;
e12ShockVul = false;
e12peaceRes = false;
e12coins = false;
e12smoke = false;
e12smokeCT = 0;
e12coinValue = 40;
e12coinType = 0;
e12altAnimCT = 0;
#endregion
#region e13
e13spawn = true;
e13CT = 0;
e13timer = 0;
e13HP = 5;
e13armor = 0;
e13X = 1714;
e13Y = 1224;
e13act = 0;
e13facing = 0;
e13frame = 0;
e13Opacity = 255;
e13invTimer = 0;
e13knockbackTimer = 0;
e13hitTimer = 0;
e13invBlink = 255;
e13Attack = 1;
e13FireVul = 0;
e13BoltVul = 0;
e13AcidVul = 0;
e13faceR = false;
e13invulnerable = false;
e13knockback = false;
e13knockbackRes = false;
e13onGround = true;
e13proximity = false;
e13touchWallL = false;
e13touchWallR = false;
e13breathhit = false;
e13clawhit = false;
e13frozen = false;
e13peaceful = false;
e13frRes = false;
e13BurnVul = true;
e13ShockVul = false;
e13peaceRes = false;
e13coins = false;
e13smoke = false;
e13smokeCT = 0;
e13coinValue = 40;
e13coinType = 0;
e13altAnimCT = 0;
#endregion
#region e14
e14spawn = true;
e14CT = 0;
e14timer = 0;
e14HP = 5;
e14armor = 0;
e14X = 4858;
e14Y = 1377;
e14act = 0;
e14facing = 0;
e14frame = 0;
e14Opacity = 255;
e14invTimer = 0;
e14knockbackTimer = 0;
e14hitTimer = 0;
e14invBlink = 255;
e14Attack = 1;
e14FireVul = 0;
e14BoltVul = 0;
e14AcidVul = 0;
e14faceR = false;
e14invulnerable = false;
e14knockback = false;
e14knockbackRes = false;
e14onGround = true;
e14proximity = false;
e14touchWallL = false;
e14touchWallR = false;
e14breathhit = false;
e14clawhit = false;
e14frozen = false;
e14peaceful = false;
e14frRes = false;
e14BurnVul = true;
e14ShockVul = false;
e14peaceRes = false;
e14coins = false;
e14smoke = false;
e14smokeCT = 0;
e14coinValue = 40;
e14coinType = 0;
e14altAnimCT = 0;
#endregion
#region e15
e15spawn = true;
e15CT = 0;
e15timer = 0;
e15HP = 5;
e15armor = 0;
e15X = 6772;
e15Y = 1673;
e15act = 0;
e15facing = 0;
e15frame = 0;
e15Opacity = 255;
e15invTimer = 0;
e15knockbackTimer = 0;
e15hitTimer = 0;
e15invBlink = 255;
e15Attack = 1;
e15FireVul = 0;
e15BoltVul = 0;
e15AcidVul = 0;
e15faceR = false;
e15invulnerable = false;
e15knockback = false;
e15knockbackRes = false;
e15onGround = true;
e15proximity = false;
e15touchWallL = false;
e15touchWallR = false;
e15breathhit = false;
e15clawhit = false;
e15frozen = false;
e15peaceful = false;
e15frRes = false;
e15BurnVul = true;
e15ShockVul = false;
e15peaceRes = false;
e15coins = false;
e15smoke = false;
e15smokeCT = 0;
e15coinValue = 40;
e15coinType = 0;
e15altAnimCT = 0;
#endregion
//hazmat
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6HP = 16;
e6armor = 0;
e6X = 7400;
e6Y = 3678;
e6act = 1;
e6facing = 6;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6projHeight = 0;
e6projWidth = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 1;
e6FireVul = 1;
e6BoltVul = 0;
e6AcidVul = 0;
e6faceR = true;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = false;
e6BurnVul = false;
e6ShockVul = false;
e6peaceRes = true;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 40;
e6coinType = 0;
e6altAnimCT = 0;
#endregion
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 16;
e7armor = 0;
e7X = 4900;
e7Y = 2753;
e7act = 1;
e7facing = 6;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7projHeight = 0;
e7projWidth = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 1;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = true;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = false;
e7ShockVul = false;
e7peaceRes = true;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 40;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 16;
e8armor = 0;
e8X = 2300;
e8Y = 4139;
e8act = 1;
e8facing = 6;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8projHeight = 0;
e8projWidth = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 1;
e8FireVul = 1;
e8BoltVul = 0;
e8AcidVul = 0;
e8faceR = true;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = false;
e8BurnVul = false;
e8ShockVul = false;
e8peaceRes = true;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 40;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
#endregion
stage3e3 = true;
}
#endregion
#region toStage 3-B
if (toStage3eB == true)
{
drawStages = new DrawStages(14, stageManager);
drawSky = new DrawSky(3, stageManager);
loadAlex = new LoadAlex(true, stageManager);
loadBaldwin = new LoadBaldwin(true, stageManager);
npc3eB = new Npc3eB(true, stageManager);
loopFireBreathAlt = new LoopFireBreathAlt(true,
breathSFX);
loopLaser = new LoopLaser(true, breathSFX);
playStageMusic = new PlayStageMusic(9, stageBGM);
#region floor
floor1 = new Rectangle(0, floor1y = 647, 2000, 10);
#endregion
#region wall
wall1 = new Rectangle(134, 0, 6, 2000);
wall2 = new Rectangle(1134, 0, 6, 2000);
#endregion
toStage3eB = false;
stageEndCT = 0;
cameraMaxX = 0;
cameraMaxY = 0;
drgnX = 474;
drgnY = 504;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
#region Boss 3 Variables
boss3Wait = 0;
boss3ActFirst = 0;
boss3Start = false;
hitBySuper = false;
boss3ClearCT = 0;
baldwinInvTimer = 0;
alexInvTimer = 0;
baldwinKnockbackCT = 0;
alexKnockbackCT = 0;
baldwinEscape = false;
alexEscape = false;
#region baldwin
baldwinHP = 50;
baldwinShockCT = 0;
baldwinShock = false;
baldwinOnGround = true;
baldwinX = 990;
baldwinY = 504;
baldwinFaceR = false;
baldwinCT = 0;
baldwinFrame = 0;
baldwinAct = 0;
jetX = 0;
jetCT = 0;
jetFrame = 0;
jetAct = 0;
jetOn = false;
baldwinProjSequence = 0;
baldwinProjOn = false;
baldwinProj1CT = 0;
baldwinProj1Frame = 0;
baldwinProj1Act = 0;
baldwinProj1X = 0;
baldwinProj1Y = 0;
baldwinProj1YVel = 0;
baldwinProj1Wait = 0;
baldwinProj1On = false;
baldwinProj2CT = 0;
baldwinProj2Frame = 0;
baldwinProj2Act = 0;
baldwinProj2X = 0;
baldwinProj2Y = 0;
baldwinProj2YVel = 0;
baldwinProj2Wait = 0;
baldwinProj2On = false;
baldwinProj3CT = 0;
baldwinProj3Frame = 0;
baldwinProj3Act = 0;
baldwinProj3X = 0;
baldwinProj3Y = 0;
baldwinProj3YVel = 0;
baldwinProj3Wait = 0;
baldwinProj3On = false;
baldwinProj4CT = 0;
baldwinProj4Frame = 0;
baldwinProj4Act = 0;
baldwinProj4X = 0;
baldwinProj4Y = 0;
baldwinProj4YVel = 0;
baldwinProj4Wait = 0;
baldwinProj4On = false;
baldwinProj5CT = 0;
baldwinProj5Frame = 0;
baldwinProj5Act = 0;
baldwinProj5X = 0;
baldwinProj5Y = 0;
baldwinProj5YVel = 0;
baldwinProj5Wait = 0;
baldwinProj5On = false;
baldwinReload = 0;
baldwinRNG = 0;
baldwinSuperCounter = 0;
baldwinSuperCharge = 0;
baldwinSuperCT = 0;
baldwinSuperFrame = 0;
baldwinSuperAct = 0;
baldwinSuperWait = 0;
baldwinSuperPost = 0;
baldwinSuperOn = false;
baldwinBurnerCT = 0;
baldwinBurnerFrame = 0;
baldwinBurnerAct = 0;
baldwinBurnerWait = 0;
baldwinBurnerReload = 0;
baldwinBurnerOn = false;
baldwinInvBlink = 255;
baldwinHitTimer = 0;
baldwinInvulnerable = false;
baldwinBreathHit = false;
baldwinClawHit = false;
#endregion
#region alex
alexHP = 50;
alexShockCT = 0;
alexShock = false;
alexOnGround = true;
alexWarp = false;
alexWarpWait = 0;
alexX = 141;
alexY = 504;
alexFaceR = true;
alexFacing = 0;
alexCT = 0;
alexFrame = 0;
alexAct = 0;
alexVoiceX = 0;
alexVoiceY = 0;
alexVoiceType = 4;
alexVoiceOn = false;
alexSlashCT = 0;
alexSlashFrame = 0;
alexSlashOn = false;
alexSlashFinished = false;
alexReload = 0;
alexRNG = 0;
alexSuperCounter = 0;
alexSuperCharge = 0;
alexSuperCT = 0;
alexSuperFrame = 0;
alexSuperAct = 0;
alexSuperWait = 0;
alexSuperPost = 0;
alexSuperOn = false;
alexLaserX = 0;
alexLaserY = 0;
alexLaserCT = 0;
alexLaserFrame = 0;
alexLaserOn = false;
alexInvBlink = 255;
alexHitTimer = 0;
alexInvulnerable = false;
alexBreathHit = false;
alexClawHit = false;
#endregion
#endregion
alexHitDelay = 0;
baldwinHitDelay = 0;
stage3eB = true;
}
#endregion
#region toStage 4-1
if (toStage4e1 == true)
{
drawStages = new DrawStages(15, stageManager);
drawSky = new DrawSky(2, stageManager);
loadOcean = new LoadOcean(2, stageManager);
loadLancer = new LoadLancer(true, stageManager);
loadHazmat = new LoadHazmat(true, stageManager);
loadPikeman = new LoadPikeman(1, stageManager);
loadSax = new LoadSax(true, stageManager);
loadToxicball = new LoadToxicball(true, stageManager);
npc4e1 = new Npc4e1(true, stageManager);
loopAcid = new LoopAcid(true, breathSFX);
loopSpin = new LoopSpin(true, breathSFX);
loopLaser = new LoopLaser(true, breathSFX);
playStageMusic = new PlayStageMusic(5, stageBGM);
puzzleBoat = new PuzzleBoat(true, stageManager);
puzzleGate = new PuzzleGate(true, stageManager);
drawTreasureText = new DrawTreasureText(11,
stageManager, languageType);
#region floor
floor1 = new Rectangle(0, floor1y = 1756, 250, 20);
floor2 = new Rectangle(874, floor2y = 1752, 193, 20);
floor3 = new Rectangle(1160, floor3y = 1750, 144, 20);
floor4 = new Rectangle(1409, floor4y = 1748, 136, 20);
floor5 = new Rectangle(1738, floor5y = 1750, 160, 20);
floor6 = new Rectangle(2002, floor6y = 1691, 619, 20);
floor7 = new Rectangle(2138, floor7y = 1593, 194, 20);
floor8 = new Rectangle(2430, floor8y = 1485, 182, 20);
floor9 = new Rectangle(2134, floor9y = 1390, 174, 20);
floor10 = new Rectangle(2458, floor10y = 1297, 179, 20);
floor11 = new Rectangle(2546, floor11y = 1184, 159, 20);
floor12 = new Rectangle(2335, floor12y = 1093, 177, 20);
floor13 = new Rectangle(2165, floor13y = 993, 159, 20);
floor14 = new Rectangle(2443, floor14y = 892, 230, 20);
floor15 = new Rectangle(0, floor15y = 1830, 2902, 20);
//ACID
floor16 = new Rectangle(2812, floor16y = 1295, 551, 20);
floor17 = new Rectangle(3151, floor17y = 1190, 225, 20);
floor18 = new Rectangle(2843, floor18y = 1095, 254, 20);
floor19 = new Rectangle(3187, floor19y = 980, 150, 20);
floor20 = new Rectangle(2873, floor20y = 887, 237, 20);
floor21 = new Rectangle(3164, floor21y = 787, 189, 20);
floor22 = new Rectangle(2702, floor22y = 680, 278, 20);
floor23 = new Rectangle(3069, floor23y = 590, 180, 20);
floor24 = new Rectangle(2899, floor24y = 484, 143, 20);
floor25 = new Rectangle(3092, floor25y = 388, 181, 20);
floor26 = new Rectangle(2950, floor26y = 288, 110, 20);
floor27 = new Rectangle(3081, floor27y = 188, 114, 20);
floor28 = new Rectangle(3459, floor28y = 807, 211, 20);
floor29 = new Rectangle(3606, floor29y = 901, 217, 20);
floor30 = new Rectangle(3961, floor30y = 1005, 204, 20);
floor31 = new Rectangle(3950, floor31y = 1717, 30, 20);
floor32 = new Rectangle(3977, floor32y = 1651, 167, 20);
floor33 = new Rectangle(4002, floor33y = 1805, 133, 20);
floor34 = new Rectangle(4597, floor34y = 1788, 154, 20);
floor35 = new Rectangle(4912, floor35y = 1788, 109, 20);
floor36 = new Rectangle(5086, floor36y = 1694, 192, 20);
floor37 = new Rectangle(5312, floor37y = 1591, 124, 20);
floor38 = new Rectangle(5483, floor38y = 1480, 113, 20);
floor39 = new Rectangle(4495, floor39y = 1290, 171, 20);
floor40 = new Rectangle(4436, floor40y = 1197, 113, 20);
floor41 = new Rectangle(4572, floor41y = 1095, 250, 20);
floor42 = new Rectangle(4344, floor42y = 1006, 200, 20);
floor43 = new Rectangle(4636, floor43y = 892, 209, 20);
floor44 = new Rectangle(5618, floor44y = 1381, 218, 20);
floor45 = new Rectangle(5326, floor45y = 1282, 203, 20);
floor46 = new Rectangle(5938, floor46y = 1282, 224, 20);
floor47 = new Rectangle(4932, floor47y = 1188, 217, 20);
floor48 = new Rectangle(5254, floor48y = 884, 168, 20);
floor49 = new Rectangle(5491, floor49y = 886, 242, 20);
floor50 = new Rectangle(4954, floor50y = 793, 242, 20);
floor51 = new Rectangle(5822, floor51y = 795, 252, 20);
floor52 = new Rectangle(5127, floor52y = 693, 159, 20);
floor53 = new Rectangle(5043, floor53y = 590, 143, 20);
floor54 = new Rectangle(6237, floor54y = 1287, 1370,
20);
floor55 = new Rectangle(8103, floor55y = 1290, 53, 20);
floor56 = new Rectangle(6705, floor56y = 991, 176, 20);
floor57 = new Rectangle(6450, floor57y = 907, 146, 20);
floor58 = new Rectangle(6350, floor58y = 800, 186, 20);
floor59 = new Rectangle(6689, floor59y = 801, 108, 20);
floor60 = new Rectangle(6720, floor60y = 693, 184, 20);
floor61 = new Rectangle(6939, floor61y = 1193, 187, 20);
floor62 = new Rectangle(6954, floor62y = 1091, 173, 20);
floor63 = new Rectangle(7092, floor63y = 691, 178, 20);
floor64 = new Rectangle(7803, floor64y = 3594, 323, 20);
floor65 = new Rectangle(8132, floor65y = 4002, 890, 20);
floor66 = new Rectangle(9004, floor66y = 3901, 379, 20);
floor67 = new Rectangle(9492, floor67y = 3835, 100, 20);
floor68 = new Rectangle(9695, floor68y = 3784, 118, 20);
floor69 = new Rectangle(9916, floor69y = 3733, 118, 20);
floor70 = new Rectangle(10126, floor70y = 3695, 848,
20);
floor71 = new Rectangle(3121, floor71y = 1871, 3196,
20); //ACID
floor72 = new Rectangle(4111, floor72y = 1796, 453, 20);
#endregion
#region temp wall
L1 = new Rectangle(2126, 1598, 6, 20);
L2 = new Rectangle(2418, 1490, 6, 20);
L3 = new Rectangle(2122, 1395, 6, 20);
L4 = new Rectangle(2446, 1302, 6, 20);
L5 = new Rectangle(2534, 1189, 6, 20);
L6 = new Rectangle(2323, 1098, 6, 20);
L7 = new Rectangle(2153, 998, 6, 20);
L8 = new Rectangle(2431, 897, 6, 20);
L9 = new Rectangle(3139, 1195, 6, 20);
L10 = new Rectangle(2831, 1100, 6, 20);
L11 = new Rectangle(3175, 985, 6, 20);
L12 = new Rectangle(2861, 892, 6, 20);
L13 = new Rectangle(3152, 792, 6, 20);
L14 = new Rectangle(2690, 685, 6, 20);
L15 = new Rectangle(3057, 595, 6, 20);
L16 = new Rectangle(2887, 489, 6, 20);
L17 = new Rectangle(3080, 393, 6, 20);
L18 = new Rectangle(2938, 293, 6, 20);
L19 = new Rectangle(3069, 193, 6, 20);
L20 = new Rectangle(3447, 812, 6, 20);
L21 = new Rectangle(3594, 906, 6, 20);
L22 = new Rectangle(3949, 1010, 6, 20);
L23 = new Rectangle(4585, 1793, 6, 20);
L24 = new Rectangle(4900, 1793, 6, 20);
L25 = new Rectangle(5074, 1699, 6, 20);
L26 = new Rectangle(5300, 1596, 6, 20);
L27 = new Rectangle(5471, 1485, 6, 20);
L28 = new Rectangle(4483, 1295, 6, 20);
L29 = new Rectangle(4424, 1202, 6, 20);
L30 = new Rectangle(4560, 1100, 6, 20);
L31 = new Rectangle(4332, 1011, 6, 20);
L32 = new Rectangle(4624, 897, 6, 20);
L33 = new Rectangle(5606, 1386, 6, 20);
L34 = new Rectangle(5314, 1287, 6, 20);
L35 = new Rectangle(5926, 1287, 6, 20);
L36 = new Rectangle(4920, 1193, 6, 20);
L37 = new Rectangle(5242, 889, 6, 20);
L38 = new Rectangle(5479, 891, 6, 20);
L39 = new Rectangle(4942, 798, 6, 20);
L40 = new Rectangle(5810, 800, 6, 20);
L41 = new Rectangle(5115, 698, 6, 20);
L42 = new Rectangle(5051, 595, 6, 20);
L43 = new Rectangle(6693, 996, 6, 20);
L44 = new Rectangle(6438, 912, 6, 20);
L45 = new Rectangle(6338, 805, 6, 20);
L46 = new Rectangle(6677, 806, 6, 20);
L47 = new Rectangle(6708, 698, 6, 20);
R1 = new Rectangle(2344, 1598, 6, 20);
R2 = new Rectangle(2624, 1490, 6, 20);
R3 = new Rectangle(2320, 1395, 6, 20);
R4 = new Rectangle(2649, 1302, 6, 20);
R5 = new Rectangle(2717, 1189, 6, 20);
R6 = new Rectangle(2524, 1098, 6, 20);
R7 = new Rectangle(2336, 998, 6, 20);
R8 = new Rectangle(2685, 897, 6, 20);
R9 = new Rectangle(3388, 1195, 6, 20);
R10 = new Rectangle(3109, 1100, 6, 20);
R11 = new Rectangle(3349, 985, 6, 20);
R12 = new Rectangle(3122, 892, 6, 20);
R13 = new Rectangle(3365, 792, 6, 20);
R14 = new Rectangle(2992, 685, 6, 20);
R15 = new Rectangle(3261, 595, 6, 20);
R16 = new Rectangle(3054, 489, 6, 20);
R17 = new Rectangle(3285, 393, 6, 20);
R18 = new Rectangle(3027, 293, 6, 20);
R19 = new Rectangle(3207, 193, 6, 20);
R20 = new Rectangle(3682, 812, 6, 20);
R21 = new Rectangle(3835, 906, 6, 20);
R22 = new Rectangle(4177, 1010, 6, 20);
R23 = new Rectangle(4763, 1793, 6, 20);
R24 = new Rectangle(5033, 1793, 6, 20);
R25 = new Rectangle(5290, 1699, 6, 20);
R26 = new Rectangle(5448, 1596, 6, 20);
R27 = new Rectangle(5608, 1485, 6, 20);
R28 = new Rectangle(4678, 1295, 6, 20);
R29 = new Rectangle(4561, 1202, 6, 20);
R30 = new Rectangle(4834, 1100, 6, 20);
R31 = new Rectangle(4556, 1011, 6, 20);
R32 = new Rectangle(4857, 897, 6, 20);
R33 = new Rectangle(5848, 1386, 6, 20);
R34 = new Rectangle(5541, 1287, 6, 20);
R35 = new Rectangle(6189, 1287, 6, 20);
R36 = new Rectangle(5161, 1193, 6, 20);
R37 = new Rectangle(5434, 889, 6, 20);
R38 = new Rectangle(5745, 891, 6, 20);
R39 = new Rectangle(5208, 798, 6, 20);
R40 = new Rectangle(6086, 800, 6, 20);
R41 = new Rectangle(5298, 698, 6, 20);
R42 = new Rectangle(5194, 595, 6, 20);
R43 = new Rectangle(6893, 996, 6, 20);
R44 = new Rectangle(6608, 912, 6, 20);
R45 = new Rectangle(6548, 805, 6, 20);
R46 = new Rectangle(6809, 806, 6, 20);
R47 = new Rectangle(6916, 698, 6, 20);
#endregion
#region wall
wall1 = new Rectangle(250, 1761, 6, 200);
wall2 = new Rectangle(870, 1757, 6, 200);
wall3 = new Rectangle(-12, 0, 6, 4000);
wall4 = new Rectangle(1060, 1757, 6, 200);
wall5 = new Rectangle(1155, 1755, 6, 200);
wall6 = new Rectangle(1294, 1755, 6, 200);
wall7 = new Rectangle(1409, 1753, 6, 200);
wall8 = new Rectangle(1535, 1753, 6, 200);
wall9 = new Rectangle(1738, 1755, 6, 200);
wall10 = new Rectangle(1888, 1755, 6, 200);
wall11 = new Rectangle(2002, 1696, 6, 400);
wall12 = new Rectangle(2611, 1696, 6, 400);
wall13 = new Rectangle(2812, 1300, 6, 1000);
wall14 = new Rectangle(3353, 1300, 6, 1000);
wall15 = new Rectangle(6257, 1292, 6, 1000);
wall16 = new Rectangle(8103, 1295, 6, 1001);
wall17 = new Rectangle(2613, 1189, 6, 114);
wall18 = new Rectangle(3613, 812, 6, 95);
wall19 = new Rectangle(3982, 1656, 20, 1155);
wall20 = new Rectangle(4124, 1810, 6, 1000);
wall21 = new Rectangle(6453, 805, 6, 108);
wall22 = new Rectangle(6790, 698, 6, 109);
wall23 = new Rectangle(7112, 696, 6, 601);
wall24 = new Rectangle(7249, 696, 6, 598);
wall25 = new Rectangle(7614, 1292, 6, 1001);
wall26 = new Rectangle(8155, 0, 6, 1293);
wall27 = new Rectangle(7793, 2811, 6, 1536);
wall28 = new Rectangle(8125, 2811, 6, 573);
wall29 = new Rectangle(8122, 3599, 6, 441);
wall30 = new Rectangle(8361, 3389, 6, 395);
wall31 = new Rectangle(8637, 2811, 6, 983);
wall32 = new Rectangle(9013, 3906, 6, 102);
wall33 = new Rectangle(9330, 3906, 6, 1099);
wall34 = new Rectangle(9489, 3840, 6, 1165);
wall35 = new Rectangle(9577, 3840, 6, 1165);
wall36 = new Rectangle(9692, 3789, 6, 1216);
wall37 = new Rectangle(9794, 3789, 6, 1216);
wall38 = new Rectangle(9914, 3738, 6, 1267);
wall39 = new Rectangle(10022, 3738, 6, 1267);
wall40 = new Rectangle(10146, 3700, 6, 1305);
#endregion
roof1 = new Rectangle(3987, 1641, 157, 10);
toStage4e1 = false;
stageEndCT = 0;
cameraMaxX = 9693;
cameraMaxY = 3258;
drgnX = 12;
drgnY = 1613;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
gearCT = 0;
gearFrame = 0;
gearAct = 0;
gearHP = 60;
gate4e1Y = 0;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
//lancer
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 28;
e1armor = 0;
e1X = 9478;
e1Y = 3694;
e1reload = 120;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1projHeight = 0;
e1projWidth = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 1;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = true;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = true;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 110;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 28;
e2armor = 0;
e2X = 9906;
e2Y = 3592;
e2reload = 120;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2projHeight = 0;
e2projWidth = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 1;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = true;
e2BurnVul = false;
e2ShockVul = false;
e2peaceRes = true;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 130;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
//pikeman
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 20;
e3armor = 0;
e3X = 2468;
e3Y = 1154;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3projHeight = 0;
e3projWidth = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 0;
e3BoltVul = 0;
e3AcidVul = 2;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = false;
e3ShockVul = false;
e3peaceRes = true;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 120;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 20;
e4armor = 0;
e4X = 4374;
e4Y = 863;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4projHeight = 0;
e4projWidth = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 0;
e4BoltVul = 0;
e4AcidVul = 2;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = false;
e4ShockVul = false;
e4peaceRes = true;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 120;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 20;
e5armor = 0;
e5X = 6370;
e5Y = 657;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5projHeight = 0;
e5projWidth = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 1;
e5FireVul = 0;
e5BoltVul = 0;
e5AcidVul = 2;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = false;
e5ShockVul = false;
e5peaceRes = true;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 120;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
//hamzat
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6HP = 16;
e6armor = 0;
e6X = 2122;
e6Y = 1548;
e6act = 1;
e6facing = 6;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6projHeight = 0;
e6projWidth = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 1;
e6FireVul = 1;
e6BoltVul = 0;
e6AcidVul = 0;
e6faceR = true;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = false;
e6BurnVul = false;
e6ShockVul = false;
e6peaceRes = true;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 40;
e6coinType = 0;
e6altAnimCT = 0;
#endregion
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 16;
e7armor = 0;
e7X = 3000;
e7Y = 1152;
e7act = 1;
e7facing = 6;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7projHeight = 0;
e7projWidth = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 1;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = true;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = false;
e7ShockVul = false;
e7peaceRes = true;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 40;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 16;
e8armor = 0;
e8X = 5832;
e8Y = 652;
e8act = 1;
e8facing = 6;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8projHeight = 0;
e8projWidth = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 1;
e8FireVul = 1;
e8BoltVul = 0;
e8AcidVul = 0;
e8faceR = true;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = false;
e8BurnVul = false;
e8ShockVul = false;
e8peaceRes = true;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 40;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
//sax
#region e9
e9spawn = true;
e9CT = 0;
e9timer = 0;
e9HP = 17;
e9armor = 0;
e9X = 2493;
e9Y = 749;
e9act = 0;
e9facing = 0;
e9frame = 0;
e9Opacity = 255;
e9invTimer = 0;
e9knockbackTimer = 0;
e9projHeight = 0;
e9projWidth = 0;
e9hitTimer = 0;
e9invBlink = 255;
e9Attack = 1;
e9FireVul = 2;
e9BoltVul = 0;
e9AcidVul = 0;
e9faceR = false;
e9invulnerable = false;
e9knockback = false;
e9knockbackRes = false;
e9onGround = true;
e9proximity = false;
e9touchWallL = false;
e9touchWallR = false;
e9breathhit = false;
e9clawhit = false;
e9frozen = false;
e9peaceful = false;
e9frRes = false;
e9BurnVul = true;
e9ShockVul = false;
e9peaceRes = false;
e9coins = false;
e9smoke = false;
e9smokeCT = 0;
e9coinValue = 30;
e9coinType = 0;
e9altAnimCT = 0;
#endregion
#region e10
e10spawn = true;
e10CT = 0;
e10timer = 0;
e10HP = 17;
e10armor = 0;
e10X = 3100;
e10Y = 245;
e10act = 0;
e10facing = 0;
e10frame = 0;
e10Opacity = 255;
e10invTimer = 0;
e10knockbackTimer = 0;
e10projHeight = 0;
e10projWidth = 0;
e10hitTimer = 0;
e10invBlink = 255;
e10Attack = 1;
e10FireVul = 2;
e10BoltVul = 0;
e10AcidVul = 0;
e10faceR = false;
e10invulnerable = false;
e10knockback = false;
e10knockbackRes = false;
e10onGround = true;
e10proximity = false;
e10touchWallL = false;
e10touchWallR = false;
e10breathhit = false;
e10clawhit = false;
e10frozen = false;
e10peaceful = false;
e10frRes = false;
e10BurnVul = true;
e10ShockVul = false;
e10peaceRes = false;
e10coins = false;
e10smoke = false;
e10smokeCT = 0;
e10coinValue = 30;
e10coinType = 0;
e10altAnimCT = 0;
#endregion
#region e11
e11spawn = true;
e11CT = 0;
e11timer = 0;
e11HP = 17;
e11armor = 0;
e11X = 4656;
e11Y = 749;
e11act = 0;
e11facing = 0;
e11frame = 0;
e11Opacity = 255;
e11invTimer = 0;
e11knockbackTimer = 0;
e11projHeight = 0;
e11projWidth = 0;
e11hitTimer = 0;
e11invBlink = 255;
e11Attack = 1;
e11FireVul = 2;
e11BoltVul = 0;
e11AcidVul = 0;
e11faceR = false;
e11invulnerable = false;
e11knockback = false;
e11knockbackRes = false;
e11onGround = true;
e11proximity = false;
e11touchWallL = false;
e11touchWallR = false;
e11breathhit = false;
e11clawhit = false;
e11frozen = false;
e11peaceful = false;
e11frRes = false;
e11BurnVul = true;
e11ShockVul = false;
e11peaceRes = false;
e11coins = false;
e11smoke = false;
e11smokeCT = 0;
e11coinValue = 30;
e11coinType = 0;
e11altAnimCT = 0;
#endregion
#region e12
e12spawn = true;
e12CT = 0;
e12timer = 0;
e12HP = 17;
e12armor = 0;
e12X = 5359;
e12Y = 1139;
e12act = 0;
e12facing = 0;
e12frame = 0;
e12Opacity = 255;
e12invTimer = 0;
e12knockbackTimer = 0;
e12projHeight = 0;
e12projWidth = 0;
e12hitTimer = 0;
e12invBlink = 255;
e12Attack = 1;
e12FireVul = 2;
e12BoltVul = 0;
e12AcidVul = 0;
e12faceR = false;
e12invulnerable = false;
e12knockback = false;
e12knockbackRes = false;
e12onGround = true;
e12proximity = false;
e12touchWallL = false;
e12touchWallR = false;
e12breathhit = false;
e12clawhit = false;
e12frozen = false;
e12peaceful = false;
e12frRes = false;
e12BurnVul = true;
e12ShockVul = false;
e12peaceRes = false;
e12coins = false;
e12smoke = false;
e12smokeCT = 0;
e12coinValue = 30;
e12coinType = 0;
e12altAnimCT = 0;
#endregion
#region obstacles
obs1Wait = 180;
obs2Wait = 120;
obs3Wait = 60;
obs4Wait = 0;
obs5Wait = 180;
obs6Wait = 120;
obs7Wait = 160;
obs8Wait = 0;
obs9Wait = 180;
obs10Wait = 120;
obs1Y = 0;
obs1YVel = 0;
obs2Y = 0;
obs2YVel = 0;
obs3Y = 0;
obs3YVel = 0;
obs4Y = 0;
obs4YVel = 0;
obs5Y = 0;
obs5YVel = 0;
obs6Y = 0;
obs6YVel = 0;
obs7Y = 0;
obs7YVel = 0;
obs8Y = 0;
obs8YVel = 0;
obs1Up = false;
obs2Up = false;
obs3Up = false;
obs4Up = false;
obs5Up = false;
obs6Up = false;
obs7Up = false;
obs8Up = false;
#endregion
stage4e1 = true;
}
#endregion
#region toStage 4-2
if (toStage4e2 == true)
{
drawStages = new DrawStages(16, stageManager);
drawSky = new DrawSky(3, stageManager);
loadOcean = new LoadOcean(1, stageManager);
loadPikeman = new LoadPikeman(2, stageManager);
loadBone = new LoadBone(true, stageManager);
loadSax = new LoadSax(true, stageManager);
loadTuba = new LoadTuba(true, stageManager);
loadLancer = new LoadLancer(true, stageManager);
loadWalker = new LoadWalker(true, stageManager);
loadFlier = new LoadFlier(true, stageManager);
npc4e2 = new Npc4e2(true, stageManager);
playStageMusic = new PlayStageMusic(6, stageBGM);
loopSpin = new LoopSpin(true, breathSFX);
loopLaser = new LoopLaser(true, breathSFX);
draw4e2 = new Draw4e2(true, stageManager);
drawTreasureText = new DrawTreasureText(12,
stageManager, languageType);
#region floor
floor1 = new Rectangle(0, floor1y = 2882, 528, 20);
floor2 = new Rectangle(495, floor2y = 2771, 711, 20);
floor3 = new Rectangle(1165, floor3y = 2642, 1626, 20);
floor4 = new Rectangle(2747, floor4y = 2470, 2975, 20);
floor5 = new Rectangle(3109, floor5y = 2265, 283, 20);
floor6 = new Rectangle(3651, floor6y = 2265, 147, 20);
floor7 = new Rectangle(3849, floor7y = 2267, 161, 20);
floor8 = new Rectangle(4075, floor8y = 2266, 139, 20);
floor9 = new Rectangle(4383, floor9y = 2268, 261, 20);
floor10 = new Rectangle(4809, floor10y = 2271, 95, 20);
floor11 = new Rectangle(5091, floor11y = 2267, 117, 20);
floor12 = new Rectangle(5348, floor12y = 2265, 123, 20);
floor13 = new Rectangle(5631, floor13y = 2266, 116, 20);
floor14 = new Rectangle(5693, floor14y = 2527, 312, 20);
floor15 = new Rectangle(5982, floor15y = 2365, 436, 20);
floor16 = new Rectangle(6341, floor16y = 2221, 1360,
20);
floor17 = new Rectangle(7676, floor17y = 2097, 1339,
20);
floor18 = new Rectangle(8936, floor18y = 2218, 6847,
20);
floor19 = new Rectangle(13061, floor19y = 2120, 109,
20);
floor20 = new Rectangle(13343, floor20y = 2125, 123,
20);
floor21 = new Rectangle(12936, floor21y = 2019, 126,
20);
floor22 = new Rectangle(13807, floor22y = 1907, 197,
20);
floor23 = new Rectangle(12712, floor23y = 1897, 194,
20);
floor24 = new Rectangle(12736, floor24y = 1834, 74, 20);
floor25 = new Rectangle(12806, floor25y = 1768, 93, 20);
floor26 = new Rectangle(12944, floor26y = 1702, 1093,
20);
floor27 = new Rectangle(6415, floor27y = 2460, 262, 20);
floor28 = new Rectangle(6669, floor28y = 2592, 221, 20);
floor29 = new Rectangle(6879, floor29y = 2961, 516, 20);
floor30 = new Rectangle(7389, floor30y = 3215, 1178,
20);
floor31 = new Rectangle(7463, floor31y = 3083, 174, 20);
floor32 = new Rectangle(7715, floor32y = 2963, 167, 20);
floor33 = new Rectangle(7056, floor33y = 2837, 147, 20);
floor34 = new Rectangle(8002, floor34y = 2836, 193, 20);
floor35 = new Rectangle(7286, floor35y = 2718, 155, 20);
floor36 = new Rectangle(7678, floor36y = 2715, 138, 20);
floor37 = new Rectangle(8259, floor37y = 2713, 179, 20);
floor38 = new Rectangle(7496, floor38y = 2597, 180, 20);
floor39 = new Rectangle(7749, floor39y = 2464, 162, 20);
floor40 = new Rectangle(7951, floor40y = 2343, 98, 20);
floor41 = new Rectangle(8105, floor41y = 2341, 862, 20);
#endregion
#region temp wall
L1 = new Rectangle(3097, 2270, 6, 20);
L2 = new Rectangle(3639, 2270, 6, 20);
L3 = new Rectangle(3857, 2272, 6, 20);
L4 = new Rectangle(4063, 2271, 6, 20);
L5 = new Rectangle(4371, 2273, 6, 20);
L6 = new Rectangle(4797, 2276, 6, 20);
L7 = new Rectangle(5079, 2272, 6, 20);
L8 = new Rectangle(5336, 2270, 6, 20);
L9 = new Rectangle(5619, 2271, 6, 20);
L10 = new Rectangle(7044, 2842, 6, 20);
L11 = new Rectangle(7274, 2723, 6, 20);
L12 = new Rectangle(7451, 3088, 6, 20);
L13 = new Rectangle(7484, 2597, 6, 20);
L14 = new Rectangle(7666, 2720, 6, 20);
L15 = new Rectangle(7703, 2968, 6, 20);
L16 = new Rectangle(7737, 2464, 6, 20);
L17 = new Rectangle(7939, 2343, 6, 20);
L18 = new Rectangle(7990, 2836, 6, 20);
L19 = new Rectangle(8093, 2346, 6, 20);
L20 = new Rectangle(8247, 2713, 6, 20);
L21 = new Rectangle(6329, 2226, 6, 20);
R1 = new Rectangle(3394, 2270, 6, 20);
R2 = new Rectangle(3810, 2270, 6, 20);
R3 = new Rectangle(4022, 2272, 6, 20);
R4 = new Rectangle(4226, 2271, 6, 20);
R5 = new Rectangle(4656, 2273, 6, 20);
R6 = new Rectangle(4916, 2276, 6, 20);
R7 = new Rectangle(5220, 2272, 6, 20);
R8 = new Rectangle(5483, 2270, 6, 20);
R9 = new Rectangle(5759, 2271, 6, 20);
R10 = new Rectangle(7216, 2842, 6, 20);
R11 = new Rectangle(7453, 2723, 6, 20);
R12 = new Rectangle(7649, 3088, 6, 20);
R13 = new Rectangle(7688, 2597, 6, 20);
R14 = new Rectangle(7828, 2720, 6, 20);
R15 = new Rectangle(7894, 2968, 6, 20);
R16 = new Rectangle(7923, 2464, 6, 20);
R17 = new Rectangle(8061, 2343, 6, 20);
R18 = new Rectangle(8207, 2836, 6, 20);
R19 = new Rectangle(8450, 2713, 6, 20);
R20 = new Rectangle(9063, 3002, 6, 20);
#endregion
#region wall
wall1 = new Rectangle(-12, 0, 6, 4000);
wall2 = new Rectangle(519, 2776, 6, 112);
wall3 = new Rectangle(1191, 2647, 6, 130);
wall4 = new Rectangle(2771, 2475, 6, 173);
wall5 = new Rectangle(5700, 2475, 6, 58);
wall6 = new Rectangle(5992, 2370, 6, 163);
wall7 = new Rectangle(6415, 2370, 6, 96);
wall8 = new Rectangle(6672, 2465, 6, 133);
wall9 = new Rectangle(6881, 2597, 6, 370);
wall10 = new Rectangle(7390, 2966, 6, 255);
wall11 = new Rectangle(8566, 2346, 6, 875);
wall12 = new Rectangle(8938, 2223, 6, 124);
wall13 = new Rectangle(7696, 2102, 6, 125);
wall14 = new Rectangle(12386, 0, 6, 1989);
wall15 = new Rectangle(12712, 0, 6, 1898);
#endregion
roof1 = new Rectangle(6341, 2221, 1360, 10);
roof2 = new Rectangle(7706, 2097, 1309, 10);
toStage4e2 = false;
stageEndCT = 0;
cameraMaxX = 14269;
cameraMaxY = 2182;
drgnX = 12;
drgnY = 2739;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
cannonFarFrame = 0;
cannonFarAct = 0;
cannonFarCT = 0;
cannonNearFrame = 0;
cannonNearAct = 0;
cannonNearCT = 0;
genAct = 0;
wickCT = 0;
wickFrame = 0;
wickAct = 0;
wickTimer = 0;
enemyMissileFrame = 0;
enemyMissileCT = 0;
enemyMissileTimer = 0;
enemyMissileX = 0;
enemyMissileYNear = 0;
enemyMissileYFar = 0;
playerMissleCT = 0;
playerMissileFrame = 0;
playerMissileYNear = 2025;
playerMissileYFar = -2000;
cannonDefeated = false;
wickLit = false;
enemyCannonFire = false;
playerCannonFire = false;
starX = 0;
starY = 0;
starCT = 0;
starFrame = 0;
drgnUnderwater = true;
//pikeman
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 20;
e1armor = 0;
e1X = 3860;
e1Y = 2124;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1projHeight = 0;
e1projWidth = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 2;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = true;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 120;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 20;
e2armor = 0;
e2X = 4483;
e2Y = 2125;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2projHeight = 0;
e2projWidth = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 0;
e2AcidVul = 2;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = false;
e2ShockVul = false;
e2peaceRes = true;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 120;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
//tuba
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3reload = 121;
e3HP = 25;
e3armor = 0;
e3X = 5843;
e3Y = 2384;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3projHeight = 0;
e3projWidth = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 2;
e3BoltVul = 0;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = true;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 80;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
#region e13
e13spawn = true;
e13CT = 0;
e13timer = 0;
e13reload = 121;
e13HP = 25;
e13armor = 0;
e13X = 12712;
e13Y = 1754;
e13act = 0;
e13facing = 0;
e13frame = 0;
e13Opacity = 255;
e13invTimer = 0;
e13knockbackTimer = 0;
e13projHeight = 0;
e13projWidth = 0;
e13hitTimer = 0;
e13invBlink = 255;
e13Attack = 1;
e13FireVul = 2;
e13BoltVul = 0;
e13AcidVul = 0;
e13faceR = false;
e13invulnerable = false;
e13knockback = false;
e13knockbackRes = false;
e13onGround = true;
e13proximity = false;
e13touchWallL = false;
e13touchWallR = false;
e13breathhit = false;
e13clawhit = false;
e13frozen = false;
e13peaceful = false;
e13frRes = false;
e13BurnVul = true;
e13ShockVul = false;
e13peaceRes = false;
e13coins = false;
e13smoke = false;
e13smokeCT = 0;
e13coinValue = 80;
e13coinType = 0;
e13altAnimCT = 0;
#endregion
//walker
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4reload = 0;
e4projHeight = 0;
e4HP = 20;
e4armor = 1;
e4X = 7056;
e4Y = 2818;
e4act = 0;
e4facing = 1;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 2;
e4FireVul = 0;
e4BoltVul = 2;
e4AcidVul = 0;
e4faceR = true;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4shock = false;
e4frRes = true;
e4BurnVul = false;
e4ShockVul = true;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4projectile = false;
e4smokeCT = 0;
e4coinValue = 512;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5reload = 0;
e5projHeight = 0;
e5HP = 20;
e5armor = 1;
e5X = 8002;
e5Y = 3072;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 2;
e5FireVul = 0;
e5BoltVul = 2;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5shock = false;
e5frRes = true;
e5BurnVul = false;
e5ShockVul = true;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5projectile = false;
e5smokeCT = 0;
e5coinValue = 512;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
//flier
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6reload = 0;
e6projHeight = 0;
e6HP = 20;
e6armor = 1;
e6X = 7556;
e6Y = 2700;
e6act = 0;
e6facing = 0;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 2;
e6FireVul = 0;
e6BoltVul = 2;
e6AcidVul = 0;
e6faceR = false;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6shock = false;
e6frRes = true;
e6BurnVul = false;
e6ShockVul = true;
e6peaceRes = false;
e6coins = false;
e6smoke = false;
e6projectile = false;
e6smokeCT = 0;
e6coinValue = 0;
e6coinType = 0;
#endregion
//lancer
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 28;
e7armor = 0;
e7X = 10036;
e7Y = 2075;
e7reload = 120;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7projHeight = 0;
e7projWidth = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 0;
e7BoltVul = 1;
e7AcidVul = 0;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = true;
e7BurnVul = false;
e7ShockVul = false;
e7peaceRes = true;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 110;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 28;
e8armor = 0;
e8X = 11700;
e8Y = 2075;
e8reload = 120;
e8act = 0;
e8facing = 0;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8projHeight = 0;
e8projWidth = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 1;
e8FireVul = 0;
e8BoltVul = 1;
e8AcidVul = 0;
e8faceR = false;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = true;
e8BurnVul = false;
e8ShockVul = false;
e8peaceRes = true;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 110;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
//trombone
#region e9
e9spawn = true;
e9CT = 0;
e9timer = 0;
e9HP = 26;
e9armor = 0;
e9X = 9436;
e9Y = 2075;
e9act = 0;
e9facing = 0;
e9frame = 0;
e9Opacity = 255;
e9invTimer = 0;
e9knockbackTimer = 0;
e9projHeight = 0;
e9projWidth = 0;
e9hitTimer = 0;
e9invBlink = 255;
e9Attack = 1;
e9FireVul = 2;
e9BoltVul = 0;
e9AcidVul = 0;
e9faceR = false;
e9invulnerable = false;
e9knockback = false;
e9knockbackRes = false;
e9onGround = true;
e9proximity = false;
e9touchWallL = false;
e9touchWallR = false;
e9breathhit = false;
e9clawhit = false;
e9frozen = false;
e9peaceful = false;
e9frRes = false;
e9BurnVul = true;
e9ShockVul = false;
e9peaceRes = false;
e9coins = false;
e9smoke = false;
e9smokeCT = 0;
e9coinValue = 60;
e9coinType = 0;
e9altAnimCT = 0;
#endregion
#region e10
e10spawn = true;
e10CT = 0;
e10timer = 0;
e10HP = 26;
e10armor = 0;
e10X = 11912;
e10Y = 2075;
e10act = 0;
e10facing = 0;
e10frame = 0;
e10Opacity = 255;
e10invTimer = 0;
e10knockbackTimer = 0;
e10projHeight = 0;
e10projWidth = 0;
e10hitTimer = 0;
e10invBlink = 255;
e10Attack = 1;
e10FireVul = 2;
e10BoltVul = 0;
e10AcidVul = 0;
e10faceR = false;
e10invulnerable = false;
e10knockback = false;
e10knockbackRes = false;
e10onGround = true;
e10proximity = false;
e10touchWallL = false;
e10touchWallR = false;
e10breathhit = false;
e10clawhit = false;
e10frozen = false;
e10peaceful = false;
e10frRes = false;
e10BurnVul = true;
e10ShockVul = false;
e10peaceRes = false;
e10coins = false;
e10smoke = false;
e10smokeCT = 0;
e10coinValue = 60;
e10coinType = 0;
e10altAnimCT = 0;
#endregion
#region e11
e11spawn = true;
e11CT = 0;
e11timer = 0;
e11HP = 26;
e11armor = 0;
e11X = 13343;
e11Y = 1985;
e11act = 0;
e11facing = 0;
e11frame = 0;
e11Opacity = 255;
e11invTimer = 0;
e11knockbackTimer = 0;
e11projHeight = 0;
e11projWidth = 0;
e11hitTimer = 0;
e11invBlink = 255;
e11Attack = 1;
e11FireVul = 2;
e11BoltVul = 0;
e11AcidVul = 0;
e11faceR = false;
e11invulnerable = false;
e11knockback = false;
e11knockbackRes = false;
e11onGround = true;
e11proximity = false;
e11touchWallL = false;
e11touchWallR = false;
e11breathhit = false;
e11clawhit = false;
e11frozen = false;
e11peaceful = false;
e11frRes = false;
e11BurnVul = true;
e11ShockVul = false;
e11peaceRes = false;
e11coins = false;
e11smoke = false;
e11smokeCT = 0;
e11coinValue = 60;
e11coinType = 0;
e11altAnimCT = 0;
#endregion
//sax
#region e12
e12spawn = true;
e12CT = 0;
e12timer = 0;
e12HP = 17;
e12armor = 0;
e12X = 13937;
e12Y = 1559;
e12act = 0;
e12facing = 0;
e12frame = 0;
e12Opacity = 255;
e12invTimer = 0;
e12knockbackTimer = 0;
e12projHeight = 0;
e12projWidth = 0;
e12hitTimer = 0;
e12invBlink = 255;
e12Attack = 1;
e12FireVul = 2;
e12BoltVul = 0;
e12AcidVul = 0;
e12faceR = false;
e12invulnerable = false;
e12knockback = false;
e12knockbackRes = false;
e12onGround = true;
e12proximity = false;
e12touchWallL = false;
e12touchWallR = false;
e12breathhit = false;
e12clawhit = false;
e12frozen = false;
e12peaceful = false;
e12frRes = false;
e12BurnVul = true;
e12ShockVul = false;
e12peaceRes = false;
e12coins = false;
e12smoke = false;
e12smokeCT = 0;
e12coinValue = 30;
e12coinType = 0;
e12altAnimCT = 0;
#endregion
stage4e2 = true;
}
#endregion
#region toStage 4-3
if (toStage4e3 == true)
{
puzzle4e3top = new Puzzle4e3top(true, stageManager);
npc4e3 = new Npc4e3(true, stageManager);
loopLaser = new LoopLaser(true, breathSFX);
loopSpin = new LoopSpin(true, breathSFX);
loopFireBreathAlt = new LoopFireBreathAlt(true,
breathSFX);
if (npcQuest == 2)
{
niaOn = true;
heavyOn = true;
}
#region floor
floor1 = new Rectangle(0, floor1y = 1688, 511, 20);
floor2 = new Rectangle(480, floor2y = 1928, 857, 20);
floor3 = new Rectangle(549, floor3y = 1569, 173, 20);
floor4 = new Rectangle(775, floor4y = 1452, 183, 20);
floor5 = new Rectangle(1037, floor5y = 1440, 183, 20);
floor6 = new Rectangle(1287, floor6y = 1426, 599, 20);
floor7 = new Rectangle(1866, floor7y = 1551, 981, 20);
floor8 = new Rectangle(1947, floor8y = 1299, 178, 20);
floor9 = new Rectangle(2197, floor9y = 1181, 263, 20);
floor10 = new Rectangle(2530, floor10y = 1077, 219, 20);
floor11 = new Rectangle(2826, floor11y = 1427, 527, 20);
floor12 = new Rectangle(2852, floor12y = 933, 259, 20);
floor13 = new Rectangle(3190, floor13y = 933, 188, 20);
floor14 = new Rectangle(3337, floor14y = 1535, 976, 20);
floor15 = new Rectangle(3405, floor15y = 933, 344, 20);
floor16 = new Rectangle(3722, floor16y = 815, 411, 20);
floor17 = new Rectangle(4269, floor17y = 1417, 1159,
20);
floor18 = new Rectangle(5383, floor18y = 1538, 1367,
20);
floor19 = new Rectangle(6701, floor19y = 1641, 1046,
20);
floor20 = new Rectangle(7043, floor20y = 1888, 1329,
20);
floor21 = new Rectangle(8347, floor21y = 1767, 643, 20);
floor22 = new Rectangle(8952, floor22y = 1639, 1098,
20);
floor23 = new Rectangle(9192, floor23y = 1884, 1898,
20);
floor24 = new Rectangle(11049, floor24y = 1742, 1080,
20);
floor25 = new Rectangle(12072, floor25y = 2152, 3387,
20);
floor26 = new Rectangle(4316, floor26y = 1042, 2443,
20);
floor27 = new Rectangle(6718, floor27y = 1150, 1637,
20);
floor28 = new Rectangle(8332, floor28y = 1275, 1740,
20);
floor29 = new Rectangle(10059, floor29y = 1124, 1534,
20);
floor30 = new Rectangle(4294, floor30y = 794, 1252, 20);
floor31 = new Rectangle(5723, floor31y = 669, 997, 20);
floor32 = new Rectangle(6767, floor32y = 779, 438, 20);
floor33 = new Rectangle(7320, floor33y = 781, 162, 20);
floor34 = new Rectangle(7571, floor34y = 793, 185, 20);
floor35 = new Rectangle(7869, floor35y = 784, 131, 20);
floor36 = new Rectangle(8123, floor36y = 787, 132, 20);
floor37 = new Rectangle(8378, floor37y = 779, 119, 20);
floor38 = new Rectangle(8626, floor38y = 777, 432, 20);
floor39 = new Rectangle(9194, floor39y = 772, 135, 20);
floor40 = new Rectangle(9473, floor40y = 765, 137, 20);
floor41 = new Rectangle(9706, floor41y = 775, 120, 20);
floor42 = new Rectangle(9912, floor42y = 779, 116, 20);
floor43 = new Rectangle(10072, floor43y = 726, 119, 20);
floor44 = new Rectangle(10254, floor44y = 643, 111, 20);
floor45 = new Rectangle(10416, floor45y = 539, 134, 20);
floor46 = new Rectangle(10654, floor46y = 482, 140, 20);
floor47 = new Rectangle(10884, floor47y = 394, 118, 20);
floor48 = new Rectangle(11090, floor48y = 494, 130, 20);
floor49 = new Rectangle(11297, floor49y = 386, 144, 20);
floor50 = new Rectangle(11488, floor50y = 743, 1098,
20);
floor51 = new Rectangle(11525, floor51y = 337, 136, 20);
floor52 = new Rectangle(11739, floor52y = 255, 137, 20);
floor53 = new Rectangle(11897, floor53y = 377, 146, 20);
floor54 = new Rectangle(12077, floor54y = 492, 127, 20);
floor55 = new Rectangle(12213, floor55y = 619, 128, 20);
floor56 = new Rectangle(0, floor56y = 3534, 615, 20);
floor57 = new Rectangle(615, floor57y = 3659, 181, 20);
floor58 = new Rectangle(825, floor58y = 3781, 128, 20);
floor59 = new Rectangle(478, floor59y = 3906, 166, 20);
floor60 = new Rectangle(635, floor60y = 4027, 173, 20);
floor61 = new Rectangle(319, floor61y = 4148, 159, 20);
floor62 = new Rectangle(598, floor62y = 4270, 184, 20);
floor63 = new Rectangle(808, floor63y = 4268, 150, 20);
floor64 = new Rectangle(434, floor64y = 4399, 169, 20);
floor65 = new Rectangle(618, floor65y = 4518, 207, 20);
floor66 = new Rectangle(364, floor66y = 4645, 186, 20);
floor67 = new Rectangle(782, floor67y = 4645, 167, 20);
floor68 = new Rectangle(291, floor68y = 4789, 414, 20);
floor69 = new Rectangle(673, floor69y = 4899, 722, 20);
floor70 = new Rectangle(1358, floor70y = 4783, 199, 20);
floor71 = new Rectangle(1590, floor71y = 4779, 108, 20);
floor72 = new Rectangle(3066, floor72y = 4772, 374, 20);
floor73 = new Rectangle(1521, floor73y = 4838, 1570,
20); //LAVA TILE
floor74 = new Rectangle(1364, floor74y = 4648, 120, 20);
floor75 = new Rectangle(1172, floor75y = 4524, 176, 20);
floor76 = new Rectangle(1310, floor76y = 4402, 178, 20);
floor77 = new Rectangle(1174, floor77y = 4271, 171, 20);
floor78 = new Rectangle(1343, floor78y = 4151, 164, 20);
floor79 = new Rectangle(1169, floor79y = 4026, 183, 20);
floor80 = new Rectangle(1331, floor80y = 3904, 190, 20);
floor81 = new Rectangle(1494, floor81y = 3781, 2305,
20);
floor82 = new Rectangle(3188, floor82y = 4644, 219, 20);
floor83 = new Rectangle(3194, floor83y = 4510, 201, 20);
floor84 = new Rectangle(3193, floor84y = 4386, 214, 20);
floor85 = new Rectangle(3185, floor85y = 4265, 210, 20);
floor86 = new Rectangle(3187, floor86y = 4135, 219, 20);
floor87 = new Rectangle(3193, floor87y = 4012, 213, 20);
floor88 = new Rectangle(3198, floor88y = 3899, 200, 20);
floor89 = new Rectangle(3785, floor89y = 3876, 372, 20);
floor90 = new Rectangle(3946, floor90y = 3637, 211, 20);
floor91 = new Rectangle(4126, floor91y = 3526, 270, 20);
floor92 = new Rectangle(4372, floor92y = 3639, 140, 20);
floor93 = new Rectangle(4172, floor93y = 3767, 445, 20);
floor94 = new Rectangle(4603, floor94y = 3521, 273, 20);
floor95 = new Rectangle(4973, floor95y = 3521, 536, 20);
floor96 = new Rectangle(5598, floor96y = 3521, 252, 20);
floor97 = new Rectangle(5996, floor97y = 3521, 744, 20);
floor98 = new Rectangle(6806, floor98y = 3521, 339, 20);
floor99 = new Rectangle(7266, floor99y = 3521, 553, 20);
floor100 = new Rectangle(7935, floor100y = 3521, 279,
20);
floor101 = new Rectangle(8372, floor101y = 3521, 342,
20);
floor102 = new Rectangle(8652, floor102y = 3761, 147,
20);
floor103 = new Rectangle(8820, floor103y = 3508, 173,
20);
floor104 = new Rectangle(8861, floor104y = 3752, 165,
20);
floor105 = new Rectangle(9111, floor105y = 3632, 153,
20);
floor106 = new Rectangle(9334, floor106y = 3746, 160,
20);
floor107 = new Rectangle(9587, floor107y = 3620, 201,
20);
floor108 = new Rectangle(9871, floor108y = 3501, 141,
20);
floor109 = new Rectangle(10060, floor109y = 3747, 53,
20);
floor110 = new Rectangle(10154, floor110y = 3617, 169,
20);
floor111 = new Rectangle(10405, floor111y = 3491, 152,
20);
floor112 = new Rectangle(10623, floor112y = 3611, 142,
20);
floor113 = new Rectangle(10816, floor113y = 3736, 134,
20);
floor114 = new Rectangle(11015, floor114y = 3741, 206,
20);
floor115 = new Rectangle(11187, floor115y = 3612, 255,
20);
floor116 = new Rectangle(11410, floor116y = 3486, 423,
20);
floor117 = new Rectangle(11643, floor117y = 3351, 190,
20);
floor118 = new Rectangle(11403, floor118y = 3228, 211,
20);
floor119 = new Rectangle(11633, floor119y = 3106, 201,
20);
floor120 = new Rectangle(11404, floor120y = 2983, 220,
20);
floor121 = new Rectangle(11783, floor121y = 2869, 597,
20);
floor122 = new Rectangle(12315, floor122y = 2656, 375,
20);
floor123 = new Rectangle(12650, floor123y = 2526, 451,
20);
floor124 = new Rectangle(13080, floor124y = 2414, 441,
20);
floor125 = new Rectangle(13330, floor125y = 2286, 205,
20);
floor126 = new Rectangle(8776, floor126y = 3846, 2280,
20); //LAVA TILE
floor127 = new Rectangle(4848, floor127y = 3616, 3550,
20); //LAVA TILE
floor149 = new Rectangle(7137, floor128y = 3521, 122,
20);
#endregion
#region temp wall
L1 = new Rectangle(537, 1574, 6, 20);
L2 = new Rectangle(763, 1457, 6, 20);
L3 = new Rectangle(1025, 1445, 6, 20);
L4 = new Rectangle(1935, 1304, 6, 20);
L5 = new Rectangle(2185, 1186, 6, 20);
L6 = new Rectangle(2518, 1082, 6, 20);
L7 = new Rectangle(2840, 938, 6, 20);
L8 = new Rectangle(3178, 938, 6, 20);
L9 = new Rectangle(3393, 938, 6, 20);
L10 = new Rectangle(3710, 820, 6, 20);
L11 = new Rectangle(4282, 799, 6, 20);
L12 = new Rectangle(5711, 674, 6, 20);
L13 = new Rectangle(6755, 784, 6, 20);
L14 = new Rectangle(7308, 786, 6, 20);
L15 = new Rectangle(7559, 798, 6, 20);
L16 = new Rectangle(7857, 789, 6, 20);
L17 = new Rectangle(8111, 792, 6, 20);
L18 = new Rectangle(8366, 784, 6, 20);
L19 = new Rectangle(8614, 782, 6, 20);
L20 = new Rectangle(9182, 777, 6, 20);
L21 = new Rectangle(9461, 775, 6, 20);
L22 = new Rectangle(9694, 780, 6, 20);
L23 = new Rectangle(9900, 784, 6, 20);
L24 = new Rectangle(10060, 731, 6, 20);
L25 = new Rectangle(10242, 648, 6, 20);
L26 = new Rectangle(10404, 544, 6, 20);
L27 = new Rectangle(10642, 487, 6, 20);
L28 = new Rectangle(10872, 399, 6, 20);
L29 = new Rectangle(11078, 499, 6, 20);
L30 = new Rectangle(11285, 391, 6, 20);
L31 = new Rectangle(11513, 342, 6, 20);
L32 = new Rectangle(11727, 230, 6, 20);
L33 = new Rectangle(11885, 382, 6, 20);
L34 = new Rectangle(12065, 497, 6, 20);
L35 = new Rectangle(12201, 624, 6, 20);
R1 = new Rectangle(734, 1574, 173, 20);
R2 = new Rectangle(970, 1457, 183, 20);
R3 = new Rectangle(1232, 1445, 183, 20);
R4 = new Rectangle(2137, 1304, 178, 20);
R5 = new Rectangle(2472, 1186, 263, 20);
R6 = new Rectangle(2761, 1082, 219, 20);
R7 = new Rectangle(3123, 938, 259, 20);
R8 = new Rectangle(3390, 938, 188, 20);
R9 = new Rectangle(3761, 938, 344, 20);
R10 = new Rectangle(4145, 820, 411, 20);
R11 = new Rectangle(5558, 799, 1252, 20);
R12 = new Rectangle(6732, 674, 997, 20);
R13 = new Rectangle(7217, 784, 438, 20);
R14 = new Rectangle(7494, 786, 162, 20);
R15 = new Rectangle(7768, 798, 185, 20);
R16 = new Rectangle(8012, 789, 131, 20);
R17 = new Rectangle(8267, 792, 132, 20);
R18 = new Rectangle(8509, 784, 119, 20);
R19 = new Rectangle(9070, 782, 432, 20);
R20 = new Rectangle(9341, 777, 135, 20);
R21 = new Rectangle(9622, 775, 137, 20);
R22 = new Rectangle(9848, 780, 120, 20);
R23 = new Rectangle(10050, 784, 116, 20);
R24 = new Rectangle(10203, 731, 119, 20);
R25 = new Rectangle(10377, 648, 111, 20);
R26 = new Rectangle(10562, 544, 134, 20);
R27 = new Rectangle(10806, 487, 140, 20);
R28 = new Rectangle(11014, 399, 118, 20);
R29 = new Rectangle(11232, 499, 130, 20);
R30 = new Rectangle(11453, 391, 144, 20);
R31 = new Rectangle(11673, 342, 136, 20);
R32 = new Rectangle(11888, 230, 137, 20);
R33 = new Rectangle(12055, 382, 146, 20);
R34 = new Rectangle(12216, 497, 127, 20);
R35 = new Rectangle(12326, 624, 128, 20);
#endregion
#region wall
wall1 = new Rectangle(484, 1693, 6, 242);
wall2 = new Rectangle(1298, 1431, 6, 503);
wall3 = new Rectangle(1869, 1431, 6, 126);
wall4 = new Rectangle(2834, 1432, 6, 126);
wall5 = new Rectangle(3337, 1432, 6, 109);
wall6 = new Rectangle(3728, 820, 6, 119);
wall7 = new Rectangle(4308, 1422, 6, 119);
wall8 = new Rectangle(5401, 1422, 6, 122);
wall9 = new Rectangle(6713, 1543, 6, 104);
wall10 = new Rectangle(7048, 1646, 6, 248);
wall11 = new Rectangle(6732, 1047, 6, 109);
wall12 = new Rectangle(8396, 1772, 6, 122);
wall13 = new Rectangle(8350, 1155, 6, 126);
wall14 = new Rectangle(8982, 1644, 6, 129);
wall15 = new Rectangle(9196, 1702, 6, 183);
wall16 = new Rectangle(10019, 1644, 6, 58);
wall17 = new Rectangle(10063, 1129, 6, 152);
wall18 = new Rectangle(11075, 1747, 6, 143);
wall19 = new Rectangle(11484, 1384, 6, 124);
wall20 = new Rectangle(11510, 748, 6, 381);
wall21 = new Rectangle(12521, 748, 6, 1179);
wall22 = new Rectangle(12094, 1747, 6, 410);
wall23 = new Rectangle(12331, 1507, 6, 412);
wall24 = new Rectangle(14451, 0, 6, 3000);
wall25 = new Rectangle(319, 3539, 6, 1290);
wall26 = new Rectangle(933, 3245, 6, 1200);
wall27 = new Rectangle(675, 4794, 6, 111);
wall28 = new Rectangle(1063, 4434, 6, 98);
wall29 = new Rectangle(1388, 4788, 6, 117);
wall30 = new Rectangle(1521, 4788, 6, 122);
wall31 = new Rectangle(1508, 4528, 6, 100);
wall32 = new Rectangle(1488, 4156, 6, 498);
wall33 = new Rectangle(1502, 3909, 6, 248);
wall34 = new Rectangle(1517, 3786, 6, 126);
wall35 = new Rectangle(1172, 3426, 6, 1099);
wall36 = new Rectangle(1596, 3786, 6, 767);
wall37 = new Rectangle(1674, 3786, 6, 509);
wall38 = new Rectangle(3088, 3786, 6, 740);
wall39 = new Rectangle(3088, 4777, 6, 126);
wall40 = new Rectangle(3202, 3786, 6, 724);
wall41 = new Rectangle(3385, 3876, 6, 991);
wall42 = new Rectangle(3784, 3786, 6, 96);
wall43 = new Rectangle(4150, 3531, 6, 351);
wall44 = new Rectangle(4178, 3639, 6, 129);
wall45 = new Rectangle(4376, 3531, 6, 114);
wall46 = new Rectangle(4605, 3526, 6, 247);
wall47 = new Rectangle(4868, 3526, 6, 319);
wall48 = new Rectangle(4877, 3526, 6, 282);
wall49 = new Rectangle(5509, 3526, 6, 282);
wall50 = new Rectangle(5599, 3526, 6, 282);
wall51 = new Rectangle(5849, 3526, 6, 282);
wall52 = new Rectangle(5995, 3526, 6, 282);
wall53 = new Rectangle(6736, 3526, 6, 282);
wall54 = new Rectangle(6802, 3526, 6, 282);
wall55 = new Rectangle(7137, 3526, 6, 282);
wall56 = new Rectangle(7259, 3526, 6, 282);
wall57 = new Rectangle(7810, 3526, 6, 282);
wall58 = new Rectangle(7935, 3526, 6, 282);
wall59 = new Rectangle(8212, 3526, 6, 282);
wall60 = new Rectangle(8372, 3526, 6, 282);
wall61 = new Rectangle(8657, 3526, 6, 242);
wall62 = new Rectangle(8776, 3766, 6, 136);
wall63 = new Rectangle(11045, 3746, 6, 125);
wall64 = new Rectangle(11216, 3617, 6, 137);
wall65 = new Rectangle(11433, 3491, 6, 127);
wall66 = new Rectangle(11820, 2874, 6, 618);
wall67 = new Rectangle(11413, 2529, 6, 700);
wall68 = new Rectangle(12360, 2661, 6, 214);
wall69 = new Rectangle(12679, 2530, 6, 131);
wall70 = new Rectangle(13092, 2419, 6, 113);
wall71 = new Rectangle(13080, 2157, 6, 96);
wall72 = new Rectangle(13516, 2157, 6, 263);
wall73 = new Rectangle(-12, 0, 6, 6000);
wall74 = new Rectangle(7757, 1407 + floodgateY, 6, 255);
//floodgate
wall75 = new Rectangle(9964, 1742, 6, 255); //bramble
wall76 = new Rectangle(7197, 2500, 6, 2000);
#endregion
#region roof
roof1 = new Rectangle(1471, 4648, 40, 10);
roof2 = new Rectangle(3088, 4501, 108, 10);
roof3 = new Rectangle(4176, 3639, 201, 10);
roof4 = new Rectangle(12331, 1918, 190, 10);
roof5 = new Rectangle(11485, 1507, 877, 10);
roof6 = new Rectangle(9191, 1702, 829, 10);
roof7 = new Rectangle(0, 3250, 933, 10);
roof8 = new Rectangle(943, 4455, 75, 10);
roof9 = new Rectangle(12072, 2152, 1008, 10);
#endregion
#region from 4e1
if (from4e1 == true)
{
drawStages = new DrawStages(18, stageManager);
drawSky = new DrawSky(1, stageManager);
loadOcean = new LoadOcean(3, stageManager);
loadFiresoldier = new LoadFiresoldier(true,
stageManager);
loadBone = new LoadBone(true, stageManager);
loadLavaball = new LoadLavaball(true, stageManager);
loadFirefloor = new LoadFirefloor(true,
stageManager);
loopFlameAtk = new LoopFlameAtk(true, breathSFX);
play5e2Bottom = new Play5e2Bottom(1, stageBGM);
play5e2Top = new Play5e2Top(1, stageBGM);
drawTreasureText = new DrawTreasureText(13,
stageManager, languageType);
tempVolumeA = 0.0f;
tempVolumeB = 1.0f;
toStage4e3 = false;
stageEndCT = 0;
cameraMaxX = 13352;
cameraMaxY = 4294;
drgnX = 12;
drgnY = 3391;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
drgnCamY = 3100;
independentBackgroundXY = 3120 + (3120 / 20);
#region Fire Floor
floor1CT = 0;
floor1Frame = 0;
floor1Wait = 600;
floor1Dur = 0;
floor1Act = 0;
floor1On = false;
floor2CT = 0;
floor2Frame = 0;
floor2Wait = 300;
floor2Dur = 0;
floor2Act = 0;
floor2On = false;
floor3CT = 0;
floor3Frame = 0;
floor3Wait = 0;
floor3Dur = 0;
floor3Act = 0;
floor3On = false;
#endregion
#region Obstacle
obs1Wait = 540;
obs2Wait = 420;
obs3Wait = 300;
obs4Wait = 180;
obs5Wait = 60;
obs6Wait = 540;
obs7Wait = 420;
obs8Wait = 300;
obs9Wait = 180;
obs10Wait = 60;
#endregion
//flame knight
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 30;
e1armor = 2;
e1X = 7137;
e1Y = 3900;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1projHeight = 0;
e1projWidth = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 2;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = true;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 110;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
//cannoneer
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 26;
e7armor = 0;
e7X = 11087;
e7Y = 3598;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7projHeight = 0;
e7projWidth = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 2;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = true;
e7ShockVul = false;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 60;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 26;
e8armor = 0;
e8X = 11287;
e8Y = 3469;
e8act = 0;
e8facing = 0;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8projHeight = 0;
e8projWidth = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 1;
e8FireVul = 2;
e8BoltVul = 0;
e8AcidVul = 0;
e8faceR = false;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = false;
e8BurnVul = true;
e8ShockVul = false;
e8peaceRes = false;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 60;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
#region e9
e9spawn = true;
e9CT = 0;
e9timer = 0;
e9HP = 26;
e9armor = 0;
e9X = 11538;
e9Y = 3343;
e9act = 0;
e9facing = 0;
e9frame = 0;
e9Opacity = 255;
e9invTimer = 0;
e9knockbackTimer = 0;
e9projHeight = 0;
e9projWidth = 0;
e9hitTimer = 0;
e9invBlink = 255;
e9Attack = 1;
e9FireVul = 2;
e9BoltVul = 0;
e9AcidVul = 0;
e9faceR = false;
e9invulnerable = false;
e9knockback = false;
e9knockbackRes = false;
e9onGround = true;
e9proximity = false;
e9touchWallL = false;
e9touchWallR = false;
e9breathhit = false;
e9clawhit = false;
e9frozen = false;
e9peaceful = false;
e9frRes = false;
e9BurnVul = true;
e9ShockVul = false;
e9peaceRes = false;
e9coins = false;
e9smoke = false;
e9smokeCT = 0;
e9coinValue = 60;
e9coinType = 0;
e9altAnimCT = 0;
#endregion
stage4e3 = true;
}
#endregion
#region from 4e2
if (from4e2 == true)
{
drawStages = new DrawStages(17, stageManager);
drawSky = new DrawSky(1, stageManager);
drawWater = new DrawWater(2, stageManager);
loadWaterfall = new LoadWaterfall(2, stageManager);
loadArcher = new LoadArcher(true, stageManager);
loadLancer = new LoadLancer(true, stageManager);
loadBone = new LoadBone(true, stageManager);
loadPikeman = new LoadPikeman(2, stageManager);
loadNeckbird = new LoadNeckbird(true, stageManager);
playStageMusic = new PlayStageMusic(6, stageBGM);
loopSpin = new LoopSpin(true, breathSFX);
drawTreasureText = new DrawTreasureText(13,
stageManager, languageType);
toStage4e3 = false;
stageEndCT = 0;
cameraMaxX = 13352;
cameraMaxY = 4294;
drgnX = 12;
drgnY = 1545;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
waterfall1Frozen = false;
sprinkler1HP = 60;
brambleHP = 180;
floodgateHP = 60;
floodgateY = 0;
brambleCT = 0;
brambleFrame = 0;
#region obstacle
#region obs1
obs1X = 7600;
obs1Y = 650;
obs1Wait = 0;
obs1Frame = 0;
obs1Act = 0;
obs1CT = 0;
#endregion
#region obs2
obs2X = 8123;
obs2Y = 644;
obs2Wait = 0;
obs2Frame = 0;
obs2Act = 0;
obs2CT = 0;
#endregion
#region obs3
obs3X = 9194;
obs3Y = 629;
obs3Wait = 100;
obs3Frame = 0;
obs3Act = 0;
obs3CT = 0;
#endregion
#region obs4
obs4X = 9473;
obs4Y = 622;
obs4Wait = 0;
obs4Frame = 0;
obs4Act = 0;
obs4CT = 0;
#endregion
#region obs5
obs5X = 9706;
obs5Y = 632;
obs5Wait = 100;
obs5Frame = 0;
obs5Act = 0;
obs5CT = 0;
#endregion
#region obs6
obs6X = 9912;
obs6Y = 636;
obs6Wait = 0;
obs6Frame = 0;
obs6Act = 0;
obs6CT = 0;
#endregion
#region obs7
obs7X = 10254;
obs7Y = 500;
obs7Wait = 100;
obs7Frame = 0;
obs7Act = 0;
obs7CT = 0;
#endregion
#region obs8
obs8X = 10416;
obs8Y = 396;
obs8Wait = 0;
obs8Frame = 0;
obs8Act = 0;
obs8CT = 0;
#endregion
#region obs9
obs9X = 10654;
obs9Y = 339;
obs9Wait = 0;
obs9Frame = 0;
obs9Act = 0;
obs9CT = 0;
#endregion
#region obs10
obs10X = 11297;
obs10Y = 243;
obs10Wait = 0;
obs10Frame = 0;
obs10Act = 0;
obs10CT = 0;
#endregion
#endregion
#region enemies
//archer
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 5;
e1armor = 0;
e1X = 2900;
e1Y = 1284;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = true;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 20;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 5;
e2armor = 0;
e2X = 795;
e2Y = 1309;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 0;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = true;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 20;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 5;
e3armor = 0;
e3X = 3600;
e3Y = 790;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 0;
e3BoltVul = 0;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = true;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 20;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
//pikeman
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 20;
e4armor = 0;
e4X = 1957;
e4Y = 1156;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4projHeight = 0;
e4projWidth = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 0;
e4BoltVul = 0;
e4AcidVul = 2;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = false;
e4ShockVul = false;
e4peaceRes = true;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 120;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 20;
e5armor = 0;
e5X = 4794;
e5Y = 651;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5projHeight = 0;
e5projWidth = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 1;
e5FireVul = 0;
e5BoltVul = 0;
e5AcidVul = 2;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = false;
e5ShockVul = false;
e5peaceRes = true;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 120;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6HP = 20;
e6armor = 0;
e6X = 11688;
e6Y = 600;
e6act = 0;
e6facing = 0;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6projHeight = 0;
e6projWidth = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 1;
e6FireVul = 0;
e6BoltVul = 0;
e6AcidVul = 2;
e6faceR = false;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = false;
e6BurnVul = false;
e6ShockVul = false;
e6peaceRes = true;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 120;
e6coinType = 0;
e6altAnimCT = 0;
#endregion
//cannoneer
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 26;
e7armor = 0;
e7X = 6500;
e7Y = 526;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7projHeight = 0;
e7projWidth = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 2;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = true;
e7ShockVul = false;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 60;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 26;
e8armor = 0;
e8X = 8800;
e8Y = 634;
e8act = 0;
e8facing = 0;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8projHeight = 0;
e8projWidth = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 1;
e8FireVul = 2;
e8BoltVul = 0;
e8AcidVul = 0;
e8faceR = false;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = false;
e8BurnVul = true;
e8ShockVul = false;
e8peaceRes = false;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 60;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
#region e9
e9spawn = true;
e9CT = 0;
e9timer = 0;
e9HP = 26;
e9armor = 0;
e9X = 8000;
e9Y = 1007;
e9act = 0;
e9facing = 0;
e9frame = 0;
e9Opacity = 255;
e9invTimer = 0;
e9knockbackTimer = 0;
e9projHeight = 0;
e9projWidth = 0;
e9hitTimer = 0;
e9invBlink = 255;
e9Attack = 1;
e9FireVul = 2;
e9BoltVul = 0;
e9AcidVul = 0;
e9faceR = false;
e9invulnerable = false;
e9knockback = false;
e9knockbackRes = false;
e9onGround = true;
e9proximity = false;
e9touchWallL = false;
e9touchWallR = false;
e9breathhit = false;
e9clawhit = false;
e9frozen = false;
e9peaceful = false;
e9frRes = false;
e9BurnVul = true;
e9ShockVul = false;
e9peaceRes = false;
e9coins = false;
e9smoke = false;
e9smokeCT = 0;
e9coinValue = 60;
e9coinType = 0;
e9altAnimCT = 0;
#endregion
//lancer
#region e10
e10spawn = true;
e10CT = 0;
e10timer = 0;
e10HP = 28;
e10armor = 0;
e10X = 7000;
e10Y = 1007;
e10reload = 120;
e10act = 0;
e10facing = 0;
e10frame = 0;
e10Opacity = 255;
e10invTimer = 0;
e10knockbackTimer = 0;
e10projHeight = 0;
e10projWidth = 0;
e10hitTimer = 0;
e10invBlink = 255;
e10Attack = 1;
e10FireVul = 0;
e10BoltVul = 1;
e10AcidVul = 0;
e10faceR = false;
e10invulnerable = false;
e10knockback = false;
e10knockbackRes = false;
e10onGround = true;
e10proximity = false;
e10touchWallL = false;
e10touchWallR = false;
e10breathhit = false;
e10clawhit = false;
e10frozen = false;
e10peaceful = false;
e10frRes = true;
e10BurnVul = false;
e10ShockVul = false;
e10peaceRes = true;
e10coins = false;
e10smoke = false;
e10smokeCT = 0;
e10coinValue = 110;
e10coinType = 0;
e10altAnimCT = 0;
#endregion
#region e11
e11spawn = true;
e11CT = 0;
e11timer = 0;
e11HP = 28;
e11armor = 0;
e11X = 9000;
e11Y = 1132;
e11reload = 120;
e11act = 0;
e11facing = 0;
e11frame = 0;
e11Opacity = 255;
e11invTimer = 0;
e11knockbackTimer = 0;
e11projHeight = 0;
e11projWidth = 0;
e11hitTimer = 0;
e11invBlink = 255;
e11Attack = 1;
e11FireVul = 0;
e11BoltVul = 1;
e11AcidVul = 0;
e11faceR = false;
e11invulnerable = false;
e11knockback = false;
e11knockbackRes = false;
e11onGround = true;
e11proximity = false;
e11touchWallL = false;
e11touchWallR = false;
e11breathhit = false;
e11clawhit = false;
e11frozen = false;
e11peaceful = false;
e11frRes = true;
e11BurnVul = false;
e11ShockVul = false;
e11peaceRes = true;
e11coins = false;
e11smoke = false;
e11smokeCT = 0;
e11coinValue = 110;
e11coinType = 0;
e11altAnimCT = 0;
#endregion
#region e12
e12spawn = true;
e12CT = 0;
e12timer = 0;
e12HP = 28;
e12armor = 0;
e12X = 10559;
e12Y = 981;
e12reload = 120;
e12act = 0;
e12facing = 0;
e12frame = 0;
e12Opacity = 255;
e12invTimer = 0;
e12knockbackTimer = 0;
e12projHeight = 0;
e12projWidth = 0;
e12hitTimer = 0;
e12invBlink = 255;
e12Attack = 1;
e12FireVul = 0;
e12BoltVul = 1;
e12AcidVul = 0;
e12faceR = false;
e12invulnerable = false;
e12knockback = false;
e12knockbackRes = false;
e12onGround = true;
e12proximity = false;
e12touchWallL = false;
e12touchWallR = false;
e12breathhit = false;
e12clawhit = false;
e12frozen = false;
e12peaceful = false;
e12frRes = true;
e12BurnVul = false;
e12ShockVul = false;
e12peaceRes = true;
e12coins = false;
e12smoke = false;
e12smokeCT = 0;
e12coinValue = 110;
e12coinType = 0;
e12altAnimCT = 0;
#endregion
#endregion
stage4e3 = true;
}
#endregion
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
}
#endregion
#region toStage 4-4
if (toStage4e4 == true)
{
drawStages = new DrawStages(19, stageManager);
playStageMusic = new PlayStageMusic(6, stageBGM);
loadSquire = new LoadSquire(true, stageManager);
loadArcher = new LoadArcher(true, stageManager);
loadCD = new LoadCD(true, stageManager);
loadXX = new LoadXX(true, stageManager);
loadStampede = new LoadStampede(true, stageManager);
loadHandler = new LoadHandler(true, stageManager);
loadSax = new LoadSax(true, stageManager);
loadTuba = new LoadTuba(true, stageManager);
loadBone = new LoadBone(true, stageManager);
loadPikeman = new LoadPikeman(1, stageManager);
loadNeckbird = new LoadNeckbird(true, stageManager);
npc4e4 = new Npc4e4(true, stageManager);
loopFireBreathAlt = new LoopFireBreathAlt(true,
breathSFX);
loopSpin = new LoopSpin(true, breathSFX);
loopLaser = new LoopLaser(true, breathSFX);
puzzleBramble = new PuzzleBramble(true, stageManager);
drawTreasureText = new DrawTreasureText(14,
stageManager, languageType);
#region floor
floor1 = new Rectangle(133, floor1y = 14562, 2623, 10);
floor2 = new Rectangle(768, floor2y = 14390, 1052, 10);
floor3 = new Rectangle(153, floor3y = 14234, 615, 10);
floor4 = new Rectangle(867, floor4y = 14081, 152, 10);
floor5 = new Rectangle(1147, floor5y = 14076, 159, 10);
floor6 = new Rectangle(1453, floor6y = 14071, 159, 10);
floor7 = new Rectangle(1740, floor7y = 14070, 176, 10);
floor8 = new Rectangle(2062, floor8y = 14067, 171, 10);
floor9 = new Rectangle(2322, floor9y = 14069, 339, 10);
floor10 = new Rectangle(2271, floor10y = 13911, 165,
10);
floor11 = new Rectangle(2063, floor11y = 13751, 175,
10);
floor12 = new Rectangle(2289, floor12y = 13578, 172,
10);
floor13 = new Rectangle(2082, floor13y = 13420, 183,
10);
floor14 = new Rectangle(153, floor14y = 13257, 425, 10);
floor15 = new Rectangle(1222, floor15y = 13250, 184,
10);
floor16 = new Rectangle(2310, floor16y = 13250, 176,
10);
floor17 = new Rectangle(2086, floor17y = 13090, 190,
10);
floor18 = new Rectangle(1839, floor18y = 12939, 183,
10);
floor19 = new Rectangle(1525, floor19y = 12781, 210,
10);
floor20 = new Rectangle(1228, floor20y = 12617, 218,
10);
floor21 = new Rectangle(913, floor21y = 12451, 203, 10);
floor22 = new Rectangle(1243, floor22y = 12294, 186,
10);
floor23 = new Rectangle(613, floor23y = 12129, 196, 10);
floor24 = new Rectangle(1521, floor24y = 12129, 186,
10);
floor25 = new Rectangle(1836, floor25y = 12126, 185,
10);
floor26 = new Rectangle(2150, floor26y = 12128, 182,
10);
floor27 = new Rectangle(2441, floor27y = 12131, 220,
10);
floor28 = new Rectangle(2431, floor28y = 11971, 231,
10);
floor29 = new Rectangle(2232, floor29y = 11792, 189,
10);
floor30 = new Rectangle(1274, floor30y = 11638, 167,
10);
floor31 = new Rectangle(1889, floor31y = 11644, 189,
10);
floor32 = new Rectangle(1638, floor32y = 11487, 173,
10);
floor33 = new Rectangle(1407, floor33y = 11310, 186,
10);
floor34 = new Rectangle(1167, floor34y = 11154, 176,
10);
floor35 = new Rectangle(1424, floor35y = 10993, 183,
10);
floor36 = new Rectangle(153, floor36y = 11971, 390, 10);
floor37 = new Rectangle(153, floor37y = 11803, 237, 10);
floor38 = new Rectangle(510, floor38y = 11644, 202, 10);
floor39 = new Rectangle(153, floor39y = 11490, 265, 10);
floor40 = new Rectangle(478, floor40y = 11320, 225, 10);
floor41 = new Rectangle(153, floor41y = 11161, 297, 10);
floor42 = new Rectangle(458, floor42y = 10998, 685, 10);
floor43 = new Rectangle(153, floor43y = 10812, 643, 10);
//SPIKE TILE
floor44 = new Rectangle(1166, floor44y = 10797, 220,
10);
floor45 = new Rectangle(897, floor45y = 10641, 209, 10);
floor46 = new Rectangle(1451, floor46y = 10643, 208,
10);
floor47 = new Rectangle(1788, floor47y = 10644, 189,
10);
floor48 = new Rectangle(678, floor48y = 10479, 174, 10);
floor49 = new Rectangle(432, floor49y = 10322, 156, 10);
floor50 = new Rectangle(154, floor50y = 10158, 216, 10);
floor51 = new Rectangle(699, floor51y = 10157, 166, 10);
floor52 = new Rectangle(986, floor52y = 10158, 169, 10);
floor53 = new Rectangle(1270, floor53y = 10157, 203,
10);
floor54 = new Rectangle(1590, floor54y = 10158, 203,
10);
floor55 = new Rectangle(2146, floor55y = 10644, 516,
10);
floor56 = new Rectangle(2496, floor56y = 10476, 165,
10);
floor57 = new Rectangle(2147, floor57y = 10322, 167,
10);
floor58 = new Rectangle(2317, floor58y = 10328, 131,
10); //SPIKE TILE
floor59 = new Rectangle(2479, floor59y = 10156, 182,
10);
floor60 = new Rectangle(1877, floor60y = 9998, 463, 10);
floor61 = new Rectangle(2340, floor61y = 10004, 133,
10); //SPIKE TILE
floor62 = new Rectangle(1612, floor62y = 9841, 220, 10);
floor63 = new Rectangle(2148, floor63y = 9808, 513, 10);
floor64 = new Rectangle(153, floor64y = 9684, 1385, 10);
floor65 = new Rectangle(572, floor65y = 9514, 2089, 10);
floor66 = new Rectangle(153, floor66y = 9342, 1382, 10);
floor67 = new Rectangle(1304, floor67y = 9188, 181, 10);
floor68 = new Rectangle(1060, floor68y = 9029, 169, 10);
floor69 = new Rectangle(1524, floor69y = 9029, 180, 10);
floor70 = new Rectangle(153, floor70y = 8868, 835, 10);
floor71 = new Rectangle(1776, floor71y = 8858, 191, 10);
floor72 = new Rectangle(2140, floor72y = 8853, 521, 10);
floor73 = new Rectangle(476, floor73y = 8705, 511, 10);
floor74 = new Rectangle(2471, floor74y = 8699, 190, 10);
floor75 = new Rectangle(153, floor75y = 8543, 626, 10);
floor76 = new Rectangle(993, floor76y = 8544, 226, 10);
floor77 = new Rectangle(2108, floor77y = 8542, 362, 10);
floor78 = new Rectangle(400, floor78y = 8383, 580, 10);
floor79 = new Rectangle(2477, floor79y = 8377, 184, 10);
floor80 = new Rectangle(153, floor80y = 8223, 408, 10);
floor81 = new Rectangle(2110, floor81y = 8227, 350, 10);
floor82 = new Rectangle(600, floor82y = 8059, 382, 10);
floor83 = new Rectangle(2269, floor83y = 8043, 392, 10);
floor84 = new Rectangle(967, floor84y = 7898, 1171, 10);
floor85 = new Rectangle(2158, floor85y = 7720, 143, 10);
floor86 = new Rectangle(153, floor86y = 7571, 239, 10);
floor87 = new Rectangle(769, floor87y = 7562, 174, 10);
floor88 = new Rectangle(1106, floor88y = 7567, 160, 10);
floor89 = new Rectangle(1365, floor89y = 7566, 169, 10);
floor90 = new Rectangle(1646, floor90y = 7567, 174, 10);
floor91 = new Rectangle(1960, floor91y = 7562, 146, 10);
floor92 = new Rectangle(2356, floor92y = 7557, 131, 10);
floor93 = new Rectangle(533, floor93y = 7404, 173, 10);
floor94 = new Rectangle(2528, floor94y = 7399, 132, 10);
floor95 = new Rectangle(387, floor95y = 7241, 144, 10);
floor96 = new Rectangle(2350, floor96y = 7242, 150, 10);
floor97 = new Rectangle(153, floor97y = 7085, 227, 10);
floor98 = new Rectangle(2538, floor98y = 7074, 122, 10);
floor99 = new Rectangle(419, floor99y = 6918, 176, 10);
floor100 = new Rectangle(2357, floor100y = 6920, 152,
10);
floor101 = new Rectangle(153, floor101y = 6756, 233,
10);
floor102 = new Rectangle(2124, floor102y = 6762, 188,
10);
floor103 = new Rectangle(524, floor103y = 6591, 352,
10);
floor104 = new Rectangle(2259, floor104y = 6597, 1041,
10);
floor105 = new Rectangle(153, floor105y = 6431, 393,
10);
floor106 = new Rectangle(542, floor106y = 6261, 1698,
10);
floor107 = new Rectangle(1866, floor107y = 6101, 357,
10);
floor108 = new Rectangle(1171, floor108y = 5933, 605,
10);
floor109 = new Rectangle(379, floor109y = 5764, 705,
10);
floor110 = new Rectangle(153, floor110y = 5599, 227,
10);
floor111 = new Rectangle(416, floor111y = 5439, 160,
10);
floor112 = new Rectangle(153, floor112y = 5283, 223,
10);
floor113 = new Rectangle(429, floor113y = 5117, 175,
10);
floor114 = new Rectangle(676, floor114y = 5131, 266,
10); //SPIKE TILE
floor115 = new Rectangle(1021, floor115y = 5124, 186,
10);
floor116 = new Rectangle(1342, floor116y = 5133, 277,
10); //SPIKE TILE
floor117 = new Rectangle(1762, floor117y = 5133, 155,
10);
floor118 = new Rectangle(2070, floor118y = 4972, 169,
10);
floor119 = new Rectangle(1923, floor119y = 4980, 143,
10); //SPIKE TILE
floor120 = new Rectangle(1770, floor120y = 4795, 139,
10);
floor121 = new Rectangle(1429, floor121y = 4796, 209,
10); //SPIKE TILE
floor122 = new Rectangle(153, floor122y = 4803, 1076,
10); //SPIKE TILE
floor123 = new Rectangle(906, floor123y = 4643, 159,
10); //SPIKE TILE
floor124 = new Rectangle(1183, floor124y = 4644, 162,
10);
floor125 = new Rectangle(651, floor125y = 4471, 169,
10);
floor126 = new Rectangle(153, floor126y = 4338, 450,
10);
floor127 = new Rectangle(153, floor127y = 4155, 223,
10);
floor128 = new Rectangle(453, floor128y = 3992, 160,
10);
floor129 = new Rectangle(695, floor129y = 4005, 195,
10); //SPIKE TILE
floor130 = new Rectangle(994, floor130y = 3834, 157,
10);
floor131 = new Rectangle(1250, floor131y = 3680, 174,
10);
floor132 = new Rectangle(1574, floor132y = 3519, 171,
10);
floor133 = new Rectangle(1844, floor133y = 3536, 406,
10);
floor134 = new Rectangle(1880, floor134y = 3370, 215,
10);
floor135 = new Rectangle(1892, floor135y = 3211, 163,
10); //SPIKE TILE
floor136 = new Rectangle(1318, floor136y = 3206, 574,
10);
floor137 = new Rectangle(1412, floor137y = 3021, 840,
10);
floor138 = new Rectangle(969, floor138y = 2862, 448,
10);
floor139 = new Rectangle(154, floor139y = 2714, 768,
10);
floor140 = new Rectangle(745, floor140y = 2544, 1527,
10);
floor141 = new Rectangle(718, floor141y = 2334, 934,
10);
floor142 = new Rectangle(914, floor142y = 2161, 281,
10);
floor143 = new Rectangle(1218, floor143y = 1992, 1099,
10);
floor144 = new Rectangle(1593, floor144y = 1825, 463,
10);
floor145 = new Rectangle(1027, floor145y = 1671, 481,
10);
floor146 = new Rectangle(1015, floor146y = 1502, 198,
10);
floor147 = new Rectangle(512, floor147y = 1344, 515,
10);
floor148 = new Rectangle(1155, floor148y = 1194, 736,
10);
floor149 = new Rectangle(1592, floor149y = 1031, 286,
10);
floor150 = new Rectangle(947, floor150y = 863, 609, 10);
floor151 = new Rectangle(1402, floor151y = 7778, 375,
20); //bramble 1
#endregion
#region temp wall
#region Rectangle L
L1 = new Rectangle(121, 14567, 6, 20);
L2 = new Rectangle(756, 14395, 6, 20);
L3 = new Rectangle(141, 14239, 6, 20);
L4 = new Rectangle(865, 14086, 6, 20);
L5 = new Rectangle(1135, 14081, 6, 20);
L6 = new Rectangle(1441, 14076, 6, 20);
L7 = new Rectangle(1728, 14075, 6, 20);
L8 = new Rectangle(2050, 14072, 6, 20);
L9 = new Rectangle(2310, 14074, 5, 20);
L10 = new Rectangle(2259, 13916, 6, 20);
L11 = new Rectangle(2051, 13756, 6, 20);
L12 = new Rectangle(2277, 13583, 6, 20);
L13 = new Rectangle(2070, 13425, 6, 20);
L14 = new Rectangle(141, 13262, 6, 20);
L15 = new Rectangle(1210, 13255, 6, 20);
L16 = new Rectangle(2298, 13255, 6, 20);
L17 = new Rectangle(2074, 13095, 6, 20);
L18 = new Rectangle(1827, 12944, 6, 20);
L19 = new Rectangle(1513, 12786, 6, 20);
L20 = new Rectangle(1216, 12622, 6, 20);
L21 = new Rectangle(901, 12456, 6, 20);
L22 = new Rectangle(1231, 12299, 6, 20);
L23 = new Rectangle(601, 12134, 6, 20);
L24 = new Rectangle(1509, 12134, 6, 20);
L25 = new Rectangle(1824, 12131, 6, 20);
L26 = new Rectangle(2138, 12133, 6, 20);
L27 = new Rectangle(2429, 12136, 6, 20);
L28 = new Rectangle(2419, 11976, 6, 20);
L29 = new Rectangle(2220, 11797, 6, 20);
L30 = new Rectangle(1262, 11643, 6, 20);
L31 = new Rectangle(1877, 11649, 6, 20);
L32 = new Rectangle(1626, 11492, 6, 20);
L33 = new Rectangle(1395, 11315, 6, 20);
L34 = new Rectangle(1155, 11159, 6, 20);
L35 = new Rectangle(1412, 10998, 6, 20);
L36 = new Rectangle(141, 11976, 6, 20);
L37 = new Rectangle(141, 11495, 6, 20);
L38 = new Rectangle(466, 11325, 6, 20);
L39 = new Rectangle(141, 11166, 6, 20);
L40 = new Rectangle(446, 11003, 6, 20); //branch tile,
short R
L41 = new Rectangle(1154, 10802, 6, 20);
L42 = new Rectangle(885, 10646, 6, 20);
L43 = new Rectangle(1439, 10648, 6, 20);
L44 = new Rectangle(1776, 10649, 6, 20);
L45 = new Rectangle(666, 10484, 6, 20);
L46 = new Rectangle(420, 10327, 6, 20);
L47 = new Rectangle(142, 10163, 6, 20);
L48 = new Rectangle(687, 10162, 6, 20);
L49 = new Rectangle(974, 10163, 6, 20);
L50 = new Rectangle(1258, 10162, 6, 20);
L51 = new Rectangle(1578, 10163, 6, 20);
L52 = new Rectangle(2134, 10649, 6, 20);
L53 = new Rectangle(2484, 10481, 6, 20);
L54 = new Rectangle(2135, 10327, 6, 20);
L55 = new Rectangle(2467, 10161, 6, 20);
L56 = new Rectangle(2135, 10003, 6, 20);
L57 = new Rectangle(1600, 9846, 6, 20);
L58 = new Rectangle(2136, 9813, 6, 20);
L59 = new Rectangle(141, 9689, 6, 20);
L60 = new Rectangle(560, 9519, 6, 20);
L61 = new Rectangle(141, 9347, 6, 20);
L62 = new Rectangle(1292, 9193, 6, 20);
L63 = new Rectangle(1048, 9034, 6, 20);
L64 = new Rectangle(1512, 9034, 6, 20);
L65 = new Rectangle(141, 8873, 6, 20);
L66 = new Rectangle(1764, 8863, 6, 20);
L67 = new Rectangle(2128, 8858, 6, 20);
L68 = new Rectangle(2459, 8704, 6, 20);
L69 = new Rectangle(141, 8548, 6, 20);
L70 = new Rectangle(981, 8549, 6, 20);
L71 = new Rectangle(2096, 8547, 6, 20);
L72 = new Rectangle(388, 8388, 6, 20);
L73 = new Rectangle(2098, 8232, 6, 20);
L74 = new Rectangle(588, 8064, 6, 20);
L75 = new Rectangle(2257, 8048, 6, 20);
L76 = new Rectangle(955, 7903, 6, 20);
L77 = new Rectangle(2146, 7725, 6, 20);
L78 = new Rectangle(141, 7576, 6, 20);
L79 = new Rectangle(757, 7567, 6, 20);
L80 = new Rectangle(1094, 7572, 6, 20);
L81 = new Rectangle(1353, 7571, 6, 20);
L82 = new Rectangle(1634, 7572, 6, 20);
L83 = new Rectangle(1968, 7567, 6, 20);
L84 = new Rectangle(2344, 7562, 6, 20);
L85 = new Rectangle(521, 7409, 6, 20);
L86 = new Rectangle(2516, 7404, 6, 20);
L87 = new Rectangle(375, 7246, 6, 20);
L88 = new Rectangle(2338, 7247, 6, 20);
L89 = new Rectangle(141, 7090, 6, 20);
L90 = new Rectangle(2526, 7079, 6, 20);
L91 = new Rectangle(407, 6923, 6, 20);
L92 = new Rectangle(2345, 6925, 6, 20);
L93 = new Rectangle(141, 6761, 6, 20);
L94 = new Rectangle(2112, 6767, 6, 20);
L95 = new Rectangle(512, 6596, 6, 20);
L96 = new Rectangle(2459, 6602, 6, 20); //branch tile,
short L
L97 = new Rectangle(141, 6436, 6, 20);
L98 = new Rectangle(1854, 6106, 6, 20);
L99 = new Rectangle(1159, 5938, 6, 20);
L100 = new Rectangle(367, 5769, 6, 20);
L101 = new Rectangle(141, 5604, 6, 20);
L102 = new Rectangle(404, 5444, 6, 20);
L103 = new Rectangle(141, 5288, 6, 20);
L104 = new Rectangle(417, 5122, 6, 20);
L105 = new Rectangle(1009, 5129, 6, 20);
L106 = new Rectangle(1750, 5138, 6, 20);
L107 = new Rectangle(2048, 4977, 6, 20);
L108 = new Rectangle(1758, 4800, 6, 20);
L109 = new Rectangle(1171, 4649, 6, 20);
L110 = new Rectangle(639, 4476, 6, 20);
L111 = new Rectangle(141, 4343, 6, 20);
L112 = new Rectangle(141, 4160, 6, 20);
L113 = new Rectangle(441, 3997, 6, 20);
L114 = new Rectangle(982, 3839, 6, 20);
L115 = new Rectangle(1238, 3685, 6, 20);
L116 = new Rectangle(1562, 3524, 6, 20);
L117 = new Rectangle(1832, 3541, 6, 20);
L118 = new Rectangle(1868, 3375, 6, 20);
L119 = new Rectangle(1400, 3026, 6, 20);
L120 = new Rectangle(957, 2867, 6, 20);
L121 = new Rectangle(142, 2719, 6, 20);
L122 = new Rectangle(733, 2549, 6, 20);
L123 = new Rectangle(706, 2339, 6, 20);
L124 = new Rectangle(902, 2166, 6, 20);
L125 = new Rectangle(1206, 1997, 6, 20);
L126 = new Rectangle(1015, 1676, 6, 20);
L127 = new Rectangle(1003, 1507, 6, 20);
L128 = new Rectangle(500, 1349, 6, 20);
L129 = new Rectangle(1143, 1199, 6, 20);
L130 = new Rectangle(1580, 1036, 6, 20);
L131 = new Rectangle(935, 868, 6, 20);
#endregion
#region Rectangle R
R1 = new Rectangle(2768, 14567, 6, 20);
R2 = new Rectangle(1832, 14395, 6, 20);
R3 = new Rectangle(780, 14239, 6, 20);
R4 = new Rectangle(1031, 14086, 6, 20);
R5 = new Rectangle(1318, 14081, 6, 20);
R6 = new Rectangle(1624, 14076, 6, 20);
R7 = new Rectangle(1928, 14075, 6, 20);
R8 = new Rectangle(2245, 14072, 6, 20);
R9 = new Rectangle(2673, 14074, 6, 20);
R10 = new Rectangle(2448, 13916, 6, 20);
R11 = new Rectangle(2250, 13756, 6, 20);
R12 = new Rectangle(2473, 13583, 6, 20);
R13 = new Rectangle(2277, 13425, 6, 20);
R14 = new Rectangle(590, 13262, 6, 20);
R15 = new Rectangle(1418, 13255, 6, 20);
R16 = new Rectangle(2489, 13255, 6, 20);
R17 = new Rectangle(2288, 13095, 6, 20);
R18 = new Rectangle(2034, 12944, 6, 20);
R19 = new Rectangle(1747, 12786, 6, 20);
R20 = new Rectangle(1458, 12622, 6, 20);
R21 = new Rectangle(1128, 12456, 6, 20);
R22 = new Rectangle(1441, 12299, 6, 20);
R23 = new Rectangle(821, 12134, 6, 20);
R24 = new Rectangle(1719, 12134, 6, 20);
R25 = new Rectangle(2032, 12131, 6, 20);
R26 = new Rectangle(2344, 12133, 6, 20);
R27 = new Rectangle(2673, 12136, 6, 20);
R28 = new Rectangle(2674, 11976, 6, 20);
R29 = new Rectangle(2433, 11797, 6, 20);
R30 = new Rectangle(1453, 11643, 6, 20);
R31 = new Rectangle(2090, 11649, 6, 20);
R32 = new Rectangle(1823, 11492, 6, 20);
R33 = new Rectangle(1605, 11315, 6, 20);
R34 = new Rectangle(1355, 11159, 6, 20);
R35 = new Rectangle(1619, 10998, 6, 20);
R36 = new Rectangle(555, 11976, 6, 20);
R37 = new Rectangle(730, 11495, 6, 20);
R38 = new Rectangle(715, 11325, 6, 20);
R39 = new Rectangle(462, 11166, 6, 20);
R40 = new Rectangle(711, 11003, 6, 20); //branch tile,
short R
R41 = new Rectangle(1398, 10802, 6, 20);
R42 = new Rectangle(1118, 10646, 6, 20);
R43 = new Rectangle(1671, 10648, 6, 20);
R44 = new Rectangle(1989, 10649, 6, 20);
R45 = new Rectangle(864, 10484, 6, 20);
R46 = new Rectangle(600, 10327, 6, 20);
R47 = new Rectangle(382, 10163, 6, 20);
R48 = new Rectangle(877, 10162, 6, 20);
R49 = new Rectangle(1167, 10163, 6, 20);
R50 = new Rectangle(1485, 10162, 6, 20);
R51 = new Rectangle(1805, 10163, 6, 20);
R52 = new Rectangle(2674, 10649, 6, 20);
R53 = new Rectangle(2673, 10481, 6, 20);
R54 = new Rectangle(2376, 10327, 6, 20);
R55 = new Rectangle(2673, 10161, 6, 20);
R56 = new Rectangle(2352, 10003, 6, 20);
R57 = new Rectangle(1844, 9846, 6, 20);
R58 = new Rectangle(2673, 9813, 6, 20);
R59 = new Rectangle(1550, 9689, 6, 20);
R60 = new Rectangle(2673, 9519, 6, 20);
R61 = new Rectangle(1547, 9347, 6, 20);
R62 = new Rectangle(1497, 9193, 6, 20);
R63 = new Rectangle(1241, 9034, 6, 20);
R64 = new Rectangle(1716, 9034, 6, 20);
R65 = new Rectangle(1000, 8873, 6, 20);
R66 = new Rectangle(1979, 8863, 6, 20);
R67 = new Rectangle(2673, 8858, 6, 20);
R68 = new Rectangle(2673, 8704, 6, 20);
R69 = new Rectangle(791, 8548, 6, 20);
R70 = new Rectangle(1231, 8549, 6, 20);
R71 = new Rectangle(2482, 8547, 6, 20);
R72 = new Rectangle(992, 8388, 6, 20);
R73 = new Rectangle(2472, 8232, 6, 20);
R74 = new Rectangle(994, 8064, 6, 20);
R75 = new Rectangle(2673, 8048, 6, 20);
R76 = new Rectangle(2150, 7903, 6, 20);
R77 = new Rectangle(2313, 7725, 6, 20);
R78 = new Rectangle(404, 7576, 6, 20);
R79 = new Rectangle(955, 7567, 6, 20);
R80 = new Rectangle(1278, 7572, 6, 20);
R81 = new Rectangle(1546, 7571, 6, 20);
R82 = new Rectangle(1832, 7572, 6, 20);
R83 = new Rectangle(2118, 7567, 6, 20);
R84 = new Rectangle(2499, 7562, 6, 20);
R85 = new Rectangle(718, 7409, 6, 20);
R86 = new Rectangle(2672, 7404, 6, 20);
R87 = new Rectangle(543, 7246, 6, 20);
R88 = new Rectangle(2512, 7247, 6, 20);
R89 = new Rectangle(392, 7090, 6, 20);
R90 = new Rectangle(2672, 7079, 6, 20);
R91 = new Rectangle(607, 6923, 6, 20);
R92 = new Rectangle(2521, 6925, 6, 20);
R93 = new Rectangle(398, 6761, 6, 20);
R94 = new Rectangle(2324, 6767, 6, 20);
R95 = new Rectangle(888, 6596, 6, 20);
R96 = new Rectangle(3524, 6602, 6, 20); //branch tile,
short L
R97 = new Rectangle(558, 6436, 6, 20);
R98 = new Rectangle(2235, 6106, 6, 20);
R99 = new Rectangle(1788, 5938, 6, 20);
R100 = new Rectangle(1096, 5769, 6, 20);
R101 = new Rectangle(392, 5604, 6, 20);
R102 = new Rectangle(588, 5444, 6, 20);
R103 = new Rectangle(388, 5288, 6, 20);
R104 = new Rectangle(616, 5122, 6, 20);
R105 = new Rectangle(1219, 5129, 6, 20);
R106 = new Rectangle(1929, 5138, 6, 20);
R107 = new Rectangle(2251, 4977, 6, 20);
R108 = new Rectangle(1921, 4800, 6, 20);
R109 = new Rectangle(1357, 4649, 6, 20);
R110 = new Rectangle(832, 4476, 6, 20);
R111 = new Rectangle(615, 4343, 6, 20);
R112 = new Rectangle(388, 4160, 6, 20);
R113 = new Rectangle(625, 3997, 6, 20);
R114 = new Rectangle(1163, 3839, 6, 20);
R115 = new Rectangle(1436, 3685, 6, 20);
R116 = new Rectangle(1757, 3524, 6, 20);
R117 = new Rectangle(2262, 3541, 6, 20);
R118 = new Rectangle(2107, 3375, 6, 20);
R119 = new Rectangle(2264, 3026, 6, 20);
R120 = new Rectangle(1429, 2867, 6, 20);
R121 = new Rectangle(934, 2719, 6, 20);
R122 = new Rectangle(2284, 2549, 6, 20);
R123 = new Rectangle(1664, 2339, 6, 20);
R124 = new Rectangle(1207, 2166, 6, 20);
R125 = new Rectangle(2329, 1997, 6, 20);
R126 = new Rectangle(1520, 1676, 6, 20);
R127 = new Rectangle(1225, 1507, 6, 20);
R128 = new Rectangle(1039, 1349, 6, 20);
R129 = new Rectangle(1903, 1199, 6, 20);
R130 = new Rectangle(1890, 1036, 6, 20);
R131 = new Rectangle(1568, 868, 6, 20);
#endregion
#endregion
#region wall
wall1 = new Rectangle(692, 11667, 6, 132); //SPIKE TILE
wall2 = new Rectangle(699, 11014, 6, 649);
wall3 = new Rectangle(2147, 10003, 6, 414);
wall4 = new Rectangle(983, 7903, 6, 802);
wall5 = new Rectangle(2110, 7903, 6, 713);
wall6 = new Rectangle(2659, 6602, 6, 10065);
wall7 = new Rectangle(865, 6266, 6, 457);
wall8 = new Rectangle(1875, 3211, 6, 160);
wall9 = new Rectangle(2241, 1997, 6, 4105);
wall10 = new Rectangle(2033, 1830, 6, 168);
wall11 = new Rectangle(1027, 1349, 6, 332);
wall12 = new Rectangle(718, 1349, 6, 981);
wall13 = new Rectangle(153, 0, 6, 14563);
wall14 = new Rectangle(615, 0, 6, 1349);
wall15 = new Rectangle(1024, 0, 6, 849);
wall16 = new Rectangle(1870, 0, 6, 1180);
wall17 = new Rectangle(2651, 0, 6, 6373);
wall18 = new Rectangle(1403, 7783, 6, 150);
wall19 = new Rectangle(1771, 7783, 6, 150);
wall20 = new Rectangle(1325, 863, 6, 331);
wall21 = new Rectangle(1402, 7688, 375, 300);
wall22 = new Rectangle(1275, 863, 200, 331);
#endregion
toStage4e4 = false;
stageEndCT = 0;
cameraMaxX = 1515;
cameraMaxY = 14031;
drgnX = 210;
drgnY = 14419;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
brambleAHP = 120;
brambleAFreeze = 120;
brambleACT = 0;
brambleAFrame = 0;
brambleBHP = 180;
brambleBCT = 0;
brambleBFrame = 0;
#region obstacle
#region obs7
obs7X = 1669;
obs7Y = 7424;
obs7Wait = 100;
obs7Frame = 0;
obs7Act = 0;
obs7CT = 0;
#endregion
#region obs8
obs8X = 1385;
obs8Y = 7423;
obs8Wait = 0;
obs8Frame = 0;
obs8Act = 0;
obs8CT = 0;
#endregion
#region obs9
obs9X = 1122;
obs9Y = 7424;
obs9Wait = 0;
obs9Frame = 0;
obs9Act = 0;
obs9CT = 0;
#endregion
#endregion
#region monsters
//squire
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 6;
e1armor = 0;
e1X = 1100;
e1Y = 14247;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 10;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
//archer
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 5;
e2armor = 0;
e2X = 2522;
e2Y = 13926;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 0;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = true;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 20;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 5;
e3armor = 0;
e3X = 1242;
e3Y = 13107;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 0;
e3BoltVul = 0;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = true;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 20;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 5;
e4armor = 0;
e4X = 1304;
e4Y = 11495;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 0;
e4BoltVul = 0;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = true;
e4ShockVul = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 20;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 5;
e5armor = 0;
e5X = 2300;
e5Y = 9665;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 1;
e5FireVul = 0;
e5BoltVul = 0;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = true;
e5ShockVul = false;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 20;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6HP = 5;
e6armor = 0;
e6X = 2112;
e6Y = 6118;
e6act = 0;
e6facing = 0;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 1;
e6FireVul = 0;
e6BoltVul = 0;
e6AcidVul = 0;
e6faceR = false;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = false;
e6BurnVul = true;
e6ShockVul = false;
e6peaceRes = false;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 20;
e6coinType = 0;
e6altAnimCT = 0;
#endregion
//heavy CD
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7HP = 12;
e7armor = 2;
e7X = 2260;
e7Y = 8084;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 1;
e7FireVul = 0;
e7BoltVul = 0;
e7AcidVul = 2;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7frRes = false;
e7BurnVul = false;
e7ShockVul = false;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7smokeCT = 0;
e7coinValue = 30;
e7coinType = 0;
e7altAnimCT = 0;
#endregion
//heavyXX
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8HP = 50;
e8armor = 5;
e8X = 2158;
e8Y = 8399;
e8act = 0;
e8facing = 0;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 1;
e8FireVul = 0;
e8BoltVul = 0;
e8AcidVul = 2;
e8faceR = false;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8frRes = false;
e8BurnVul = false;
e8ShockVul = false;
e8peaceRes = false;
e8coins = false;
e8smoke = false;
e8smokeCT = 0;
e8coinValue = 300;
e8coinType = 0;
e8altAnimCT = 0;
#endregion
//stampede Type A
#region e9
e9spawn = true;
e9CT = 0;
e9timer = 0;
e9HP = 30;
e9armor = 0;
e9X = 1022;
e9Y = 9242;
e9act = 0;
e9facing = 0;
e9frame = 0;
e9Opacity = 255;
e9invTimer = 0;
e9knockbackTimer = 0;
e9hitTimer = 0;
e9invBlink = 255;
e9Attack = 2;
e9FireVul = 0;
e9BoltVul = 0;
e9AcidVul = 0;
e9faceR = false;
e9invulnerable = false;
e9knockback = false;
e9knockbackRes = false;
e9onGround = true;
e9proximity = false;
e9touchWallL = false;
e9touchWallR = false;
e9breathhit = false;
e9clawhit = false;
e9frozen = false;
e9peaceful = false;
e9frRes = false;
e9BurnVul = false;
e9ShockVul = false;
e9peaceRes = false;
e9coins = false;
e9smoke = false;
e9smokeCT = 0;
e9coinValue = 0;
e9coinType = 0;
e9altAnimCT = 0;
e9FrameHalf = 4;
#endregion
//handler - land
#region e10
e10spawn = true;
e10CT = 0;
e10timer = 0;
e10HP = 12;
e10armor = 0;
e10X = 1855;
e10Y = 1849;
e10projA_X = 2172;
e10projA_Y = 1849;
e10act = 0;
e10facing = 0;
e10frame = 0;
e10Opacity = 255;
e10invTimer = 0;
e10knockbackTimer = 0;
e10projHeight = 0;
e10projWidth = 0;
e10hitTimer = 0;
e10invBlink = 255;
e10Attack = 1;
e10FireVul = 0;
e10BoltVul = 1;
e10AcidVul = 0;
e10faceR = false;
e10invulnerable = false;
e10knockback = false;
e10knockbackRes = false;
e10onGround = true;
e10proximity = false;
e10touchWallL = false;
e10touchWallR = false;
e10breathhit = false;
e10clawhit = false;
e10frozen = false;
e10peaceful = false;
e10frRes = false;
e10BurnVul = false;
e10ShockVul = false;
e10peaceRes = false;
e10coins = false;
e10smoke = false;
e10smokeCT = 0;
e10coinValue = 40;
e10coinType = 0;
e10altAnimCT = 0;
#endregion
#region e11
e11spawn = true;
e11CT = 0;
e11timer = 0;
e11HP = 12;
e11armor = 0;
e11X = 1053;
e11Y = 8401;
e11projA_X = 1053;
e11projA_Y = 8401;
e11act = 0;
e11facing = 0;
e11frame = 0;
e11Opacity = 255;
e11invTimer = 0;
e11knockbackTimer = 0;
e11projHeight = 0;
e11projWidth = 0;
e11hitTimer = 0;
e11invBlink = 255;
e11Attack = 1;
e11FireVul = 0;
e11BoltVul = 1;
e11AcidVul = 0;
e11faceR = false;
e11invulnerable = false;
e11knockback = false;
e11knockbackRes = false;
e11onGround = true;
e11proximity = false;
e11touchWallL = false;
e11touchWallR = false;
e11breathhit = false;
e11clawhit = false;
e11frozen = false;
e11peaceful = false;
e11frRes = false;
e11BurnVul = false;
e11ShockVul = false;
e11peaceRes = false;
e11coins = false;
e11smoke = false;
e11smokeCT = 0;
e11coinValue = 40;
e11coinType = 0;
e11altAnimCT = 0;
#endregion
//sax
#region e12
e12spawn = true;
e12CT = 0;
e12timer = 0;
e12HP = 17;
e12armor = 0;
e12X = 913;
e12Y = 12308;
e12act = 0;
e12facing = 0;
e12frame = 0;
e12Opacity = 255;
e12invTimer = 0;
e12knockbackTimer = 0;
e12projHeight = 0;
e12projWidth = 0;
e12hitTimer = 0;
e12invBlink = 255;
e12Attack = 1;
e12FireVul = 2;
e12BoltVul = 0;
e12AcidVul = 0;
e12faceR = false;
e12invulnerable = false;
e12knockback = false;
e12knockbackRes = false;
e12onGround = true;
e12proximity = false;
e12touchWallL = false;
e12touchWallR = false;
e12breathhit = false;
e12clawhit = false;
e12frozen = false;
e12peaceful = false;
e12frRes = false;
e12BurnVul = true;
e12ShockVul = false;
e12peaceRes = false;
e12coins = false;
e12smoke = false;
e12smokeCT = 0;
e12coinValue = 30;
e12coinType = 0;
e12altAnimCT = 0;
#endregion
#region e13
e13spawn = true;
e13CT = 0;
e13timer = 0;
e13HP = 17;
e13armor = 0;
e13X = 936;
e13Y = 4500;
e13act = 0;
e13facing = 0;
e13frame = 0;
e13Opacity = 255;
e13invTimer = 0;
e13knockbackTimer = 0;
e13projHeight = 0;
e13projWidth = 0;
e13hitTimer = 0;
e13invBlink = 255;
e13Attack = 1;
e13FireVul = 2;
e13BoltVul = 0;
e13AcidVul = 0;
e13faceR = false;
e13invulnerable = false;
e13knockback = false;
e13knockbackRes = false;
e13onGround = true;
e13proximity = false;
e13touchWallL = false;
e13touchWallR = false;
e13breathhit = false;
e13clawhit = false;
e13frozen = false;
e13peaceful = false;
e13frRes = false;
e13BurnVul = true;
e13ShockVul = false;
e13peaceRes = false;
e13coins = false;
e13smoke = false;
e13smokeCT = 0;
e13coinValue = 30;
e13coinType = 0;
e13altAnimCT = 0;
#endregion
//tuba
#region e14
e14spawn = true;
e14CT = 0;
e14timer = 0;
e14reload = 121;
e14HP = 25;
e14armor = 0;
e14X = 528;
e14Y = 11186;
e14act = 0;
e14facing = 0;
e14frame = 0;
e14Opacity = 255;
e14invTimer = 0;
e14knockbackTimer = 0;
e14projHeight = 0;
e14projWidth = 0;
e14hitTimer = 0;
e14invBlink = 255;
e14Attack = 1;
e14FireVul = 2;
e14BoltVul = 0;
e14AcidVul = 0;
e14faceR = false;
e14invulnerable = false;
e14knockback = false;
e14knockbackRes = false;
e14onGround = true;
e14proximity = false;
e14touchWallL = false;
e14touchWallR = false;
e14breathhit = false;
e14clawhit = false;
e14frozen = false;
e14peaceful = false;
e14frRes = false;
e14BurnVul = true;
e14ShockVul = false;
e14peaceRes = false;
e14coins = false;
e14smoke = false;
e14smokeCT = 0;
e14coinValue = 80;
e14coinType = 0;
e14altAnimCT = 0;
#endregion
//trombone
#region e15
e15spawn = true;
e15CT = 0;
e15timer = 0;
e15HP = 26;
e15armor = 0;
e15X = 2491;
e15Y = 11988;
e15act = 0;
e15facing = 0;
e15frame = 0;
e15Opacity = 255;
e15invTimer = 0;
e15knockbackTimer = 0;
e15projHeight = 0;
e15projWidth = 0;
e15hitTimer = 0;
e15invBlink = 255;
e15Attack = 1;
e15FireVul = 2;
e15BoltVul = 0;
e15AcidVul = 0;
e15faceR = false;
e15invulnerable = false;
e15knockback = false;
e15knockbackRes = false;
e15onGround = true;
e15proximity = false;
e15touchWallL = false;
e15touchWallR = false;
e15breathhit = false;
e15clawhit = false;
e15frozen = false;
e15peaceful = false;
e15frRes = false;
e15BurnVul = true;
e15ShockVul = false;
e15peaceRes = false;
e15coins = false;
e15smoke = false;
e15smokeCT = 0;
e15coinValue = 60;
e15coinType = 0;
e15altAnimCT = 0;
#endregion
#region e16
e16spawn = true;
e16CT = 0;
e16timer = 0;
e16HP = 26;
e16armor = 0;
e16X = 254;
e16Y = 10015;
e16act = 0;
e16facing = 0;
e16frame = 0;
e16Opacity = 255;
e16invTimer = 0;
e16knockbackTimer = 0;
e16projHeight = 0;
e16projWidth = 0;
e16hitTimer = 0;
e16invBlink = 255;
e16Attack = 1;
e16FireVul = 2;
e16BoltVul = 0;
e16AcidVul = 0;
e16faceR = false;
e16invulnerable = false;
e16knockback = false;
e16knockbackRes = false;
e16onGround = true;
e16proximity = false;
e16touchWallL = false;
e16touchWallR = false;
e16breathhit = false;
e16clawhit = false;
e16frozen = false;
e16peaceful = false;
e16frRes = false;
e16BurnVul = true;
e16ShockVul = false;
e16peaceRes = false;
e16coins = false;
e16smoke = false;
e16smokeCT = 0;
e16coinValue = 60;
e16coinType = 0;
e16altAnimCT = 0;
#endregion
#region e17
e17spawn = true;
e17CT = 0;
e17timer = 0;
e17HP = 26;
e17armor = 0;
e17X = 210;
e17Y = 7428;
e17act = 0;
e17facing = 0;
e17frame = 0;
e17Opacity = 255;
e17invTimer = 0;
e17knockbackTimer = 0;
e17projHeight = 0;
e17projWidth = 0;
e17hitTimer = 0;
e17invBlink = 255;
e17Attack = 1;
e17FireVul = 2;
e17BoltVul = 0;
e17AcidVul = 0;
e17faceR = false;
e17invulnerable = false;
e17knockback = false;
e17knockbackRes = false;
e17onGround = true;
e17proximity = false;
e17touchWallL = false;
e17touchWallR = false;
e17breathhit = false;
e17clawhit = false;
e17frozen = false;
e17peaceful = false;
e17frRes = false;
e17BurnVul = true;
e17ShockVul = false;
e17peaceRes = false;
e17coins = false;
e17smoke = false;
e17smokeCT = 0;
e17coinValue = 60;
e17coinType = 0;
e17altAnimCT = 0;
#endregion
//pikeman
#region e18
e18spawn = true;
e18CT = 0;
e18timer = 0;
e18HP = 20;
e18armor = 0;
e18X = 672;
e18Y = 9199;
e18act = 0;
e18facing = 0;
e18frame = 0;
e18Opacity = 255;
e18invTimer = 0;
e18knockbackTimer = 0;
e18projHeight = 0;
e18projWidth = 0;
e18hitTimer = 0;
e18invBlink = 255;
e18Attack = 1;
e18FireVul = 0;
e18BoltVul = 0;
e18AcidVul = 2;
e18faceR = false;
e18invulnerable = false;
e18knockback = false;
e18knockbackRes = false;
e18onGround = true;
e18proximity = false;
e18touchWallL = false;
e18touchWallR = false;
e18breathhit = false;
e18clawhit = false;
e18frozen = false;
e18peaceful = false;
e18frRes = false;
e18BurnVul = false;
e18ShockVul = false;
e18peaceRes = true;
e18coins = false;
e18smoke = false;
e18smokeCT = 0;
e18coinValue = 120;
e18coinType = 0;
e18altAnimCT = 0;
#endregion
#region e19
e19spawn = true;
e19CT = 0;
e19timer = 0;
e19HP = 20;
e19armor = 0;
e19X = 1300;
e19Y = 5790;
e19act = 0;
e19facing = 0;
e19frame = 0;
e19Opacity = 255;
e19invTimer = 0;
e19knockbackTimer = 0;
e19projHeight = 0;
e19projWidth = 0;
e19hitTimer = 0;
e19invBlink = 255;
e19Attack = 1;
e19FireVul = 0;
e19BoltVul = 0;
e19AcidVul = 2;
e19faceR = false;
e19invulnerable = false;
e19knockback = false;
e19knockbackRes = false;
e19onGround = true;
e19proximity = false;
e19touchWallL = false;
e19touchWallR = false;
e19breathhit = false;
e19clawhit = false;
e19frozen = false;
e19peaceful = false;
e19frRes = false;
e19BurnVul = false;
e19ShockVul = false;
e19peaceRes = true;
e19coins = false;
e19smoke = false;
e19smokeCT = 0;
e19coinValue = 120;
e19coinType = 0;
e19altAnimCT = 0;
#endregion
#endregion
stage4e4 = true;
}
#endregion
#region toStage 4-B
if (toStage4eB == true)
{
drawStages = new DrawStages(20, stageManager);
drawSky = new DrawSky(1, stageManager);
loadWarden = new LoadWarden(true, stageManager);
playStageMusic = new PlayStageMusic(9, stageBGM);
loopBurrow = new LoopBurrow(true, breathSFX);
floor1 = new Rectangle(-200, floor1y = 658, 2000, 10);
wall1 = new Rectangle(-12, 0, 6, 2000);
wall2 = new Rectangle(1042, 0, 6, 2000);
wall3 = new Rectangle(920, 0, 6, 2000);
toStage4eB = false;
stageEndCT = 0;
cameraMaxX = 0;
cameraMaxY = 0;
drgnX = 12;
drgnY = 515;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
#region Boss 4 Variables
wardenHP = 30;
entHP = 60;
rootsHP = 40;
boss4ClearCT = 0;
rootsOn = true;
entOn = true;
drgnGrab = false;
entHeadYPos = 1;
entHeadYVel = 0;
entHeadVelCT = 0;
rootsClawHit = false;
rootsBreathHit = false;
rootsHitWait = 0;
entClawHit = false;
entBreathHit = false;
entHitWait = 0;
wardenHit = false;
wardenHitWait = 0;
wardenFrame = 0;
wardenCT = 0;
wardenAct = 0;
wardenBlink = 255;
wardenInvTimer = 0;
entArmFrame = 0;
entArmCT = 0;
entArmAct = 0;
entBodyFrame = 0;
entBodyCT = 0;
entBodyBlink = 255;
entBodyInvTimer = 0;
entRootFrame = 0;
entRootCT = 0;
entRootAct = 0;
entRootBlink = 255;
entRootInvTimer = 0;
sweepReload = 0;
hairshotReload = 0;
wardenReload = 0;
wardenRNG = 0;
hairshotSerial = 0;
sweepX = 0;
sweepFrame = 0;
sweepCT = 0;
sweepOn = false;
hair1X = 0;
hair1Y = 0;
hair1Frame = 0;
hair1CT = 0;
hair1Act = 0;
hair1Vel = 0;
hair1On = false;
hair2X = 0;
hair2Y = 0;
hair2Frame = 0;
hair2CT = 0;
hair2Act = 0;
hair2Vel = 0;
hair2On = false;
hair3X = 0;
hair3Y = 0;
hair3Frame = 0;
hair3CT = 0;
hair3Act = 0;
hair3Vel = 0;
hair3On = false;
hair4X = 0;
hair4Y = 0;
hair4Frame = 0;
hair4CT = 0;
hair4Act = 0;
hair4Vel = 0;
hair4On = false;
hair5X = 0;
hair5Y = 0;
hair5Frame = 0;
hair5CT = 0;
hair5Act = 0;
hair5Vel = 0;
hair5On = false;
grabX = 0;
grabY = 0;
grabFrame = 0;
grabCT = 0;
grabXVel = 0;
grabYVel = 0;
grabVelCT = 0;
grabWait = 0;
drgnGrab = false;
grabOn = false;
grabSlam = false;
grabOff = false;
spikesDuration = 0;
spikesAttackOn = false;
spikes1Type = 0;
spikes1X = 0;
spikes1Frame = 0;
spikes1CT = 0;
spikes1Act = 0;
spikes1On = false;
spikes2Type = 0;
spikes2X = 0;
spikes2Frame = 0;
spikes2CT = 0;
spikes2Act = 0;
spikes2On = false;
spikes3Type = 0;
spikes3X = 0;
spikes3Frame = 0;
spikes3CT = 0;
spikes3Act = 0;
spikes3On = false;
spikes4Type = 0;
spikes4X = 0;
spikes4Frame = 0;
spikes4CT = 0;
spikes4Act = 0;
spikes4On = false;
spikes5Type = 0;
spikes5X = 0;
spikes5Frame = 0;
spikes5CT = 0;
spikes5Act = 0;
spikes5On = false;
spikes6Type = 0;
spikes6X = 0;
spikes6Frame = 0;
spikes6CT = 0;
spikes6Act = 0;
spikes6On = false;
spikes7Type = 0;
spikes7X = 0;
spikes7Frame = 0;
spikes7CT = 0;
spikes7Act = 0;
spikes7On = false;
spikes8Type = 0;
spikes8X = 0;
spikes8Frame = 0;
spikes8CT = 0;
spikes8Act = 0;
spikes8On = false;
spikeTele1CT = 0;
spikeTele1Frame = 0;
spikeTele1Wait = 0;
spikeTele1On = false;
spikeTele2CT = 0;
spikeTele2Frame = 0;
spikeTele2Wait = 0;
spikeTele2On = false;
spikeTele3CT = 0;
spikeTele3Frame = 0;
spikeTele3Wait = 0;
spikeTele3On = false;
spikeTele4CT = 0;
spikeTele4Frame = 0;
spikeTele4Wait = 0;
spikeTele4On = false;
spikeTele5CT = 0;
spikeTele5Frame = 0;
spikeTele5Wait = 0;
spikeTele5On = false;
spikeTele6CT = 0;
spikeTele6Frame = 0;
spikeTele6Wait = 0;
spikeTele6On = false;
spikeTele7CT = 0;
spikeTele7Frame = 0;
spikeTele7Wait = 0;
spikeTele7On = false;
spikeTele8CT = 0;
spikeTele8Frame = 0;
spikeTele8Wait = 0;
spikeTele8On = false;
spikes1Wait = 0;
spikes2Wait = 0;
spikes3Wait = 0;
spikes4Wait = 0;
spikes5Wait = 0;
spikes6Wait = 0;
spikes7Wait = 0;
spikes8Wait = 0;
#endregion
rootHitDelay = 0;
bodyHitDelay = 0;
stage4eB = true;
}
#endregion
#region toStage 5-1
if (toStage5e1 == true)
{
drawStages = new DrawStages(21, stageManager);
drawSky = new DrawSky(4, stageManager);
draw5e1 = new Draw5e1(true, stageManager);
npc5e1 = new Npc5e1(true, stageManager);
playStageMusic = new PlayStageMusic(7, stageBGM);
#region floor
floor1 = new Rectangle(-500, 623, 2500, 20);
#endregion
#region wall
wall1 = new Rectangle(400, 0, 20, 2000);
wall2 = new Rectangle(610, 0, 20, 2000);
wall3 = new Rectangle(820, 0, 20, 2000);
#endregion
toStage5e1 = false;
stageEndCT = 0;
cameraMaxX = 0;
cameraMaxY = 0;
drgnX = 1125;
drgnY = 480;
drgnFacingDir = 13;
clawDir = 2;
breathDir = 6;
clawX = -80 - clawhitboxmod;
breathX = -196;
drgnFaceR = false;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = -3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = -3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = -3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = -3;
note4yVel = -2;
#endregion
barrierCT = 0;
barrierFrame = 0;
if (npcQuest >= 3)
{
niaOn = true;
}
stage5e1 = true;
}
#endregion
#region toStage 5-2
if (toStage5e2 == true)
{
drawStages = new DrawStages(22, stageManager);
drawSky = new DrawSky(4, stageManager);
play5e2Top = new Play5e2Top(2, stageBGM);
play5e2Bottom = new Play5e2Bottom(2, stageBGM);
loadFencer = new LoadFencer(true, stageManager);
loadXX = new LoadXX(true, stageManager);
loadPikeman = new LoadPikeman(1, stageManager);
loadBone = new LoadBone(true, stageManager);
loadTuba = new LoadTuba(true, stageManager);
loadSax = new LoadSax(true, stageManager);
loadArcher = new LoadArcher(true, stageManager);
loadLancer = new LoadLancer(true, stageManager);
loadSquire = new LoadSquire(true, stageManager);
npc5e2 = new Npc5e2(true, stageManager);
loopFireBreathAlt = new LoopFireBreathAlt(true,
breathSFX);
loopSpin = new LoopSpin(true, breathSFX);
loopLaser = new LoopLaser(true, breathSFX);
loadSpymaster = new LoadSpymaster(true, stageManager);
puzzle5e2 = new Puzzle5e2(true, stageManager);
drawTreasureText = new DrawTreasureText(15,
stageManager, languageType);
#region floor
floor1 = new Rectangle(21201, 1648, 400, 20);
floor2 = new Rectangle(21102, 1768, 132, 20);
floor3 = new Rectangle(20978, 2017, 155, 20);
floor4 = new Rectangle(20857, 2142, 166, 20);
floor5 = new Rectangle(20764, 2395, 132, 20);
floor6 = new Rectangle(20621, 2770, 180, 20);
floor7 = new Rectangle(20518, 3141, 152, 20);
floor8 = new Rectangle(13013, 3385, 7556, 20);
floor9 = new Rectangle(5234, 3364, 7784, 20);
floor10 = new Rectangle(5033, 3232, 224, 20);
floor11 = new Rectangle(4818, 3104, 233, 20);
floor12 = new Rectangle(4699, 2984, 166, 20);
floor13 = new Rectangle(4493, 2862, 216, 20);
floor14 = new Rectangle(4311, 2737, 195, 20);
floor15 = new Rectangle(4114, 2602, 212, 20);
floor16 = new Rectangle(3902, 2481, 237, 20);
floor17 = new Rectangle(3238, 2355, 675, 20);
floor18 = new Rectangle(3128, 2242, 150, 20);
floor19 = new Rectangle(2931, 2132, 227, 20);
floor20 = new Rectangle(2749, 2002, 216, 20);
floor21 = new Rectangle(2525, 1881, 241, 20);
floor22 = new Rectangle(2361, 1747, 179, 20);
floor23 = new Rectangle(0, 1618, 2376, 20);
floor24 = new Rectangle(19891, 1644, 1110, 20);
floor25 = new Rectangle(16590, 1538, 3019, 20);
floor26 = new Rectangle(13261, 1548, 2917, 20);
floor27 = new Rectangle(9788, 1550, 3016, 20);
floor28 = new Rectangle(9770, 1836, 3063, 20);
floor29 = new Rectangle(9307, 1915, 228, 20);
floor30 = new Rectangle(8954, 1784, 240, 20);
floor31 = new Rectangle(8544, 1662, 285, 20);
floor32 = new Rectangle(8145, 1534, 214, 20);
floor33 = new Rectangle(8145, 1787, 268, 20);
floor34 = new Rectangle(6248, 1901, 1753, 20);
floor35 = new Rectangle(6461, 1783, 144, 20);
floor36 = new Rectangle(6562, 1659, 162, 20);
floor37 = new Rectangle(6700, 1544, 1287, 20);
floor38 = new Rectangle(6218, 1544, 245, 20);
floor39 = new Rectangle(3339, 1540, 2663, 20);
#endregion
#region temp wall
L1 = new Rectangle(8133, 1539, 6, 20);
L2 = new Rectangle(19879, 1649, 6, 20);
R1 = new Rectangle(8371, 1539, 6, 20);
R2 = new Rectangle(21013, 1649, 6, 20);
#endregion
#region wall
wall1 = new Rectangle(21218, 1653, 6, 121);
wall2 = new Rectangle(21124, 1773, 6, 250);
wall3 = new Rectangle(21016, 2022, 6, 126);
wall4 = new Rectangle(20881, 2147, 6, 254);
wall5 = new Rectangle(20786, 2400, 6, 376);
wall6 = new Rectangle(20655, 2775, 6, 371);
wall7 = new Rectangle(20552, 3146, 6, 245);
wall8 = new Rectangle(13013, 3369, 6, 22);
wall9 = new Rectangle(5233, 3237, 6, 133);
wall10 = new Rectangle(5038, 3109, 6, 129);
wall11 = new Rectangle(4840, 2989, 6, 121);
wall12 = new Rectangle(4699, 2867, 6, 122);
wall13 = new Rectangle(4494, 2742, 6, 126);
wall14 = new Rectangle(4317, 2607, 6, 140);
wall15 = new Rectangle(4118, 2486, 6, 122);
wall16 = new Rectangle(3905, 2360, 6, 127);
wall17 = new Rectangle(3251, 2247, 6, 114);
wall18 = new Rectangle(3142, 2137, 6, 111);
wall19 = new Rectangle(2942, 2007, 6, 131);
wall20 = new Rectangle(2752, 1886, 6, 122);
wall21 = new Rectangle(2533, 1752, 6, 135);
wall22 = new Rectangle(2363, 1618, 6, 130);
wall23 = new Rectangle(19565, 1543, 6, 438);
wall24 = new Rectangle(16622, 1543, 6, 694);
wall25 = new Rectangle(16114, 1553, 6, 684);
wall26 = new Rectangle(13321, 1553, 6, 684);
wall27 = new Rectangle(12745, 1555, 6, 70);
wall28 = new Rectangle(12750, 1842, 6, 395);
wall29 = new Rectangle(9868, 1555, 6, 70);
wall30 = new Rectangle(9880, 1841, 6, 396);
wall31 = new Rectangle(9504, 1920, 6, 317);
wall32 = new Rectangle(9322, 1920, 6, 317);
wall33 = new Rectangle(9169, 1789, 6, 448);
wall34 = new Rectangle(8974, 1789, 6, 448);
wall35 = new Rectangle(8797, 1667, 6, 570);
wall36 = new Rectangle(8565, 1667, 6, 570);
wall37 = new Rectangle(8386, 1792, 6, 445);
wall38 = new Rectangle(8163, 1792, 6, 445);
wall39 = new Rectangle(7951, 1549, 6, 145);
wall40 = new Rectangle(7990, 1906, 6, 330);
wall41 = new Rectangle(6721, 1549, 6, 143);
wall42 = new Rectangle(6458, 1549, 6, 358);
wall43 = new Rectangle(6222, 1549, 6, 688);
wall44 = new Rectangle(5943, 1546, 6, 691);
wall45 = new Rectangle(3378, 1545, 6, 437);
wall46 = new Rectangle(21531, 0, 6, 4000);
#endregion
roof1 = new Rectangle(8145, 1544, 214, 10);
roof2 = new Rectangle(9788, 1675, 3016, 10);
toStage5e2 = false;
stageEndCT = 0;
cameraMaxX = 20237;
cameraMaxY = 2699;
drgnX = 21351;
drgnY = 1505;
drgnFacingDir = 13;
clawDir = 2;
breathDir = 6;
clawX = -80 - clawhitboxmod;
breathX = -196;
drgnFaceR = false;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = -3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = -3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = -3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = -3;
note4yVel = -2;
#endregion
tempVolumeA = 1.0f;
tempVolumeB = 0.0f;
#region puzzle reset
carHP = 0;
carCT = 0;
carFrame = 0;
carAct = 0;
carXVel = 0;
carXPos = 0;
defenderXPos = 0;
defenderCT = 0;
defenderFrame = 0;
defenderAct = 0;
defenderFreezeOpacity = 0;
defenderFaceRMod = 0;
spyCT = 0;
spyFrame = 0;
spyAct = 0;
spyActMod = 0;
spyHP = 1;
spyTreasureLocMod = 0;
spyWait = 0;
daggerCT = 0;
daggerFrame = 0;
dagger1Act = 2;
dagger2Act = 0;
dagger3Act = 1;
dagger1XPos = 0;
dagger1YPos = 0;
dagger1XVel = 0;
dagger1YVel = 0;
dagger2XPos = 0;
dagger2YPos = 0;
dagger2XVel = 0;
dagger2YVel = 0;
dagger3XPos = 0;
dagger3YPos = 0;
dagger3XVel = 0;
dagger3YVel = 0;
defenderFrozen = false;
spyFriendly = false;
spyMaskOff = false;
spyProj1On = false;
spyProj2On = false;
spyProj3On = false;
spyFaceR = true;
drgnOnCar = false;
#endregion
#region enemies
//heavy XX
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 50;
e1armor = 5;
e1X = 5702;
e1Y = 1397;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 1;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 2;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = false;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 300;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 50;
e2armor = 5;
e2X = 4200;
e2Y = 1397;
e2act = 0;
e2facing = 0;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 1;
e2FireVul = 0;
e2BoltVul = 0;
e2AcidVul = 2;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = false;
e2BurnVul = false;
e2ShockVul = false;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 300;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
//trombone
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 26;
e3armor = 0;
e3X = 16000;
e3Y = 1405;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3projHeight = 0;
e3projWidth = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 1;
e3FireVul = 2;
e3BoltVul = 0;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = false;
e3BurnVul = true;
e3ShockVul = false;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 60;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 26;
e4armor = 0;
e4X = 14655;
e4Y = 1405;
e4act = 0;
e4facing = 0;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4projHeight = 0;
e4projWidth = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 1;
e4FireVul = 2;
e4BoltVul = 0;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = false;
e4BurnVul = true;
e4ShockVul = false;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 60;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5HP = 26;
e5armor = 0;
e5X = 13671;
e5Y = 1405;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5projHeight = 0;
e5projWidth = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 1;
e5FireVul = 2;
e5BoltVul = 0;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5frRes = false;
e5BurnVul = true;
e5ShockVul = false;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5smokeCT = 0;
e5coinValue = 60;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
//fencer
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6reload = 0;
e6projHeight = 0;
e6HP = 35;
e6armor = 1;
e6X = 18409;
e6Y = 1395;
e6projA_Y = 1395;
e6projB_Y = 1395;
e6projC_Y = 1325;
e6act = 0;
e6facing = 0;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 2;
e6FireVul = 2;
e6BoltVul = 0;
e6AcidVul = 0;
e6faceR = false;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6shock = false;
e6frRes = false;
e6BurnVul = false;
e6ShockVul = false;
e6peaceRes = false;
e6coins = false;
e6smoke = false;
e6projectile = false;
e6smokeCT = 0;
e6coinValue = 280;
e6coinType = 0;
#endregion
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7reload = 0;
e7projHeight = 0;
e7HP = 35;
e7armor = 1;
e7X = 17309;
e7Y = 1395;
e7projA_Y = 1395;
e7projB_Y = 1395;
e7projC_Y = 1325;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 2;
e7FireVul = 2;
e7BoltVul = 0;
e7AcidVul = 0;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7shock = false;
e7frRes = false;
e7BurnVul = false;
e7ShockVul = false;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7projectile = false;
e7smokeCT = 0;
e7coinValue = 280;
e7coinType = 0;
#endregion
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8reload = 0;
e8projHeight = 0;
e8HP = 35;
e8armor = 1;
e8X = 5000;
e8Y = 1397;
e8projA_Y = 1397;
e8projB_Y = 1397;
e8projC_Y = 1327;
e8act = 0;
e8facing = 0;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 2;
e8FireVul = 2;
e8BoltVul = 0;
e8AcidVul = 0;
e8faceR = false;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8shock = false;
e8frRes = false;
e8BurnVul = false;
e8ShockVul = false;
e8peaceRes = false;
e8coins = false;
e8smoke = false;
e8projectile = false;
e8smokeCT = 0;
e8coinValue = 280;
e8coinType = 0;
#endregion
//tuba
#region e9
e9spawn = true;
e9CT = 0;
e9timer = 0;
e9reload = 121;
e9HP = 25;
e9armor = 0;
e9X = 14261;
e9Y = 1405;
e9act = 0;
e9facing = 0;
e9frame = 0;
e9Opacity = 255;
e9invTimer = 0;
e9knockbackTimer = 0;
e9projHeight = 0;
e9projWidth = 0;
e9hitTimer = 0;
e9invBlink = 255;
e9Attack = 1;
e9FireVul = 2;
e9BoltVul = 0;
e9AcidVul = 0;
e9faceR = false;
e9invulnerable = false;
e9knockback = false;
e9knockbackRes = false;
e9onGround = true;
e9proximity = false;
e9touchWallL = false;
e9touchWallR = false;
e9breathhit = false;
e9clawhit = false;
e9frozen = false;
e9peaceful = false;
e9frRes = false;
e9BurnVul = true;
e9ShockVul = false;
e9peaceRes = false;
e9coins = false;
e9smoke = false;
e9smokeCT = 0;
e9coinValue = 80;
e9coinType = 0;
e9altAnimCT = 0;
#endregion
//sax
#region e10
e10spawn = true;
e10CT = 0;
e10timer = 0;
e10HP = 17;
e10armor = 0;
e10X = 14161;
e10Y = 1030;
e10act = 0;
e10facing = 0;
e10frame = 0;
e10Opacity = 255;
e10invTimer = 0;
e10knockbackTimer = 0;
e10projHeight = 0;
e10projWidth = 0;
e10hitTimer = 0;
e10invBlink = 255;
e10Attack = 1;
e10FireVul = 2;
e10BoltVul = 0;
e10AcidVul = 0;
e10faceR = false;
e10invulnerable = false;
e10knockback = false;
e10knockbackRes = false;
e10onGround = true;
e10proximity = false;
e10touchWallL = false;
e10touchWallR = false;
e10breathhit = false;
e10clawhit = false;
e10frozen = false;
e10peaceful = false;
e10frRes = false;
e10BurnVul = true;
e10ShockVul = false;
e10peaceRes = false;
e10coins = false;
e10smoke = false;
e10smokeCT = 0;
e10coinValue = 30;
e10coinType = 0;
e10altAnimCT = 0;
#endregion
#region e11
e11spawn = true;
e11CT = 0;
e11timer = 0;
e11HP = 17;
e11armor = 0;
e11X = 15814;
e11Y = 1030;
e11act = 0;
e11facing = 0;
e11frame = 0;
e11Opacity = 255;
e11invTimer = 0;
e11knockbackTimer = 0;
e11projHeight = 0;
e11projWidth = 0;
e11hitTimer = 0;
e11invBlink = 255;
e11Attack = 1;
e11FireVul = 2;
e11BoltVul = 0;
e11AcidVul = 0;
e11faceR = false;
e11invulnerable = false;
e11knockback = false;
e11knockbackRes = false;
e11onGround = true;
e11proximity = false;
e11touchWallL = false;
e11touchWallR = false;
e11breathhit = false;
e11clawhit = false;
e11frozen = false;
e11peaceful = false;
e11frRes = false;
e11BurnVul = true;
e11ShockVul = false;
e11peaceRes = false;
e11coins = false;
e11smoke = false;
e11smokeCT = 0;
e11coinValue = 30;
e11coinType = 0;
e11altAnimCT = 0;
#endregion
//lancer
#region e12
e12spawn = true;
e12CT = 0;
e12timer = 0;
e12HP = 28;
e12armor = 0;
e12X = 9999;
e12Y = 1407;
e12reload = 120;
e12act = 0;
e12facing = 0;
e12frame = 0;
e12Opacity = 255;
e12invTimer = 0;
e12knockbackTimer = 0;
e12projHeight = 0;
e12projWidth = 0;
e12hitTimer = 0;
e12invBlink = 255;
e12Attack = 1;
e12FireVul = 0;
e12BoltVul = 1;
e12AcidVul = 0;
e12faceR = false;
e12invulnerable = false;
e12knockback = false;
e12knockbackRes = false;
e12onGround = true;
e12proximity = false;
e12touchWallL = false;
e12touchWallR = false;
e12breathhit = false;
e12clawhit = false;
e12frozen = false;
e12peaceful = false;
e12frRes = true;
e12BurnVul = false;
e12ShockVul = false;
e12peaceRes = true;
e12coins = false;
e12smoke = false;
e12smokeCT = 0;
e12coinValue = 110;
e12coinType = 0;
e12altAnimCT = 0;
#endregion
#region e13
e13spawn = true;
e13CT = 0;
e13timer = 0;
e13HP = 28;
e13armor = 0;
e13X = 11111;
e13Y = 1407;
e13reload = 120;
e13act = 0;
e13facing = 0;
e13frame = 0;
e13Opacity = 255;
e13invTimer = 0;
e13knockbackTimer = 0;
e13projHeight = 0;
e13projWidth = 0;
e13hitTimer = 0;
e13invBlink = 255;
e13Attack = 1;
e13FireVul = 0;
e13BoltVul = 1;
e13AcidVul = 0;
e13faceR = false;
e13invulnerable = false;
e13knockback = false;
e13knockbackRes = false;
e13onGround = true;
e13proximity = false;
e13touchWallL = false;
e13touchWallR = false;
e13breathhit = false;
e13clawhit = false;
e13frozen = false;
e13peaceful = false;
e13frRes = true;
e13BurnVul = false;
e13ShockVul = false;
e13peaceRes = true;
e13coins = false;
e13smoke = false;
e13smokeCT = 0;
e13coinValue = 110;
e13coinType = 0;
e13altAnimCT = 0;
#endregion
#region e14
e14spawn = true;
e14CT = 0;
e14timer = 0;
e14HP = 28;
e14armor = 0;
e14X = 12400;
e14Y = 1407;
e14reload = 120;
e14act = 0;
e14facing = 0;
e14frame = 0;
e14Opacity = 255;
e14invTimer = 0;
e14knockbackTimer = 0;
e14projHeight = 0;
e14projWidth = 0;
e14hitTimer = 0;
e14invBlink = 255;
e14Attack = 1;
e14FireVul = 0;
e14BoltVul = 1;
e14AcidVul = 0;
e14faceR = true;
e14invulnerable = false;
e14knockback = false;
e14knockbackRes = false;
e14onGround = true;
e14proximity = false;
e14touchWallL = false;
e14touchWallR = false;
e14breathhit = false;
e14clawhit = false;
e14frozen = false;
e14peaceful = false;
e14frRes = true;
e14BurnVul = false;
e14ShockVul = false;
e14peaceRes = true;
e14coins = false;
e14smoke = false;
e14smokeCT = 0;
e14coinValue = 110;
e14coinType = 0;
e14altAnimCT = 0;
#endregion
//archer
#region e15
e15spawn = true;
e15CT = 0;
e15timer = 0;
e15HP = 5;
e15armor = 0;
e15X = 4607;
e15Y = 1220;
e15act = 0;
e15facing = 0;
e15frame = 0;
e15Opacity = 255;
e15invTimer = 0;
e15knockbackTimer = 0;
e15hitTimer = 0;
e15invBlink = 255;
e15Attack = 1;
e15FireVul = 0;
e15BoltVul = 0;
e15AcidVul = 0;
e15faceR = false;
e15invulnerable = false;
e15knockback = false;
e15knockbackRes = false;
e15onGround = true;
e15proximity = false;
e15touchWallL = false;
e15touchWallR = false;
e15breathhit = false;
e15clawhit = false;
e15frozen = false;
e15peaceful = false;
e15frRes = false;
e15BurnVul = true;
e15ShockVul = false;
e15peaceRes = false;
e15coins = false;
e15smoke = false;
e15smokeCT = 0;
e15coinValue = 20;
e15coinType = 0;
e15altAnimCT = 0;
#endregion
//pikeman
#region e16
e16spawn = true;
e16CT = 0;
e16timer = 0;
e16HP = 20;
e16armor = 0;
e16X = 9999;
e16Y = 1693;
e16act = 0;
e16facing = 0;
e16frame = 0;
e16Opacity = 255;
e16invTimer = 0;
e16knockbackTimer = 0;
e16projHeight = 0;
e16projWidth = 0;
e16hitTimer = 0;
e16invBlink = 255;
e16Attack = 1;
e16FireVul = 0;
e16BoltVul = 0;
e16AcidVul = 2;
e16faceR = false;
e16invulnerable = false;
e16knockback = false;
e16knockbackRes = false;
e16onGround = true;
e16proximity = false;
e16touchWallL = false;
e16touchWallR = false;
e16breathhit = false;
e16clawhit = false;
e16frozen = false;
e16peaceful = false;
e16frRes = false;
e16BurnVul = false;
e16ShockVul = false;
e16peaceRes = true;
e16coins = false;
e16smoke = false;
e16smokeCT = 0;
e16coinValue = 120;
e16coinType = 0;
e16altAnimCT = 0;
#endregion
#region e17
e17spawn = true;
e17CT = 0;
e17timer = 0;
e17HP = 20;
e17armor = 0;
e17X = 11111;
e17Y = 1693;
e17act = 0;
e17facing = 7;
e17frame = 0;
e17Opacity = 255;
e17invTimer = 0;
e17knockbackTimer = 0;
e17projHeight = 0;
e17projWidth = 0;
e17hitTimer = 0;
e17invBlink = 255;
e17Attack = 1;
e17FireVul = 0;
e17BoltVul = 0;
e17AcidVul = 2;
e17faceR = true;
e17invulnerable = false;
e17knockback = false;
e17knockbackRes = false;
e17onGround = true;
e17proximity = false;
e17touchWallL = false;
e17touchWallR = false;
e17breathhit = false;
e17clawhit = false;
e17frozen = false;
e17peaceful = false;
e17frRes = false;
e17BurnVul = false;
e17ShockVul = false;
e17peaceRes = true;
e17coins = false;
e17smoke = false;
e17smokeCT = 0;
e17coinValue = 120;
e17coinType = 0;
e17altAnimCT = 0;
#endregion
#region e18
e18spawn = true;
e18CT = 0;
e18timer = 0;
e18HP = 20;
e18armor = 0;
e18X = 12400;
e18Y = 1693;
e18act = 0;
e18facing = 0;
e18frame = 0;
e18Opacity = 255;
e18invTimer = 0;
e18knockbackTimer = 0;
e18projHeight = 0;
e18projWidth = 0;
e18hitTimer = 0;
e18invBlink = 255;
e18Attack = 1;
e18FireVul = 0;
e18BoltVul = 0;
e18AcidVul = 2;
e18faceR = false;
e18invulnerable = false;
e18knockback = false;
e18knockbackRes = false;
e18onGround = true;
e18proximity = false;
e18touchWallL = false;
e18touchWallR = false;
e18breathhit = false;
e18clawhit = false;
e18frozen = false;
e18peaceful = false;
e18frRes = false;
e18BurnVul = false;
e18ShockVul = false;
e18peaceRes = true;
e18coins = false;
e18smoke = false;
e18smokeCT = 0;
e18coinValue = 120;
e18coinType = 0;
e18altAnimCT = 0;
#endregion
#region e20
e20spawn = true;
e20CT = 0;
e20timer = 0;
e20HP = 20;
e20armor = 0;
e20X = 4100;
e20Y = 1220;
e20act = 0;
e20facing = 0;
e20frame = 0;
e20Opacity = 255;
e20invTimer = 0;
e20knockbackTimer = 0;
e20projHeight = 0;
e20projWidth = 0;
e20hitTimer = 0;
e20invBlink = 255;
e20Attack = 1;
e20FireVul = 0;
e20BoltVul = 0;
e20AcidVul = 2;
e20faceR = false;
e20invulnerable = false;
e20knockback = false;
e20knockbackRes = false;
e20onGround = true;
e20proximity = false;
e20touchWallL = false;
e20touchWallR = false;
e20breathhit = false;
e20clawhit = false;
e20frozen = false;
e20peaceful = false;
e20frRes = false;
e20BurnVul = false;
e20ShockVul = false;
e20peaceRes = true;
e20coins = false;
e20smoke = false;
e20smokeCT = 0;
e20coinValue = 120;
e20coinType = 0;
e20altAnimCT = 0;
#endregion
//squire
#region e19
e19spawn = true;
e19CT = 0;
e19timer = 0;
e19HP = 6;
e19armor = 0;
e19X = 19199;
e19Y = 1395;
e19act = 0;
e19facing = 4;
e19frame = 0;
e19Opacity = 255;
e19invTimer = 0;
e19knockbackTimer = 0;
e19hitTimer = 0;
e19invBlink = 255;
e19Attack = 1;
e19FireVul = 0;
e19BoltVul = 0;
e19AcidVul = 0;
e19faceR = true;
e19invulnerable = false;
e19knockback = false;
e19knockbackRes = false;
e19onGround = true;
e19proximity = false;
e19touchWallL = false;
e19touchWallR = false;
e19breathhit = false;
e19clawhit = false;
e19frozen = false;
e19peaceful = false;
e19frRes = false;
e19BurnVul = false;
e19ShockVul = false;
e19peaceRes = false;
e19coins = false;
e19smoke = false;
e19smokeCT = 0;
e19coinValue = 10;
e19coinType = 0;
e19altAnimCT = 0;
#endregion
#endregion
stage5e2 = true;
}
#endregion
#region toStage 5-B
if (toStage5eB == true) //5-B loadout
{
drawStages = new DrawStages(23, stageManager);
loadNinja = new LoadNinja(true, stageManager);
loopFireBreathAlt = new LoopFireBreathAlt(true,
breathSFX);
playStageMusic = new PlayStageMusic(10, stageBGM);
#region floor
floor1 = new Rectangle(0, 656, 1280, 30);
#endregion
#region wall
wall1 = new Rectangle(0, 0, 7, 800);
wall2 = new Rectangle(1280, 0, 7, 800);
#endregion
toStage5eB = false;
stageEndCT = 0;
cameraMaxX = 0;
cameraMaxY = 0;
drgnX = 576;
drgnY = 513;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
stage5eB = true;
redHitDelay = 0;
greenHitDelay = 0;
purpleHitDelay = 0;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
boss5Phase1 = true;
boss5Phase2 = false;
boss5Transition = false;
kingAngry = false;
kingTantrum = false;
kingFrame = 0;
kingAct = 0;
crownX = 1100;
crownY = 375;
crownYvel = 0;
//enemy data
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1HP = 20;
e1armor = 0;
e1X = 170;
e1Y = 83;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 3;
e1FireVul = 0;
e1BoltVul = 0;
e1AcidVul = 2;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1frRes = true;
e1BurnVul = false;
e1ShockVul = false;
e1peaceRes = true;
e1coins = false;
e1smoke = false;
e1smokeCT = 0;
e1coinValue = 0;
e1coinType = 0;
e1altAnimCT = 0;
e1reload = 0;
e1projectile = false;
e1FrameHalf = 1;
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2HP = 20;
e2armor = 0;
e2X = 950;
e2Y = 83;
e2act = 0;
e2facing = 9;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 3;
e2FireVul = 2;
e2BoltVul = 0;
e2AcidVul = 0;
e2faceR = false;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2frRes = true;
e2BurnVul = false;
e2ShockVul = false;
e2peaceRes = true;
e2coins = false;
e2smoke = false;
e2smokeCT = 0;
e2coinValue = 0;
e2coinType = 0;
e2altAnimCT = 0;
e2reload = 0;
e2projectile = false;
e2FrameHalf = 1;
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3HP = 20;
e3armor = 0;
e3X = 25;
e3Y = 513;
e3act = 0;
e3facing = 0;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 3;
e3FireVul = 0;
e3BoltVul = 2;
e3AcidVul = 0;
e3faceR = false;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3frRes = true;
e3BurnVul = false;
e3ShockVul = false;
e3peaceRes = true;
e3coins = false;
e3smoke = false;
e3smokeCT = 0;
e3coinValue = 0;
e3coinType = 0;
e3altAnimCT = 0;
e3reload = 0;
e3projectile = false;
e3FrameHalf = 1;
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4HP = 20;
e4armor = 0;
e4X = 1125;
e4Y = 513;
e4act = 0;
e4facing = 7;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 3;
e4FireVul = 0;
e4BoltVul = 0;
e4AcidVul = 0;
e4faceR = false;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4frRes = true;
e4BurnVul = false;
e4ShockVul = false;
e4peaceRes = true;
e4coins = false;
e4smoke = false;
e4smokeCT = 0;
e4coinValue = 0;
e4coinType = 0;
e4altAnimCT = 0;
e4reload = 0;
e4projectile = false;
e4FrameHalf = 1;
//end enemy data
}
#endregion
#region toStage 6-1
if (toStage6e1 == true)
{
drawStages = new DrawStages(24, stageManager);
drawSky = new DrawSky(4, stageManager);
puzzleTower = new PuzzleTower(true, stageManager);
playStageMusic = new PlayStageMusic(6, stageBGM);
drawTreasureText = new DrawTreasureText(17,
stageManager, languageType);
#region floor
floor1 = new Rectangle(-400, floor1y = 3900, 3244, 20);
floor2 = new Rectangle(2312, floor2y = 3732, 532, 20);
floor3 = new Rectangle(906, floor3y = 3566, 1473, 20);
floor4 = new Rectangle(891, floor4y = 3401, 267, 20);
floor5 = new Rectangle(1110, floor5y = 3241, 1735, 20);
floor6 = new Rectangle(1121, floor6y = 3077, 187, 20);
floor7 = new Rectangle(2168, floor7y = 3080, 185, 20);
floor8 = new Rectangle(878, floor8y = 2912, 252, 20);
floor9 = new Rectangle(2345, floor9y = 2914, 499, 20);
floor10 = new Rectangle(1218, floor10y = 2750, 1050,
20);
floor11 = new Rectangle(1736, floor11y = 2579, 250, 20);
floor12 = new Rectangle(842, floor12y = 2424, 880, 20);
floor13 = new Rectangle(1958, floor13y = 2426, 886, 20);
floor14 = new Rectangle(873, floor14y = 2261, 215, 20);
floor15 = new Rectangle(1237, floor15y = 2110, 1572,
20);
floor16 = new Rectangle(1086, floor16y = 1949, 346, 20);
floor17 = new Rectangle(2062, floor17y = 1942, 349, 20);
floor18 = new Rectangle(847, floor18y = 1775, 369, 20);
floor19 = new Rectangle(1487, floor19y = 1779, 535, 20);
floor20 = new Rectangle(2292, floor20y = 1780, 552, 20);
floor21 = new Rectangle(1227, floor21y = 1614, 212, 20);
floor22 = new Rectangle(2086, floor22y = 1618, 216, 20);
floor23 = new Rectangle(1505, floor23y = 1457, 492, 20);
floor24 = new Rectangle(845, floor24y = 1299, 612, 20);
floor25 = new Rectangle(878, floor25y = 1132, 167, 20);
floor26 = new Rectangle(1214, floor26y = 975, 1630, 20);
#endregion
#region temp wall
L1 = new Rectangle(2300, 3737, 6, 20);
L2 = new Rectangle(1098, 3246, 6, 20);
L3 = new Rectangle(2333, 2919, 6, 20);
L4 = new Rectangle(1724, 2584, 6, 20);
L5 = new Rectangle(2280, 1785, 6, 20);
L6 = new Rectangle(1109, 3082, 6, 20);
L7 = new Rectangle(2156, 3085, 6, 20);
L8 = new Rectangle(1206, 2755, 6, 20);
L9 = new Rectangle(1074, 1954, 6, 20);
L10 = new Rectangle(2050, 1947, 6, 20);
L11 = new Rectangle(1475, 1784, 6, 20);
L12 = new Rectangle(1215, 1619, 6, 20);
L13 = new Rectangle(2074, 1623, 6, 20);
L14 = new Rectangle(1493, 1462, 6, 20);
R1 = new Rectangle(2385, 3571, 6, 20);
R2 = new Rectangle(1164, 3406, 6, 20);
R3 = new Rectangle(1136, 2917, 6, 20);
R4 = new Rectangle(1728, 2429, 6, 20);
R5 = new Rectangle(1094, 2266, 6, 20);
R6 = new Rectangle(1222, 1780, 6, 20);
R7 = new Rectangle(1463, 1304, 6, 20);
R8 = new Rectangle(1051, 1137, 6, 20);
R9 = new Rectangle(1314, 3082, 6, 20);
R10 = new Rectangle(2359, 3085, 6, 20);
R11 = new Rectangle(2274, 2755, 6, 20);
R12 = new Rectangle(1438, 1954, 6, 20);
R13 = new Rectangle(2417, 1947, 6, 20);
R14 = new Rectangle(2028, 1784, 6, 20);
R15 = new Rectangle(1445, 1619, 6, 20);
R16 = new Rectangle(2308, 1623, 6, 20);
R17 = new Rectangle(2003, 1462, 6, 20);
#endregion
#region wall
wall1 = new Rectangle(1537, 2429, 6, 145);
wall2 = new Rectangle(1961, 2431, 6, 150);
wall3 = new Rectangle(1218, 980, 6, 128);
wall4 = new Rectangle(904, 0, 6, 3594);
wall5 = new Rectangle(2589, 0, 6, 4000);
wall6 = new Rectangle(793, 3566, 52, 591);
wall7 = new Rectangle(1180, 3108, 52, 391);
wall8 = new Rectangle(1240, 2115, 6, 144);
wall9 = new Rectangle(1219, 1109, 100, 190);
#endregion
#region roof
roof1 = new Rectangle(906, 2561, 631, 20);
roof2 = new Rectangle(1962, 2558, 882, 20);
roof3 = new Rectangle(1241, 2247, 1603, 20);
roof4 = new Rectangle(1219, 1109, 1626, 20);
#endregion
toStage6e1 = false;
stageEndCT = 0;
cameraMaxX = 1562;
cameraMaxY = 3291;
drgnX = 12;
drgnY = 3757;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
magicWallCT = 0;
magicWallFrame = 0;
wallOpacity1 = 255;
wallOpacity2 = 255;
wallOpacity3 = 255;
wallColor1 = 0;
wallColor2 = 0;
wallColor3 = 0;
statue1CT = 0;
statue1Frame = 0;
statue1HP = 120;
statue2CT = 0;
statue2Frame = 0;
statue2HP = 120;
statue3CT = 0;
statue3Frame = 0;
statue3HP = 120;
torchCT = 0;
torchFrame = 0;
torch1Act = 1;
torch2Act = 0;
torch3Act = 0;
torch4Act = 1;
torch5Act = 0;
torch6Act = 0;
torch7Act = 0;
torch8Act = 0;
torch9Act = 0;
torch10Act = 0;
torch11Act = 0;
torch12Act = 1;
torch13Act = 1;
torch14Act = 0;
torch15Act = 1;
torch16Act = 1;
torch17Act = 0;
waterTowerCT = 0;
waterTowerFrame = 0;
water1Act = 0;
water2Act = 0;
water1HP = 60;
water2HP = 60;
puzzleCorrect = false;
puzzleSound = false;
stage6e1 = true;
}
#endregion
#region toStage 6-B
if (toStage6eB == true)
{
drawStages = new DrawStages(25, stageManager);
draw6eB = new Draw6eB(true, stageManager);
loadWalker = new LoadWalker(true, stageManager);
loadFlier = new LoadFlier(true, stageManager);
play5e2Top = new Play5e2Top(3, stageBGM);
play5e2Bottom = new Play5e2Bottom(3, stageBGM);
drawTreasureText = new DrawTreasureText(16,
stageManager, languageType);
toStage6eB = false;
stageEndCT = 0;
cameraMaxX = 2107;
cameraMaxY = 2765;
drgnX = 12;
drgnY = 3323;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
#region floor
floor1 = new Rectangle(0, floor1y = 3466, 727, 20);
floor2 = new Rectangle(707, floor2y = 3330, 417, 20);
floor3 = new Rectangle(1118, floor3y = 3197, 314, 20);
floor4 = new Rectangle(1407, floor4y = 3328, 571, 20);
floor5 = new Rectangle(1966, floor5y = 3197, 180, 20);
floor6 = new Rectangle(2133, floor6y = 3080, 235, 20);
floor7 = new Rectangle(2342, floor7y = 3326, 531, 20);
floor8 = new Rectangle(2857, floor8y = 3192, 178, 20);
floor9 = new Rectangle(3020, floor9y = 3081, 192, 20);
floor10 = new Rectangle(3191, floor10y = 2949, 197, 20);
floor11 = new Rectangle(970, floor11y = 2835, 2418, 20);
floor12 = new Rectangle(920, floor12y = 2461, 2470, 20);
floor13 = new Rectangle(930, floor13y = 2077, 2458, 20);
floor14 = new Rectangle(944, floor14y = 1674, 5000, 20);
floor15 = new Rectangle(1390, floor15y = 2745, 95, 20);
floor16 = new Rectangle(1390, floor16y = 2595, 95, 20);
floor17 = new Rectangle(2948, floor17y = 2371, 95, 20);
floor18 = new Rectangle(2948, floor18y = 2221, 95, 20);
floor19 = new Rectangle(1325, floor19y = 1987, 95, 20);
floor20 = new Rectangle(1325, floor20y = 1837, 95, 20);
#endregion
#region wall
wall1 = new Rectangle(717, 3335, 6, 137);
wall2 = new Rectangle(1122, 3202, 6, 134);
wall3 = new Rectangle(1407, 3202, 6, 132);
wall4 = new Rectangle(1972, 3202, 6, 132);
wall5 = new Rectangle(2143, 3085, 6, 118);
wall6 = new Rectangle(2347, 3085, 6, 247);
wall7 = new Rectangle(2864, 3197, 6, 135);
wall8 = new Rectangle(3030, 3086, 6, 112);
wall9 = new Rectangle(3204, 2954, 6, 134);
wall10 = new Rectangle(989, 2466, 6, 375);
wall11 = new Rectangle(963, 2082, 6, 384);
wall12 = new Rectangle(1038, 1679, 6, 404);
wall13 = new Rectangle(1024, 0, 6, 1675);
wall14 = new Rectangle(1818, 0, 6, 1412);
wall15 = new Rectangle(3438, 1679, 6, 4000);
wall16 = new Rectangle(1447, 1679, 6, 45);
wall17 = new Rectangle(-40, 0, 6, 4000);
wall18 = new Rectangle(1898, 1395, 20, 282);
#endregion
#region roof
roof1 = new Rectangle(1447, 1679, 2000, 10);
roof2 = new Rectangle(1818, 1412, 2000, 10);
roof3 = new Rectangle(970, 2855, 1887, 20);
#endregion
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
tempVolumeA = 1.0f;
tempVolumeB = 1.0f;
foothold1Frame = 2;
foothold2CT = 0;
foothold2Frame = 0;
foothold3CT = 0;
foothold3Frame = 0;
needStarPos = true;
starlightCT = 0;
starlightFrame = 0;
starlightX = generateRandom.Next(0, 1240);
starlightY = generateRandom.Next(0, 760);
boss6Opacity = 0;
boss6Blink = 0;
boss6Hide = 0;
#region cannons
alienCannon1CT = 0;
alienCannon1Frame = 0;
alienCannon1Act = 0;
alienCannon1Facing = 0;
alienCannon1Reload = 0;
alienDolphinVelCT1 = 0;
alienDolphinX1 = 0;
alienDolphinY1 = 0;
alienDolphinXVel1 = 0;
alienDolphinYVel1 = 0;
alienCannon2CT = 0;
alienCannon2Frame = 0;
alienCannon2Act = 0;
alienCannon2Facing = 0;
alienCannon2Reload = 0;
alienDolphinVelCT2 = 0;
alienDolphinX2 = 0;
alienDolphinY2 = 0;
alienDolphinXVel2 = 0;
alienDolphinYVel2 = 0;
alienCannon3CT = 0;
alienCannon3Frame = 0;
alienCannon3Act = 0;
alienCannon3Facing = 0;
alienCannon3Reload = 0;
alienDolphinVelCT3 = 0;
alienDolphinX3 = 0;
alienDolphinY3 = 0;
alienDolphinXVel3 = 0;
alienDolphinYVel3 = 0;
alienCannon4CT = 0;
alienCannon4Frame = 0;
alienCannon4Act = 0;
alienCannon4Facing = 0;
alienCannon4Reload = 0;
alienDolphinVelCT4 = 0;
alienDolphinX4 = 0;
alienDolphinY4 = 0;
alienDolphinXVel4 = 0;
alienDolphinYVel4 = 0;
dolphin1CT = 0;
dolphin1Frame = 0;
dolphin2CT = 0;
dolphin2Frame = 0;
dolphin3CT = 0;
dolphin3Frame = 0;
dolphin4CT = 0;
dolphin4Frame = 0;
dolphin1Act = 0;
dolphin2Act = 0;
dolphin3Act = 0;
dolphin4Act = 0;
alienProj1 = false;
alienProj2 = false;
alienProj3 = false;
alienProj4 = false;
#endregion
#region e1
e1spawn = true;
e1CT = 0;
e1timer = 0;
e1reload = 0;
e1projHeight = 0;
e1HP = 20;
e1armor = 1;
e1X = 1200;
e1Y = 2308;
e1act = 0;
e1facing = 0;
e1frame = 0;
e1Opacity = 255;
e1invTimer = 0;
e1knockbackTimer = 0;
e1hitTimer = 0;
e1invBlink = 255;
e1Attack = 2;
e1FireVul = 0;
e1BoltVul = 2;
e1AcidVul = 0;
e1faceR = false;
e1invulnerable = false;
e1knockback = false;
e1knockbackRes = false;
e1onGround = true;
e1proximity = false;
e1touchWallL = false;
e1touchWallR = false;
e1breathhit = false;
e1clawhit = false;
e1frozen = false;
e1peaceful = false;
e1shock = false;
e1frRes = true;
e1BurnVul = false;
e1ShockVul = true;
e1peaceRes = false;
e1coins = false;
e1smoke = false;
e1projectile = false;
e1smokeCT = 0;
e1coinValue = 512;
e1coinType = 0;
e1altAnimCT = 0;
#endregion
#region e2
e2spawn = true;
e2CT = 0;
e2timer = 0;
e2reload = 0;
e2projHeight = 0;
e2HP = 20;
e2armor = 1;
e2X = 2300;
e2Y = 2308;
e2act = 0;
e2facing = 1;
e2frame = 0;
e2Opacity = 255;
e2invTimer = 0;
e2knockbackTimer = 0;
e2hitTimer = 0;
e2invBlink = 255;
e2Attack = 2;
e2FireVul = 0;
e2BoltVul = 2;
e2AcidVul = 0;
e2faceR = true;
e2invulnerable = false;
e2knockback = false;
e2knockbackRes = false;
e2onGround = true;
e2proximity = false;
e2touchWallL = false;
e2touchWallR = false;
e2breathhit = false;
e2clawhit = false;
e2frozen = false;
e2peaceful = false;
e2shock = false;
e2frRes = true;
e2BurnVul = false;
e2ShockVul = true;
e2peaceRes = false;
e2coins = false;
e2smoke = false;
e2projectile = false;
e2smokeCT = 0;
e2coinValue = 512;
e2coinType = 0;
e2altAnimCT = 0;
#endregion
#region e3
e3spawn = true;
e3CT = 0;
e3timer = 0;
e3reload = 0;
e3projHeight = 0;
e3HP = 20;
e3armor = 1;
e3X = 1150;
e3Y = 1934;
e3act = 0;
e3facing = 1;
e3frame = 0;
e3Opacity = 255;
e3invTimer = 0;
e3knockbackTimer = 0;
e3hitTimer = 0;
e3invBlink = 255;
e3Attack = 2;
e3FireVul = 0;
e3BoltVul = 2;
e3AcidVul = 0;
e3faceR = true;
e3invulnerable = false;
e3knockback = false;
e3knockbackRes = false;
e3onGround = true;
e3proximity = false;
e3touchWallL = false;
e3touchWallR = false;
e3breathhit = false;
e3clawhit = false;
e3frozen = false;
e3peaceful = false;
e3shock = false;
e3frRes = true;
e3BurnVul = false;
e3ShockVul = true;
e3peaceRes = false;
e3coins = false;
e3smoke = false;
e3projectile = false;
e3smokeCT = 0;
e3coinValue = 512;
e3coinType = 0;
e3altAnimCT = 0;
#endregion
#region e4
e4spawn = true;
e4CT = 0;
e4timer = 0;
e4reload = 0;
e4projHeight = 0;
e4HP = 20;
e4armor = 1;
e4X = 1920;
e4Y = 1934;
e4act = 0;
e4facing = 1;
e4frame = 0;
e4Opacity = 255;
e4invTimer = 0;
e4knockbackTimer = 0;
e4hitTimer = 0;
e4invBlink = 255;
e4Attack = 2;
e4FireVul = 0;
e4BoltVul = 2;
e4AcidVul = 0;
e4faceR = true;
e4invulnerable = false;
e4knockback = false;
e4knockbackRes = false;
e4onGround = true;
e4proximity = false;
e4touchWallL = false;
e4touchWallR = false;
e4breathhit = false;
e4clawhit = false;
e4frozen = false;
e4peaceful = false;
e4shock = false;
e4frRes = true;
e4BurnVul = false;
e4ShockVul = true;
e4peaceRes = false;
e4coins = false;
e4smoke = false;
e4projectile = false;
e4smokeCT = 0;
e4coinValue = 512;
e4coinType = 0;
e4altAnimCT = 0;
#endregion
#region e5
e5spawn = true;
e5CT = 0;
e5timer = 0;
e5reload = 0;
e5projHeight = 0;
e5HP = 20;
e5armor = 1;
e5X = 2762;
e5Y = 1934;
e5act = 0;
e5facing = 0;
e5frame = 0;
e5Opacity = 255;
e5invTimer = 0;
e5knockbackTimer = 0;
e5hitTimer = 0;
e5invBlink = 255;
e5Attack = 2;
e5FireVul = 0;
e5BoltVul = 2;
e5AcidVul = 0;
e5faceR = false;
e5invulnerable = false;
e5knockback = false;
e5knockbackRes = false;
e5onGround = true;
e5proximity = false;
e5touchWallL = false;
e5touchWallR = false;
e5breathhit = false;
e5clawhit = false;
e5frozen = false;
e5peaceful = false;
e5shock = false;
e5frRes = true;
e5BurnVul = false;
e5ShockVul = true;
e5peaceRes = false;
e5coins = false;
e5smoke = false;
e5projectile = false;
e5smokeCT = 0;
e5coinValue = 512;
e5coinType = 0;
e5altAnimCT = 0;
#endregion
#region e6
e6spawn = true;
e6CT = 0;
e6timer = 0;
e6reload = 0;
e6projHeight = 0;
e6HP = 20;
e6armor = 1;
e6X = 2220;
e6Y = 2491;
e6act = 0;
e6facing = 0;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 2;
e6FireVul = 0;
e6BoltVul = 2;
e6AcidVul = 0;
e6faceR = false;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6shock = false;
e6frRes = true;
e6BurnVul = false;
e6ShockVul = true;
e6peaceRes = false;
e6coins = false;
e6smoke = false;
e6projectile = false;
e6smokeCT = 0;
e6coinValue = 0;
e6coinType = 0;
#endregion
#region e7
e7spawn = true;
e7CT = 0;
e7timer = 0;
e7reload = 0;
e7projHeight = 0;
e7HP = 20;
e7armor = 1;
e7X = 1722;
e7Y = 1749;
e7act = 0;
e7facing = 0;
e7frame = 0;
e7Opacity = 255;
e7invTimer = 0;
e7knockbackTimer = 0;
e7hitTimer = 0;
e7invBlink = 255;
e7Attack = 2;
e7FireVul = 0;
e7BoltVul = 2;
e7AcidVul = 0;
e7faceR = false;
e7invulnerable = false;
e7knockback = false;
e7knockbackRes = false;
e7onGround = true;
e7proximity = false;
e7touchWallL = false;
e7touchWallR = false;
e7breathhit = false;
e7clawhit = false;
e7frozen = false;
e7peaceful = false;
e7shock = false;
e7frRes = true;
e7BurnVul = false;
e7ShockVul = true;
e7peaceRes = false;
e7coins = false;
e7smoke = false;
e7projectile = false;
e7smokeCT = 0;
e7coinValue = 0;
e7coinType = 0;
#endregion
#region e8
e8spawn = true;
e8CT = 0;
e8timer = 0;
e8reload = 0;
e8projHeight = 0;
e8HP = 20;
e8armor = 1;
e8X = 3120;
e8Y = 1749;
e8act = 0;
e8facing = 0;
e8frame = 0;
e8Opacity = 255;
e8invTimer = 0;
e8knockbackTimer = 0;
e8hitTimer = 0;
e8invBlink = 255;
e8Attack = 2;
e8FireVul = 0;
e8BoltVul = 2;
e8AcidVul = 0;
e8faceR = false;
e8invulnerable = false;
e8knockback = false;
e8knockbackRes = false;
e8onGround = true;
e8proximity = false;
e8touchWallL = false;
e8touchWallR = false;
e8breathhit = false;
e8clawhit = false;
e8frozen = false;
e8peaceful = false;
e8shock = false;
e8frRes = true;
e8BurnVul = false;
e8ShockVul = true;
e8peaceRes = false;
e8coins = false;
e8smoke = false;
e8projectile = false;
e8smokeCT = 0;
e8coinValue = 0;
e8coinType = 0;
#endregion
#region boss
boss6InvTimer = 0;
boss6HitTimer = 0;
boss6Invulnerable = false;
boss6ClawHit = false;
boss6BreathHit = false;
boss6CT = 0;
boss6Frame = 0;
boss6Opacity = 0;
boss6Blink = 0;
boss6Hide = 0;
boss6HP = 60;
computerCT = 0;
computerFrame = 0;
probe1Wait = 0;
probe2Wait = 0;
boss6ProjCT = 0;
boss6ProjFrame = 0;
boss6Reload = 0;
boss6AttackCT = 0;
boss6Proj1X = 0;
boss6Proj1Y = 0;
boss6Proj1Vel = 0;
boss6Proj1On = false;
boss6Proj2X = 0;
boss6Proj2Y = 0;
boss6Proj2Vel = 0;
boss6Proj2On = false;
boss6Proj3X = 0;
boss6Proj3Y = 0;
boss6Proj3Vel = 0;
boss6Proj3On = false;
boss6Proj4X = 0;
boss6Proj4Y = 0;
boss6Proj4Vel = 0;
boss6Proj4On = false;
boss6Proj5X = 0;
boss6Proj5Y = 0;
boss6Proj5Vel = 0;
boss6Proj5On = false;
boss6Proj6X = 0;
boss6Proj6Y = 0;
boss6Proj6Vel = 0;
boss6Proj6On = false;
boss6Proj7X = 0;
boss6Proj7Y = 0;
boss6Proj7Vel = 0;
boss6Proj7On = false;
boss6Proj8X = 0;
boss6Proj8Y = 0;
boss6Proj8Vel = 0;
boss6Proj8On = false;
boss6Proj9X = 0;
boss6Proj9Y = 0;
boss6Proj9Vel = 0;
boss6Proj9On = false;
boss6Proj10X = 0;
boss6Proj10Y = 0;
boss6Proj10Vel = 0;
boss6Proj10On = false;
boss6Proj11X = 0;
boss6Proj11Y = 0;
boss6Proj11Vel = 0;
boss6Proj11On = false;
boss6Proj12X = 0;
boss6Proj12Y = 0;
boss6Proj12Vel = 0;
boss6Proj12On = false;
boss6Proj13X = 0;
boss6Proj13Y = 0;
boss6Proj13Vel = 0;
boss6Proj13On = false;
boss6Proj14X = 0;
boss6Proj14Y = 0;
boss6Proj14Vel = 0;
boss6Proj14On = false;
boss6Proj15X = 0;
boss6Proj15Y = 0;
boss6Proj15Vel = 0;
boss6Proj15On = false;
boss6Proj16X = 0;
boss6Proj16Y = 0;
boss6Proj16Vel = 0;
boss6Proj16On = false;
boss6Proj17X = 0;
boss6Proj17Y = 0;
boss6Proj17Vel = 0;
boss6Proj17On = false;
boss6Proj18X = 0;
boss6Proj18Y = 0;
boss6Proj18Vel = 0;
boss6Proj18On = false;
boss6Proj19X = 0;
boss6Proj19Y = 0;
boss6Proj19Vel = 0;
boss6Proj19On = false;
boss6Proj20X = 0;
boss6Proj20Y = 0;
boss6Proj20Vel = 0;
boss6Proj20On = false;
boss6On = true;
#endregion
stage6eB = true;
}
#endregion
#region toStage 7-B A
if (toStage7eB_1 == true)
{
drawStages = new DrawStages(26, stageManager);
loadGeneral = new LoadGeneral(true, stageManager);
loadMech = new LoadMech(true, stageManager);
playStageMusic = new PlayStageMusic(11, stageBGM);
loopFlameAtk = new LoopFlameAtk(true, breathSFX);
loopLaser = new LoopLaser(true, breathSFX);
loopIceBreathAlt = new LoopIceBreathAlt(true,
breathSFX);
floor1 = new Rectangle(0, 697, 1650, 30);
floor2 = new Rectangle(1210, 590, 75, 20);
wall1 = new Rectangle(0, 0, 7, 800);
wall2 = new Rectangle(1600, 0, 7, 800);
wall3 = new Rectangle(1280, 0, 7, 800);
wall4 = new Rectangle(320, 0, 7, 800);
wall5 = new Rectangle(1400, 0, 7, 800);
toStage7eB_1 = false;
stageEndCT = 0;
cameraMaxX = 0;
cameraMaxY = 0;
drgnX = 30;
drgnY = 574;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
stage7eB = true;
boss7Phase1 = true;
boss7Phase2 = false;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
generalXPos = 1100;
generalHP = 1;
generalFrame = 0;
generalCT = 0;
generalAct = 0;
}
#endregion
#region toStage 7-B B
if (toStage7eB_2 == true)
{
drawStages = new DrawStages(26, stageManager);
loadGeneral = new LoadGeneral(true, stageManager);
loadMech = new LoadMech(true, stageManager);
playStageMusic = new PlayStageMusic(12, stageBGM);
loopFlameAtk = new LoopFlameAtk(true, breathSFX);
loopLaser = new LoopLaser(true, breathSFX);
loopThunderBlast = new LoopThunderBlast(true,
breathSFX);
loopIceBreathAlt = new LoopIceBreathAlt(true,
breathSFX);
musicFade = false;
tempVolume = 1.0f;
floor1 = new Rectangle(0, 697, 1650, 30);
floor2 = new Rectangle(1210, 590, 75, 20);
wall1 = new Rectangle(0, 0, 7, 800);
wall2 = new Rectangle(1600, 0, 7, 800);
wall3 = new Rectangle(1280, 0, 7, 800);
wall4 = new Rectangle(320, 0, 7, 800);
wall5 = new Rectangle(1400, 0, 7, 800);
headHitDelay = 0;
toStage7eB_1 = false;
toStage7eB_2 = false;
stageEndCT = 0;
cameraMaxX = 320;
cameraMaxY = 0;
drgnX = 700;
drgnY = 574;
drgnFacingDir = 0;
drgnHitTimer = 0;
drgnDamageTaken = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
boss7Phase1 = false;
boss7Phase2 = true;
#region whistle
whistleRandom = -1;
note1Measure = 0;
note1Beat = 0;
note1xPos = drgnX + 40;
note1yPos = drgnY + 40;
note1xVel = 3;
note1yVel = -2;
note2Measure = 0;
note2Beat = 0;
note2xPos = drgnX + 40;
note2yPos = drgnY + 40;
note2xVel = 3;
note2yVel = -2;
note3Measure = 0;
note3Beat = 0;
note3xPos = drgnX + 40;
note3yPos = drgnY + 40;
note3xVel = 3;
note3yVel = -2;
note4Measure = 0;
note4Beat = 0;
note4xPos = drgnX + 40;
note4yPos = drgnY + 40;
note4xVel = 3;
note4yVel = -2;
#endregion
#region boss 7 reset
mechKingCT = 0;
mechKingFrame = 0;
mechKingAct = 0;
mechThunderSpeedCap = 1;
mechThunderCTDelay = 15;
mechThunderSFX = false;
mechHeadHP = 200;
mechFistHP = 40;
mechStaffHP = 40;
mechSwordHP = 40;
mechBroochHP = 40;
mechExhaustHP = 40;
exhaustSmoke = false;
mechHeadHitWait = 0;
mechStaffHitWait = 0;
mechSwordHitWait = 0;
mechBroochHitWait = 0;
mechFistHitWait = 0;
mechExhaustHitWait = 0;
mechSwordDamage = 0;
mechBroochDamage = 0;
mechStaffDamage = 0;
mechFistDamage = 0;
mechExhaustDamage = 0;
drgnThunderFrame = 0;
drgnThunderCT = 0;
drgnThunderCharge = 0;
mechThunderWait = 0;
drgnThunderStrike = false;
mechHeadXPos = 1050;
mechHeadYPos = 10;
mechHeadCT = 0;
mechHeadFrame = 0;
mechHeadAct = 0;
mechHeadRNG = 0;
mechHeadVel = 0;
mechHeadSerial = 0;
mechHeadRest = 0;
mechExhaustCT = 0;
mechExhaustFrame = 0;
mechIntakeCT = 0;
mechIntakeFrame = 0;
mechExhaustInvBlink = 255;
mechLaserCharge = 0;
mechLaserCT = 0;
mechLaserFrame = 0;
mechLaserAct = 0;
mechLaserShockCT = 0;
mechLaserShockFrame = 0;
mechHeadChargeOn = false;
mechHeadLaserOn = false;
mechLaserWait = 0;
mechFistCharge = 0;
mechFistCT = 0;
mechFistFrame = 0;
mechFistAct = 0;
mechFistX = 0;
mechFistFarX = 0;
mechFistNearX = 797;
mechFistWait = 0;
mechHandStatus = 0;
mechFistVelCT = 0;
mechFistVel = 1;
mechBroochFrame = 0;
mechBroochAct = 0;
mechBroochCT = 0;
mechThunderCharge = 0;
mechThunderVel = 0;
mechThunderX = 0;
mechThunderCT = 0;
mechThunderFrame = 0;
mechThunderAct = 0;
mechThunderVelCT = 0;
mechCloudsFwdX1 = 0;
mechCloudsFwdX2 = 0;
mechCloudsFwdX3 = 0;
mechCloudsBackX1 = 0;
mechCloudsBackX2 = 0;
mechCloudsBackX3 = 0;
mechTeslaFrame = 0;
mechTeslaCT = 0;
mechTeslaAct = 0;
mechTeslaY = 150;
mechTeslaOn = false;
mechFeedbackCT = 0;
mechFeedbackFrame = 0;
mechFeedbackOn = false;
mechSwordFrame = 0;
mechFireCharge = 0;
mechFireCT = 0;
mechFireFrame = 0;
mechFireWait = 0;
mechFireChargeFrame = 0;
mechFireChargeCT = 0;
mechIceCharge = 0;
mechIceFormation = 0;
mechIceCT1 = 0;
mechIceFrame1 = 0;
mechIceX1 = 1670;
mechIceY1 = 0;
mechIceCT2 = 0;
mechIceFrame2 = 0;
mechIceX2 = 1920;
mechIceY2 = 0;
mechIceCT3 = 0;
mechIceFrame3 = 0;
mechIceX3 = 2170;
mechIceY3 = 0;
mechIceCT4 = 0;
mechIceFrame4 = 0;
mechIceX4 = 2420;
mechIceY4 = 0;
mechIceCT5 = 0;
mechIceFrame5 = 0;
mechIceX5 = 2670;
mechIceY5 = 0;
mechIceCT6 = 0;
mechIceFrame6 = 0;
mechIceX6 = 2920;
mechIceY6 = 0;
mechIceCT7 = 0;
mechIceFrame7 = 0;
mechIceX7 = 3170;
mechIceY7 = 0;
mechIceCT8 = 0;
mechIceFrame8 = 0;
mechIceX8 = 3420;
mechIceY8 = 0;
mechScepterFrame = 0;
mechScepterAct = 0;
mechScepterCT = 0;
mechExplosionCT1 = 0;
mechExplosionFrame1 = 0;
mechExplosionX1 = 0;
mechExplosionY1 = 0;
mechExplosionCT2 = 0;
mechExplosionFrame2 = 0;
mechExplosionX2 = 0;
mechExplosionY2 = 0;
mechExplosionCT3 = 0;
mechExplosionFrame3 = 0;
mechExplosionX3 = 0;
mechExplosionY3 = 0;
mechExplosionCT4 = 0;
mechExplosionFrame4 = 0;
mechExplosionX4 = 0;
mechExplosionY4 = 0;
mechExplosionCT5 = 0;
mechExplosionFrame5 = 0;
mechExplosionX5 = 0;
mechExplosionY5 = 0;
mechBroochInvBlink = 255;
mechHeadInvBlink = 255;
mechCloudOpacity = 0;
mechProgramDelay = 0;
mechLaserDuration = 0;
mechThunderDuration = 0;
mechHeadInvCT = 0;
mechFistInvCT = 0;
mechStaffInvCT = 0;
mechSwordInvCT = 0;
mechExhaustInvCT = 0;
mechBroochInvCT = 0;
mechThunderAttack = false;
mechLaserAttack = false;
mechFireAttack = false;
mechIceAttack = false;
mechPunchAttack = false;
mechFistBroken = false;
mechBroochBroken = false;
mechStaffBroken = false;
mechSwordBroken = false;
mechExhaustBroken = false;
mechHeadHit = false;
mechSwordHit = false;
mechBroochHit = false;
mechStaffHit = false;
mechFistHit = false;
mechExhaustHit = false;
mechHeadClawHit = false;
mechStaffClawHit = false;
mechFistClawHit = false;
mechHeadFireHit = false;
mechStaffFireHit = false;
mechFistFireHit = false;
mechSwordDamaged = false;
mechBroochDamaged = false;
mechExhaustDamaged = false;
mechStaffDamaged = false;
mechDefeatExplosionCT = 0;
broochExplosion = false;
staffExplosion = false;
fistExplosion = false;
exhaustExplosion = false;
swordExplosion = false;
#endregion
stage7eB = true;
}
#endregion
#region Adjust Camera
if (drgnY + 72 - 360 <= 0)
{
drgnCamY = 0;
}
else if (drgnY + 72 - 360 > 0)
{
if ((drgnY + 72 - 360) < cameraMaxY)
{
drgnCamY = drgnY + 72 - 360;
}
else if ((drgnY + 72 - 360) >= cameraMaxY)
{
drgnCamY = cameraMaxY;
}
}
#endregion
tutorialPos = 0;
toggleTutorial = 0;
seenTutorial = false;
breathNow = breathMax;
drgnHPNow = drgnHPMax;
updateGold = true;
actionStage = true;
}
#endregion
#region toTitleScreen == true
if (toTitleScreen == true)
{
stageManager.Dispose();
stageManager = new ContentManager(Services, "Content");
storyManager.Dispose();
storyManager = new ContentManager(Services, "Content");
mapManager.Dispose();
mapManager = new ContentManager(Services, "Content");
breathSFX.Dispose();
breathSFX = new ContentManager(Services, "Content");
stageBGM.Dispose();
stageBGM = new ContentManager(Services, "Content");
worldBGM.Dispose();
worldBGM = new ContentManager(Services, "Content");
storyBGM.Dispose();
storyBGM = new ContentManager(Services, "Content");
playStageMusic = new PlayStageMusic(1, stageBGM);
drawTitle = new DrawTitle(true, stageManager);
drgnCamX = 0;
drgnCamY = 0;
musicFade = false;
escMenu = false;
tempVolume = 1.0f;
toggleTutorial = 0;
tutorialPos = 0;
optionsLook = false;
controlsLook = false;
worldMap = false;
actionStage = false;
storybook = false;
storybookCredits = false;
storyEnd = false;
titleScreen = true;
}
#endregion
}
}
#endregion
#region titleScreen == true
if (titleScreen == true)
{
if (displayLogo == true)
{
#region Check Saved Once
if (save.Data.saveSavedOnce == true && checkLanguage == 0)
{
pointerLoc = 1;
bonusOn = save.Data.gameClear;
if (checkLanguage == 0)
{
languageType = save.Data.saveLanguageType;
if (languageType > 4 || languageType < 0)
{
languageType = 0;
}
fontSetting = save.Data.fontType;
if (fontSetting > 1 || fontSetting < 0)
{
fontSetting = 0;
}
checkLanguage = 1;
}
if (checkControl == 0)
{
controlType = save.Data.saveControlType;
if (controlType < 0 || controlType > 1)
{
controlType = 0;
}
jumpVal = save.Data.saveJump;
#region set XY
if (jumpVal == 1)
{
jumpControlX = 0;
jumpControlY = 0;
}
else if (jumpVal == 2)
{
jumpControlX = 1;
jumpControlY = 0;
}
else if (jumpVal == 3)
{
jumpControlX = 2;
jumpControlY = 0;
}
else if (jumpVal == 4)
{
jumpControlX = 3;
jumpControlY = 0;
}
else if (jumpVal == 5)
{
jumpControlX = 4;
jumpControlY = 0;
}
else if (jumpVal == 6)
{
jumpControlX = 5;
jumpControlY = 0;
}
else if (jumpVal == 7)
{
jumpControlX = 6;
jumpControlY = 0;
}
else if (jumpVal == 8)
{
jumpControlX = 7;
jumpControlY = 0;
}
else if (jumpVal == 9)
{
jumpControlX = 8;
jumpControlY = 0;
}
else if (jumpVal == 10)
{
jumpControlX = 9;
jumpControlY = 0;
}
else if (jumpVal == 11)
{
jumpControlX = 10;
jumpControlY = 0;
}
else if (jumpVal == 12)
{
jumpControlX = 11;
jumpControlY = 0;
}
else if (jumpVal == 13)
{
jumpControlX = 12;
jumpControlY = 0;
}
else if (jumpVal == 14)
{
jumpControlX = 13;
jumpControlY = 0;
}
else if (jumpVal == 15)
{
jumpControlX = 0;
jumpControlY = 1;
}
else if (jumpVal == 16)
{
jumpControlX = 1;
jumpControlY = 1;
}
else if (jumpVal == 17)
{
jumpControlX = 2;
jumpControlY = 1;
}
else if (jumpVal == 18)
{
jumpControlX = 3;
jumpControlY = 1;
}
else if (jumpVal == 19)
{
jumpControlX = 4;
jumpControlY = 1;
}
else if (jumpVal == 20)
{
jumpControlX = 5;
jumpControlY = 1;
}
else if (jumpVal == 21)
{
jumpControlX = 6;
jumpControlY = 1;
}
else if (jumpVal == 22)
{
jumpControlX = 7;
jumpControlY = 1;
}
else if (jumpVal == 23)
{
jumpControlX = 8;
jumpControlY = 1;
}
else if (jumpVal == 24)
{
jumpControlX = 9;
jumpControlY = 1;
}
else if (jumpVal == 25)
{
jumpControlX = 10;
jumpControlY = 1;
}
else if (jumpVal == 26)
{
jumpControlX = 0;
jumpControlY = 2;
}
else if (jumpVal == 27)
{
jumpControlX = 1;
jumpControlY = 2;
}
else if (jumpVal == 28)
{
jumpControlX = 2;
jumpControlY = 2;
}
else if (jumpVal == 29)
{
jumpControlX = 3;
jumpControlY = 2;
}
else if (jumpVal == 30)
{
jumpControlX = 4;
jumpControlY = 2;
}
else if (jumpVal == 31)
{
jumpControlX = 5;
jumpControlY = 2;
}
else if (jumpVal == 32)
{
jumpControlX = 6;
jumpControlY = 2;
}
else if (jumpVal == 33)
{
jumpControlX = 7;
jumpControlY = 2;
}
else if (jumpVal == 34)
{
jumpControlX = 8;
jumpControlY = 2;
}
else if (jumpVal == 35)
{
jumpControlX = 9;
jumpControlY = 2;
}
else if (jumpVal == 36)
{
jumpControlX = 0;
jumpControlY = 3;
}
else if (jumpVal == 37)
{
jumpControlX = 1;
jumpControlY = 3;
}
else if (jumpVal == 38)
{
jumpControlX = 2;
jumpControlY = 3;
}
else if (jumpVal == 39)
{
jumpControlX = 0;
jumpControlY = 4;
}
else if (jumpVal == 40)
{
jumpControlX = 1;
jumpControlY = 4;
}
else if (jumpVal == 41)
{
jumpControlX = 2;
jumpControlY = 4;
}
else if (jumpVal == 42)
{
jumpControlX = 3;
jumpControlY = 4;
}
else if (jumpVal == 43)
{
jumpControlX = 4;
jumpControlY = 4;
}
else if (jumpVal == 44)
{
jumpControlX = 5;
jumpControlY = 4;
}
else if (jumpVal == 45)
{
jumpControlX = 6;
jumpControlY = 4;
}
else if (jumpVal == 46)
{
jumpControlX = 7;
jumpControlY = 4;
}
else if (jumpVal == 47)
{
jumpControlX = 8;
jumpControlY = 4;
}
else if (jumpVal == 48)
{
jumpControlX = 9;
jumpControlY = 4;
}
else if (jumpVal == 49)
{
jumpControlX = 0;
jumpControlY = 5;
}
else if (jumpVal == 50)
{
jumpControlX = 1;
jumpControlY = 5;
}
else if (jumpVal == 51)
{
jumpControlX = 2;
jumpControlY = 5;
}
else if (jumpVal == 52)
{
jumpControlX = 3;
jumpControlY = 5;
}
else
{
jumpVal = 27;
jumpControlX = 1;
jumpControlY = 2;
}
#endregion
clawVal = save.Data.saveClaw;
#region set XY
if (clawVal == 1)
{
clawControlX = 0;
clawControlY = 0;
}
else if (clawVal == 2)
{
clawControlX = 1;
clawControlY = 0;
}
else if (clawVal == 3)
{
clawControlX = 2;
clawControlY = 0;
}
else if (clawVal == 4)
{
clawControlX = 3;
clawControlY = 0;
}
else if (clawVal == 5)
{
clawControlX = 4;
clawControlY = 0;
}
else if (clawVal == 6)
{
clawControlX = 5;
clawControlY = 0;
}
else if (clawVal == 7)
{
clawControlX = 6;
clawControlY = 0;
}
else if (clawVal == 8)
{
clawControlX = 7;
clawControlY = 0;
}
else if (clawVal == 9)
{
clawControlX = 8;
clawControlY = 0;
}
else if (clawVal == 10)
{
clawControlX = 9;
clawControlY = 0;
}
else if (clawVal == 11)
{
clawControlX = 10;
clawControlY = 0;
}
else if (clawVal == 12)
{
clawControlX = 11;
clawControlY = 0;
}
else if (clawVal == 13)
{
clawControlX = 12;
clawControlY = 0;
}
else if (clawVal == 14)
{
clawControlX = 13;
clawControlY = 0;
}
else if (clawVal == 15)
{
clawControlX = 0;
clawControlY = 1;
}
else if (clawVal == 16)
{
clawControlX = 1;
clawControlY = 1;
}
else if (clawVal == 17)
{
clawControlX = 2;
clawControlY = 1;
}
else if (clawVal == 18)
{
clawControlX = 3;
clawControlY = 1;
}
else if (clawVal == 19)
{
clawControlX = 4;
clawControlY = 1;
}
else if (clawVal == 20)
{
clawControlX = 5;
clawControlY = 1;
}
else if (clawVal == 21)
{
clawControlX = 6;
clawControlY = 1;
}
else if (clawVal == 22)
{
clawControlX = 7;
clawControlY = 1;
}
else if (clawVal == 23)
{
clawControlX = 8;
clawControlY = 1;
}
else if (clawVal == 24)
{
clawControlX = 9;
clawControlY = 1;
}
else if (clawVal == 25)
{
clawControlX = 10;
clawControlY = 1;
}
else if (clawVal == 26)
{
clawControlX = 0;
clawControlY = 2;
}
else if (clawVal == 27)
{
clawControlX = 1;
clawControlY = 2;
}
else if (clawVal == 28)
{
clawControlX = 2;
clawControlY = 2;
}
else if (clawVal == 29)
{
clawControlX = 3;
clawControlY = 2;
}
else if (clawVal == 30)
{
clawControlX = 4;
clawControlY = 2;
}
else if (clawVal == 31)
{
clawControlX = 5;
clawControlY = 2;
}
else if (clawVal == 32)
{
clawControlX = 6;
clawControlY = 2;
}
else if (clawVal == 33)
{
clawControlX = 7;
clawControlY = 2;
}
else if (clawVal == 34)
{
clawControlX = 8;
clawControlY = 2;
}
else if (clawVal == 35)
{
clawControlX = 9;
clawControlY = 2;
}
else if (clawVal == 36)
{
clawControlX = 0;
clawControlY = 3;
}
else if (clawVal == 37)
{
clawControlX = 1;
clawControlY = 3;
}
else if (clawVal == 38)
{
clawControlX = 2;
clawControlY = 3;
}
else if (clawVal == 39)
{
clawControlX = 0;
clawControlY = 4;
}
else if (clawVal == 40)
{
clawControlX = 1;
clawControlY = 4;
}
else if (clawVal == 41)
{
clawControlX = 2;
clawControlY = 4;
}
else if (clawVal == 42)
{
clawControlX = 3;
clawControlY = 4;
}
else if (clawVal == 43)
{
clawControlX = 4;
clawControlY = 4;
}
else if (clawVal == 44)
{
clawControlX = 5;
clawControlY = 4;
}
else if (clawVal == 45)
{
clawControlX = 6;
clawControlY = 4;
}
else if (clawVal == 46)
{
clawControlX = 7;
clawControlY = 4;
}
else if (clawVal == 47)
{
clawControlX = 8;
clawControlY = 4;
}
else if (clawVal == 48)
{
clawControlX = 9;
clawControlY = 4;
}
else if (clawVal == 49)
{
clawControlX = 0;
clawControlY = 5;
}
else if (clawVal == 50)
{
clawControlX = 1;
clawControlY = 5;
}
else if (clawVal == 51)
{
clawControlX = 2;
clawControlY = 5;
}
else if (clawVal == 52)
{
clawControlX = 3;
clawControlY = 5;
}
else
{
clawVal = 26;
clawControlX = 0;
clawControlY = 2;
}
#endregion
breathVal = save.Data.saveBreath;
#region set XY
if (breathVal == 1)
{
breathControlX = 0;
breathControlY = 0;
}
else if (breathVal == 2)
{
breathControlX = 1;
breathControlY = 0;
}
else if (breathVal == 3)
{
breathControlX = 2;
breathControlY = 0;
}
else if (breathVal == 4)
{
breathControlX = 3;
breathControlY = 0;
}
else if (breathVal == 5)
{
breathControlX = 4;
breathControlY = 0;
}
else if (breathVal == 6)
{
breathControlX = 5;
breathControlY = 0;
}
else if (breathVal == 7)
{
breathControlX = 6;
breathControlY = 0;
}
else if (breathVal == 8)
{
breathControlX = 7;
breathControlY = 0;
}
else if (breathVal == 9)
{
breathControlX = 8;
breathControlY = 0;
}
else if (breathVal == 10)
{
breathControlX = 9;
breathControlY = 0;
}
else if (breathVal == 11)
{
breathControlX = 10;
breathControlY = 0;
}
else if (breathVal == 12)
{
breathControlX = 11;
breathControlY = 0;
}
else if (breathVal == 13)
{
breathControlX = 12;
breathControlY = 0;
}
else if (breathVal == 14)
{
breathControlX = 13;
breathControlY = 0;
}
else if (breathVal == 15)
{
breathControlX = 0;
breathControlY = 1;
}
else if (breathVal == 16)
{
breathControlX = 1;
breathControlY = 1;
}
else if (breathVal == 17)
{
breathControlX = 2;
breathControlY = 1;
}
else if (breathVal == 18)
{
breathControlX = 3;
breathControlY = 1;
}
else if (breathVal == 19)
{
breathControlX = 4;
breathControlY = 1;
}
else if (breathVal == 20)
{
breathControlX = 5;
breathControlY = 1;
}
else if (breathVal == 21)
{
breathControlX = 6;
breathControlY = 1;
}
else if (breathVal == 22)
{
breathControlX = 7;
breathControlY = 1;
}
else if (breathVal == 23)
{
breathControlX = 8;
breathControlY = 1;
}
else if (breathVal == 24)
{
breathControlX = 9;
breathControlY = 1;
}
else if (breathVal == 25)
{
breathControlX = 10;
breathControlY = 1;
}
else if (breathVal == 26)
{
breathControlX = 0;
breathControlY = 2;
}
else if (breathVal == 27)
{
breathControlX = 1;
breathControlY = 2;
}
else if (breathVal == 28)
{
breathControlX = 2;
breathControlY = 2;
}
else if (breathVal == 29)
{
breathControlX = 3;
breathControlY = 2;
}
else if (breathVal == 30)
{
breathControlX = 4;
breathControlY = 2;
}
else if (breathVal == 31)
{
breathControlX = 5;
breathControlY = 2;
}
else if (breathVal == 32)
{
breathControlX = 6;
breathControlY = 2;
}
else if (breathVal == 33)
{
breathControlX = 7;
breathControlY = 2;
}
else if (breathVal == 34)
{
breathControlX = 8;
breathControlY = 2;
}
else if (breathVal == 35)
{
breathControlX = 9;
breathControlY = 2;
}
else if (breathVal == 36)
{
breathControlX = 0;
breathControlY = 3;
}
else if (breathVal == 37)
{
breathControlX = 1;
breathControlY = 3;
}
else if (breathVal == 38)
{
breathControlX = 2;
breathControlY = 3;
}
else if (breathVal == 39)
{
breathControlX = 0;
breathControlY = 4;
}
else if (breathVal == 40)
{
breathControlX = 1;
breathControlY = 4;
}
else if (breathVal == 41)
{
breathControlX = 2;
breathControlY = 4;
}
else if (breathVal == 42)
{
breathControlX = 3;
breathControlY = 4;
}
else if (breathVal == 43)
{
breathControlX = 4;
breathControlY = 4;
}
else if (breathVal == 44)
{
breathControlX = 5;
breathControlY = 4;
}
else if (breathVal == 45)
{
breathControlX = 6;
breathControlY = 4;
}
else if (breathVal == 46)
{
breathControlX = 7;
breathControlY = 4;
}
else if (breathVal == 47)
{
breathControlX = 8;
breathControlY = 4;
}
else if (breathVal == 48)
{
breathControlX = 9;
breathControlY = 4;
}
else if (breathVal == 49)
{
breathControlX = 0;
breathControlY = 5;
}
else if (breathVal == 50)
{
breathControlX = 1;
breathControlY = 5;
}
else if (breathVal == 51)
{
breathControlX = 2;
breathControlY = 5;
}
else if (breathVal == 52)
{
breathControlX = 3;
breathControlY = 5;
}
else
{
breathVal = 15;
breathControlX = 0;
breathControlY = 1;
}
#endregion
confVal = save.Data.saveConf;
#region set XY
if (confVal == 1)
{
confControlX = 0;
confControlY = 0;
}
else if (confVal == 2)
{
confControlX = 1;
confControlY = 0;
}
else if (confVal == 3)
{
confControlX = 2;
confControlY = 0;
}
else if (confVal == 4)
{
confControlX = 3;
confControlY = 0;
}
else if (confVal == 5)
{
confControlX = 4;
confControlY = 0;
}
else if (confVal == 6)
{
confControlX = 5;
confControlY = 0;
}
else if (confVal == 7)
{
confControlX = 6;
confControlY = 0;
}
else if (confVal == 8)
{
confControlX = 7;
confControlY = 0;
}
else if (confVal == 9)
{
confControlX = 8;
confControlY = 0;
}
else if (confVal == 10)
{
confControlX = 9;
confControlY = 0;
}
else if (confVal == 11)
{
confControlX = 10;
confControlY = 0;
}
else if (confVal == 12)
{
confControlX = 11;
confControlY = 0;
}
else if (confVal == 13)
{
confControlX = 12;
confControlY = 0;
}
else if (confVal == 14)
{
confControlX = 13;
confControlY = 0;
}
else if (confVal == 15)
{
confControlX = 0;
confControlY = 1;
}
else if (confVal == 16)
{
confControlX = 1;
confControlY = 1;
}
else if (confVal == 17)
{
confControlX = 2;
confControlY = 1;
}
else if (confVal == 18)
{
confControlX = 3;
confControlY = 1;
}
else if (confVal == 19)
{
confControlX = 4;
confControlY = 1;
}
else if (confVal == 20)
{
confControlX = 5;
confControlY = 1;
}
else if (confVal == 21)
{
confControlX = 6;
confControlY = 1;
}
else if (confVal == 22)
{
confControlX = 7;
confControlY = 1;
}
else if (confVal == 23)
{
confControlX = 8;
confControlY = 1;
}
else if (confVal == 24)
{
confControlX = 9;
confControlY = 1;
}
else if (confVal == 25)
{
confControlX = 10;
confControlY = 1;
}
else if (confVal == 26)
{
confControlX = 0;
confControlY = 2;
}
else if (confVal == 27)
{
confControlX = 1;
confControlY = 2;
}
else if (confVal == 28)
{
confControlX = 2;
confControlY = 2;
}
else if (confVal == 29)
{
confControlX = 3;
confControlY = 2;
}
else if (confVal == 30)
{
confControlX = 4;
confControlY = 2;
}
else if (confVal == 31)
{
confControlX = 5;
confControlY = 2;
}
else if (confVal == 32)
{
confControlX = 6;
confControlY = 2;
}
else if (confVal == 33)
{
confControlX = 7;
confControlY = 2;
}
else if (confVal == 34)
{
confControlX = 8;
confControlY = 2;
}
else if (confVal == 35)
{
confControlX = 9;
confControlY = 2;
}
else if (confVal == 36)
{
confControlX = 0;
confControlY = 3;
}
else if (confVal == 37)
{
confControlX = 1;
confControlY = 3;
}
else if (confVal == 38)
{
confControlX = 2;
confControlY = 3;
}
else if (confVal == 39)
{
confControlX = 0;
confControlY = 4;
}
else if (confVal == 40)
{
confControlX = 1;
confControlY = 4;
}
else if (confVal == 41)
{
confControlX = 2;
confControlY = 4;
}
else if (confVal == 42)
{
confControlX = 3;
confControlY = 4;
}
else if (confVal == 43)
{
confControlX = 4;
confControlY = 4;
}
else if (confVal == 44)
{
confControlX = 5;
confControlY = 4;
}
else if (confVal == 45)
{
confControlX = 6;
confControlY = 4;
}
else if (confVal == 46)
{
confControlX = 7;
confControlY = 4;
}
else if (confVal == 47)
{
confControlX = 8;
confControlY = 4;
}
else if (confVal == 48)
{
confControlX = 9;
confControlY = 4;
}
else if (confVal == 49)
{
confControlX = 0;
confControlY = 5;
}
else if (confVal == 50)
{
confControlX = 1;
confControlY = 5;
}
else if (confVal == 51)
{
confControlX = 2;
confControlY = 5;
}
else if (confVal == 52)
{
confControlX = 3;
confControlY = 5;
}
else
{
confVal = 28;
confControlX = 2;
confControlY = 2;
}
#endregion
swlVal = save.Data.saveSwl;
#region set XY
if (swlVal == 1)
{
swlControlX = 0;
swlControlY = 0;
}
else if (swlVal == 2)
{
swlControlX = 1;
swlControlY = 0;
}
else if (swlVal == 3)
{
swlControlX = 2;
swlControlY = 0;
}
else if (swlVal == 4)
{
swlControlX = 3;
swlControlY = 0;
}
else if (swlVal == 5)
{
swlControlX = 4;
swlControlY = 0;
}
else if (swlVal == 6)
{
swlControlX = 5;
swlControlY = 0;
}
else if (swlVal == 7)
{
swlControlX = 6;
swlControlY = 0;
}
else if (swlVal == 8)
{
swlControlX = 7;
swlControlY = 0;
}
else if (swlVal == 9)
{
swlControlX = 8;
swlControlY = 0;
}
else if (swlVal == 10)
{
swlControlX = 9;
swlControlY = 0;
}
else if (swlVal == 11)
{
swlControlX = 10;
swlControlY = 0;
}
else if (swlVal == 12)
{
swlControlX = 11;
swlControlY = 0;
}
else if (swlVal == 13)
{
swlControlX = 12;
swlControlY = 0;
}
else if (swlVal == 14)
{
swlControlX = 13;
swlControlY = 0;
}
else if (swlVal == 15)
{
swlControlX = 0;
swlControlY = 1;
}
else if (swlVal == 16)
{
swlControlX = 1;
swlControlY = 1;
}
else if (swlVal == 17)
{
swlControlX = 2;
swlControlY = 1;
}
else if (swlVal == 18)
{
swlControlX = 3;
swlControlY = 1;
}
else if (swlVal == 19)
{
swlControlX = 4;
swlControlY = 1;
}
else if (swlVal == 20)
{
swlControlX = 5;
swlControlY = 1;
}
else if (swlVal == 21)
{
swlControlX = 6;
swlControlY = 1;
}
else if (swlVal == 22)
{
swlControlX = 7;
swlControlY = 1;
}
else if (swlVal == 23)
{
swlControlX = 8;
swlControlY = 1;
}
else if (swlVal == 24)
{
swlControlX = 9;
swlControlY = 1;
}
else if (swlVal == 25)
{
swlControlX = 10;
swlControlY = 1;
}
else if (swlVal == 26)
{
swlControlX = 0;
swlControlY = 2;
}
else if (swlVal == 27)
{
swlControlX = 1;
swlControlY = 2;
}
else if (swlVal == 28)
{
swlControlX = 2;
swlControlY = 2;
}
else if (swlVal == 29)
{
swlControlX = 3;
swlControlY = 2;
}
else if (swlVal == 30)
{
swlControlX = 4;
swlControlY = 2;
}
else if (swlVal == 31)
{
swlControlX = 5;
swlControlY = 2;
}
else if (swlVal == 32)
{
swlControlX = 6;
swlControlY = 2;
}
else if (swlVal == 33)
{
swlControlX = 7;
swlControlY = 2;
}
else if (swlVal == 34)
{
swlControlX = 8;
swlControlY = 2;
}
else if (swlVal == 35)
{
swlControlX = 9;
swlControlY = 2;
}
else if (swlVal == 36)
{
swlControlX = 0;
swlControlY = 3;
}
else if (swlVal == 37)
{
swlControlX = 1;
swlControlY = 3;
}
else if (swlVal == 38)
{
swlControlX = 2;
swlControlY = 3;
}
else if (swlVal == 39)
{
swlControlX = 0;
swlControlY = 4;
}
else if (swlVal == 40)
{
swlControlX = 1;
swlControlY = 4;
}
else if (swlVal == 41)
{
swlControlX = 2;
swlControlY = 4;
}
else if (swlVal == 42)
{
swlControlX = 3;
swlControlY = 4;
}
else if (swlVal == 43)
{
swlControlX = 4;
swlControlY = 4;
}
else if (swlVal == 44)
{
swlControlX = 5;
swlControlY = 4;
}
else if (swlVal == 45)
{
swlControlX = 6;
swlControlY = 4;
}
else if (swlVal == 46)
{
swlControlX = 7;
swlControlY = 4;
}
else if (swlVal == 47)
{
swlControlX = 8;
swlControlY = 4;
}
else if (swlVal == 48)
{
swlControlX = 9;
swlControlY = 4;
}
else if (swlVal == 49)
{
swlControlX = 0;
swlControlY = 5;
}
else if (swlVal == 50)
{
swlControlX = 1;
swlControlY = 5;
}
else if (swlVal == 51)
{
swlControlX = 2;
swlControlY = 5;
}
else if (swlVal == 52)
{
swlControlX = 3;
swlControlY = 5;
}
else
{
swlVal = 16;
swlControlX = 1;
swlControlY = 1;
}
#endregion
swrVal = save.Data.saveSwr;
#region set XY
if (swrVal == 1)
{
swrControlX = 0;
swrControlY = 0;
}
else if (swrVal == 2)
{
swrControlX = 1;
swrControlY = 0;
}
else if (swrVal == 3)
{
swrControlX = 2;
swrControlY = 0;
}
else if (swrVal == 4)
{
swrControlX = 3;
swrControlY = 0;
}
else if (swrVal == 5)
{
swrControlX = 4;
swrControlY = 0;
}
else if (swrVal == 6)
{
swrControlX = 5;
swrControlY = 0;
}
else if (swrVal == 7)
{
swrControlX = 6;
swrControlY = 0;
}
else if (swrVal == 8)
{
swrControlX = 7;
swrControlY = 0;
}
else if (swrVal == 9)
{
swrControlX = 8;
swrControlY = 0;
}
else if (swrVal == 10)
{
swrControlX = 9;
swrControlY = 0;
}
else if (swrVal == 11)
{
swrControlX = 10;
swrControlY = 0;
}
else if (swrVal == 12)
{
swrControlX = 11;
swrControlY = 0;
}
else if (swrVal == 13)
{
swrControlX = 12;
swrControlY = 0;
}
else if (swrVal == 14)
{
swrControlX = 13;
swrControlY = 0;
}
else if (swrVal == 15)
{
swrControlX = 0;
swrControlY = 1;
}
else if (swrVal == 16)
{
swrControlX = 1;
swrControlY = 1;
}
else if (swrVal == 17)
{
swrControlX = 2;
swrControlY = 1;
}
else if (swrVal == 18)
{
swrControlX = 3;
swrControlY = 1;
}
else if (swrVal == 19)
{
swrControlX = 4;
swrControlY = 1;
}
else if (swrVal == 20)
{
swrControlX = 5;
swrControlY = 1;
}
else if (swrVal == 21)
{
swrControlX = 6;
swrControlY = 1;
}
else if (swrVal == 22)
{
swrControlX = 7;
swrControlY = 1;
}
else if (swrVal == 23)
{
swrControlX = 8;
swrControlY = 1;
}
else if (swrVal == 24)
{
swrControlX = 9;
swrControlY = 1;
}
else if (swrVal == 25)
{
swrControlX = 10;
swrControlY = 1;
}
else if (swrVal == 26)
{
swrControlX = 0;
swrControlY = 2;
}
else if (swrVal == 27)
{
swrControlX = 1;
swrControlY = 2;
}
else if (swrVal == 28)
{
swrControlX = 2;
swrControlY = 2;
}
else if (swrVal == 29)
{
swrControlX = 3;
swrControlY = 2;
}
else if (swrVal == 30)
{
swrControlX = 4;
swrControlY = 2;
}
else if (swrVal == 31)
{
swrControlX = 5;
swrControlY = 2;
}
else if (swrVal == 32)
{
swrControlX = 6;
swrControlY = 2;
}
else if (swrVal == 33)
{
swrControlX = 7;
swrControlY = 2;
}
else if (swrVal == 34)
{
swrControlX = 8;
swrControlY = 2;
}
else if (swrVal == 35)
{
swrControlX = 9;
swrControlY = 2;
}
else if (swrVal == 36)
{
swrControlX = 0;
swrControlY = 3;
}
else if (swrVal == 37)
{
swrControlX = 1;
swrControlY = 3;
}
else if (swrVal == 38)
{
swrControlX = 2;
swrControlY = 3;
}
else if (swrVal == 39)
{
swrControlX = 0;
swrControlY = 4;
}
else if (swrVal == 40)
{
swrControlX = 1;
swrControlY = 4;
}
else if (swrVal == 41)
{
swrControlX = 2;
swrControlY = 4;
}
else if (swrVal == 42)
{
swrControlX = 3;
swrControlY = 4;
}
else if (swrVal == 43)
{
swrControlX = 4;
swrControlY = 4;
}
else if (swrVal == 44)
{
swrControlX = 5;
swrControlY = 4;
}
else if (swrVal == 45)
{
swrControlX = 6;
swrControlY = 4;
}
else if (swrVal == 46)
{
swrControlX = 7;
swrControlY = 4;
}
else if (swrVal == 47)
{
swrControlX = 8;
swrControlY = 4;
}
else if (swrVal == 48)
{
swrControlX = 9;
swrControlY = 4;
}
else if (swrVal == 49)
{
swrControlX = 0;
swrControlY = 5;
}
else if (swrVal == 50)
{
swrControlX = 1;
swrControlY = 5;
}
else if (swrVal == 51)
{
swrControlX = 2;
swrControlY = 5;
}
else if (swrVal == 52)
{
swrControlX = 3;
swrControlY = 5;
}
else
{
swrVal = 17;
swrControlX = 2;
swrControlY = 1;
}
#endregion
leftVal = save.Data.saveLeft;
#region set XY
if (leftVal == 1)
{
leftControlX = 0;
leftControlY = 0;
}
else if (leftVal == 2)
{
leftControlX = 1;
leftControlY = 0;
}
else if (leftVal == 3)
{
leftControlX = 2;
leftControlY = 0;
}
else if (leftVal == 4)
{
leftControlX = 3;
leftControlY = 0;
}
else if (leftVal == 5)
{
leftControlX = 4;
leftControlY = 0;
}
else if (leftVal == 6)
{
leftControlX = 5;
leftControlY = 0;
}
else if (leftVal == 7)
{
leftControlX = 6;
leftControlY = 0;
}
else if (leftVal == 8)
{
leftControlX = 7;
leftControlY = 0;
}
else if (leftVal == 9)
{
leftControlX = 8;
leftControlY = 0;
}
else if (leftVal == 10)
{
leftControlX = 9;
leftControlY = 0;
}
else if (leftVal == 11)
{
leftControlX = 10;
leftControlY = 0;
}
else if (leftVal == 12)
{
leftControlX = 11;
leftControlY = 0;
}
else if (leftVal == 13)
{
leftControlX = 12;
leftControlY = 0;
}
else if (leftVal == 14)
{
leftControlX = 13;
leftControlY = 0;
}
else if (leftVal == 15)
{
leftControlX = 0;
leftControlY = 1;
}
else if (leftVal == 16)
{
leftControlX = 1;
leftControlY = 1;
}
else if (leftVal == 17)
{
leftControlX = 2;
leftControlY = 1;
}
else if (leftVal == 18)
{
leftControlX = 3;
leftControlY = 1;
}
else if (leftVal == 19)
{
leftControlX = 4;
leftControlY = 1;
}
else if (leftVal == 20)
{
leftControlX = 5;
leftControlY = 1;
}
else if (leftVal == 21)
{
leftControlX = 6;
leftControlY = 1;
}
else if (leftVal == 22)
{
leftControlX = 7;
leftControlY = 1;
}
else if (leftVal == 23)
{
leftControlX = 8;
leftControlY = 1;
}
else if (leftVal == 24)
{
leftControlX = 9;
leftControlY = 1;
}
else if (leftVal == 25)
{
leftControlX = 10;
leftControlY = 1;
}
else if (leftVal == 26)
{
leftControlX = 0;
leftControlY = 2;
}
else if (leftVal == 27)
{
leftControlX = 1;
leftControlY = 2;
}
else if (leftVal == 28)
{
leftControlX = 2;
leftControlY = 2;
}
else if (leftVal == 29)
{
leftControlX = 3;
leftControlY = 2;
}
else if (leftVal == 30)
{
leftControlX = 4;
leftControlY = 2;
}
else if (leftVal == 31)
{
leftControlX = 5;
leftControlY = 2;
}
else if (leftVal == 32)
{
leftControlX = 6;
leftControlY = 2;
}
else if (leftVal == 33)
{
leftControlX = 7;
leftControlY = 2;
}
else if (leftVal == 34)
{
leftControlX = 8;
leftControlY = 2;
}
else if (leftVal == 35)
{
leftControlX = 9;
leftControlY = 2;
}
else if (leftVal == 36)
{
leftControlX = 0;
leftControlY = 3;
}
else if (leftVal == 37)
{
leftControlX = 1;
leftControlY = 3;
}
else if (leftVal == 38)
{
leftControlX = 2;
leftControlY = 3;
}
else if (leftVal == 39)
{
leftControlX = 0;
leftControlY = 4;
}
else if (leftVal == 40)
{
leftControlX = 1;
leftControlY = 4;
}
else if (leftVal == 41)
{
leftControlX = 2;
leftControlY = 4;
}
else if (leftVal == 42)
{
leftControlX = 3;
leftControlY = 4;
}
else if (leftVal == 43)
{
leftControlX = 4;
leftControlY = 4;
}
else if (leftVal == 44)
{
leftControlX = 5;
leftControlY = 4;
}
else if (leftVal == 45)
{
leftControlX = 6;
leftControlY = 4;
}
else if (leftVal == 46)
{
leftControlX = 7;
leftControlY = 4;
}
else if (leftVal == 47)
{
leftControlX = 8;
leftControlY = 4;
}
else if (leftVal == 48)
{
leftControlX = 9;
leftControlY = 4;
}
else if (leftVal == 49)
{
leftControlX = 0;
leftControlY = 5;
}
else if (leftVal == 50)
{
leftControlX = 1;
leftControlY = 5;
}
else if (leftVal == 51)
{
leftControlX = 2;
leftControlY = 5;
}
else if (leftVal == 52)
{
leftControlX = 3;
leftControlY = 5;
}
else
{
leftVal = 49;
leftControlX = 0;
leftControlY = 5;
}
#endregion
rightVal = save.Data.saveRight;
#region set XY
if (rightVal == 1)
{
rightControlX = 0;
rightControlY = 0;
}
else if (rightVal == 2)
{
rightControlX = 1;
rightControlY = 0;
}
else if (rightVal == 3)
{
rightControlX = 2;
rightControlY = 0;
}
else if (rightVal == 4)
{
rightControlX = 3;
rightControlY = 0;
}
else if (rightVal == 5)
{
rightControlX = 4;
rightControlY = 0;
}
else if (rightVal == 6)
{
rightControlX = 5;
rightControlY = 0;
}
else if (rightVal == 7)
{
rightControlX = 6;
rightControlY = 0;
}
else if (rightVal == 8)
{
rightControlX = 7;
rightControlY = 0;
}
else if (rightVal == 9)
{
rightControlX = 8;
rightControlY = 0;
}
else if (rightVal == 10)
{
rightControlX = 9;
rightControlY = 0;
}
else if (rightVal == 11)
{
rightControlX = 10;
rightControlY = 0;
}
else if (rightVal == 12)
{
rightControlX = 11;
rightControlY = 0;
}
else if (rightVal == 13)
{
rightControlX = 12;
rightControlY = 0;
}
else if (rightVal == 14)
{
rightControlX = 13;
rightControlY = 0;
}
else if (rightVal == 15)
{
rightControlX = 0;
rightControlY = 1;
}
else if (rightVal == 16)
{
rightControlX = 1;
rightControlY = 1;
}
else if (rightVal == 17)
{
rightControlX = 2;
rightControlY = 1;
}
else if (rightVal == 18)
{
rightControlX = 3;
rightControlY = 1;
}
else if (rightVal == 19)
{
rightControlX = 4;
rightControlY = 1;
}
else if (rightVal == 20)
{
rightControlX = 5;
rightControlY = 1;
}
else if (rightVal == 21)
{
rightControlX = 6;
rightControlY = 1;
}
else if (rightVal == 22)
{
rightControlX = 7;
rightControlY = 1;
}
else if (rightVal == 23)
{
rightControlX = 8;
rightControlY = 1;
}
else if (rightVal == 24)
{
rightControlX = 9;
rightControlY = 1;
}
else if (rightVal == 25)
{
rightControlX = 10;
rightControlY = 1;
}
else if (rightVal == 26)
{
rightControlX = 0;
rightControlY = 2;
}
else if (rightVal == 27)
{
rightControlX = 1;
rightControlY = 2;
}
else if (rightVal == 28)
{
rightControlX = 2;
rightControlY = 2;
}
else if (rightVal == 29)
{
rightControlX = 3;
rightControlY = 2;
}
else if (rightVal == 30)
{
rightControlX = 4;
rightControlY = 2;
}
else if (rightVal == 31)
{
rightControlX = 5;
rightControlY = 2;
}
else if (rightVal == 32)
{
rightControlX = 6;
rightControlY = 2;
}
else if (rightVal == 33)
{
rightControlX = 7;
rightControlY = 2;
}
else if (rightVal == 34)
{
rightControlX = 8;
rightControlY = 2;
}
else if (rightVal == 35)
{
rightControlX = 9;
rightControlY = 2;
}
else if (rightVal == 36)
{
rightControlX = 0;
rightControlY = 3;
}
else if (rightVal == 37)
{
rightControlX = 1;
rightControlY = 3;
}
else if (rightVal == 38)
{
rightControlX = 2;
rightControlY = 3;
}
else if (rightVal == 39)
{
rightControlX = 0;
rightControlY = 4;
}
else if (rightVal == 40)
{
rightControlX = 1;
rightControlY = 4;
}
else if (rightVal == 41)
{
rightControlX = 2;
rightControlY = 4;
}
else if (rightVal == 42)
{
rightControlX = 3;
rightControlY = 4;
}
else if (rightVal == 43)
{
rightControlX = 4;
rightControlY = 4;
}
else if (rightVal == 44)
{
rightControlX = 5;
rightControlY = 4;
}
else if (rightVal == 45)
{
rightControlX = 6;
rightControlY = 4;
}
else if (rightVal == 46)
{
rightControlX = 7;
rightControlY = 4;
}
else if (rightVal == 47)
{
rightControlX = 8;
rightControlY = 4;
}
else if (rightVal == 48)
{
rightControlX = 9;
rightControlY = 4;
}
else if (rightVal == 49)
{
rightControlX = 0;
rightControlY = 5;
}
else if (rightVal == 50)
{
rightControlX = 1;
rightControlY = 5;
}
else if (rightVal == 51)
{
rightControlX = 2;
rightControlY = 5;
}
else if (rightVal == 52)
{
rightControlX = 3;
rightControlY = 5;
}
else
{
rightVal = 50;
rightControlX = 1;
rightControlY = 5;
}
#endregion
upVal = save.Data.saveUp;
#region set XY
if (upVal == 1)
{
upControlX = 0;
upControlY = 0;
}
else if (upVal == 2)
{
upControlX = 1;
upControlY = 0;
}
else if (upVal == 3)
{
upControlX = 2;
upControlY = 0;
}
else if (upVal == 4)
{
upControlX = 3;
upControlY = 0;
}
else if (upVal == 5)
{
upControlX = 4;
upControlY = 0;
}
else if (upVal == 6)
{
upControlX = 5;
upControlY = 0;
}
else if (upVal == 7)
{
upControlX = 6;
upControlY = 0;
}
else if (upVal == 8)
{
upControlX = 7;
upControlY = 0;
}
else if (upVal == 9)
{
upControlX = 8;
upControlY = 0;
}
else if (upVal == 10)
{
upControlX = 9;
upControlY = 0;
}
else if (upVal == 11)
{
upControlX = 10;
upControlY = 0;
}
else if (upVal == 12)
{
upControlX = 11;
upControlY = 0;
}
else if (upVal == 13)
{
upControlX = 12;
upControlY = 0;
}
else if (upVal == 14)
{
upControlX = 13;
upControlY = 0;
}
else if (upVal == 15)
{
upControlX = 0;
upControlY = 1;
}
else if (upVal == 16)
{
upControlX = 1;
upControlY = 1;
}
else if (upVal == 17)
{
upControlX = 2;
upControlY = 1;
}
else if (upVal == 18)
{
upControlX = 3;
upControlY = 1;
}
else if (upVal == 19)
{
upControlX = 4;
upControlY = 1;
}
else if (upVal == 20)
{
upControlX = 5;
upControlY = 1;
}
else if (upVal == 21)
{
upControlX = 6;
upControlY = 1;
}
else if (upVal == 22)
{
upControlX = 7;
upControlY = 1;
}
else if (upVal == 23)
{
upControlX = 8;
upControlY = 1;
}
else if (upVal == 24)
{
upControlX = 9;
upControlY = 1;
}
else if (upVal == 25)
{
upControlX = 10;
upControlY = 1;
}
else if (upVal == 26)
{
upControlX = 0;
upControlY = 2;
}
else if (upVal == 27)
{
upControlX = 1;
upControlY = 2;
}
else if (upVal == 28)
{
upControlX = 2;
upControlY = 2;
}
else if (upVal == 29)
{
upControlX = 3;
upControlY = 2;
}
else if (upVal == 30)
{
upControlX = 4;
upControlY = 2;
}
else if (upVal == 31)
{
upControlX = 5;
upControlY = 2;
}
else if (upVal == 32)
{
upControlX = 6;
upControlY = 2;
}
else if (upVal == 33)
{
upControlX = 7;
upControlY = 2;
}
else if (upVal == 34)
{
upControlX = 8;
upControlY = 2;
}
else if (upVal == 35)
{
upControlX = 9;
upControlY = 2;
}
else if (upVal == 36)
{
upControlX = 0;
upControlY = 3;
}
else if (upVal == 37)
{
upControlX = 1;
upControlY = 3;
}
else if (upVal == 38)
{
upControlX = 2;
upControlY = 3;
}
else if (upVal == 39)
{
upControlX = 0;
upControlY = 4;
}
else if (upVal == 40)
{
upControlX = 1;
upControlY = 4;
}
else if (upVal == 41)
{
upControlX = 2;
upControlY = 4;
}
else if (upVal == 42)
{
upControlX = 3;
upControlY = 4;
}
else if (upVal == 43)
{
upControlX = 4;
upControlY = 4;
}
else if (upVal == 44)
{
upControlX = 5;
upControlY = 4;
}
else if (upVal == 45)
{
upControlX = 6;
upControlY = 4;
}
else if (upVal == 46)
{
upControlX = 7;
upControlY = 4;
}
else if (upVal == 47)
{
upControlX = 8;
upControlY = 4;
}
else if (upVal == 48)
{
upControlX = 9;
upControlY = 4;
}
else if (upVal == 49)
{
upControlX = 0;
upControlY = 5;
}
else if (upVal == 50)
{
upControlX = 1;
upControlY = 5;
}
else if (upVal == 51)
{
upControlX = 2;
upControlY = 5;
}
else if (upVal == 52)
{
upControlX = 3;
upControlY = 5;
}
else
{
upVal = 51;
upControlX = 2;
upControlY = 5;
}
#endregion
downVal = save.Data.saveDown;
#region set XY
if (downVal == 1)
{
downControlX = 0;
downControlY = 0;
}
else if (downVal == 2)
{
downControlX = 1;
downControlY = 0;
}
else if (downVal == 3)
{
downControlX = 2;
downControlY = 0;
}
else if (downVal == 4)
{
downControlX = 3;
downControlY = 0;
}
else if (downVal == 5)
{
downControlX = 4;
downControlY = 0;
}
else if (downVal == 6)
{
downControlX = 5;
downControlY = 0;
}
else if (downVal == 7)
{
downControlX = 6;
downControlY = 0;
}
else if (downVal == 8)
{
downControlX = 7;
downControlY = 0;
}
else if (downVal == 9)
{
downControlX = 8;
downControlY = 0;
}
else if (downVal == 10)
{
downControlX = 9;
downControlY = 0;
}
else if (downVal == 11)
{
downControlX = 10;
downControlY = 0;
}
else if (downVal == 12)
{
downControlX = 11;
downControlY = 0;
}
else if (downVal == 13)
{
downControlX = 12;
downControlY = 0;
}
else if (downVal == 14)
{
downControlX = 13;
downControlY = 0;
}
else if (downVal == 15)
{
downControlX = 0;
downControlY = 1;
}
else if (downVal == 16)
{
downControlX = 1;
downControlY = 1;
}
else if (downVal == 17)
{
downControlX = 2;
downControlY = 1;
}
else if (downVal == 18)
{
downControlX = 3;
downControlY = 1;
}
else if (downVal == 19)
{
downControlX = 4;
downControlY = 1;
}
else if (downVal == 20)
{
downControlX = 5;
downControlY = 1;
}
else if (downVal == 21)
{
downControlX = 6;
downControlY = 1;
}
else if (downVal == 22)
{
downControlX = 7;
downControlY = 1;
}
else if (downVal == 23)
{
downControlX = 8;
downControlY = 1;
}
else if (downVal == 24)
{
downControlX = 9;
downControlY = 1;
}
else if (downVal == 25)
{
downControlX = 10;
downControlY = 1;
}
else if (downVal == 26)
{
downControlX = 0;
downControlY = 2;
}
else if (downVal == 27)
{
downControlX = 1;
downControlY = 2;
}
else if (downVal == 28)
{
downControlX = 2;
downControlY = 2;
}
else if (downVal == 29)
{
downControlX = 3;
downControlY = 2;
}
else if (downVal == 30)
{
downControlX = 4;
downControlY = 2;
}
else if (downVal == 31)
{
downControlX = 5;
downControlY = 2;
}
else if (downVal == 32)
{
downControlX = 6;
downControlY = 2;
}
else if (downVal == 33)
{
downControlX = 7;
downControlY = 2;
}
else if (downVal == 34)
{
downControlX = 8;
downControlY = 2;
}
else if (downVal == 35)
{
downControlX = 9;
downControlY = 2;
}
else if (downVal == 36)
{
downControlX = 0;
downControlY = 3;
}
else if (downVal == 37)
{
downControlX = 1;
downControlY = 3;
}
else if (downVal == 38)
{
downControlX = 2;
downControlY = 3;
}
else if (downVal == 39)
{
downControlX = 0;
downControlY = 4;
}
else if (downVal == 40)
{
downControlX = 1;
downControlY = 4;
}
else if (downVal == 41)
{
downControlX = 2;
downControlY = 4;
}
else if (downVal == 42)
{
downControlX = 3;
downControlY = 4;
}
else if (downVal == 43)
{
downControlX = 4;
downControlY = 4;
}
else if (downVal == 44)
{
downControlX = 5;
downControlY = 4;
}
else if (downVal == 45)
{
downControlX = 6;
downControlY = 4;
}
else if (downVal == 46)
{
downControlX = 7;
downControlY = 4;
}
else if (downVal == 47)
{
downControlX = 8;
downControlY = 4;
}
else if (downVal == 48)
{
downControlX = 9;
downControlY = 4;
}
else if (downVal == 49)
{
downControlX = 0;
downControlY = 5;
}
else if (downVal == 50)
{
downControlX = 1;
downControlY = 5;
}
else if (downVal == 51)
{
downControlX = 2;
downControlY = 5;
}
else if (downVal == 52)
{
downControlX = 3;
downControlY = 5;
}
else
{
downVal = 52;
downControlX = 3;
downControlY = 5;
}
#endregion
if (jumpVal == clawVal || jumpVal == breathVal ||
jumpVal == confVal || jumpVal == swlVal || jumpVal == swrVal || jumpVal == leftVal
|| jumpVal == rightVal || jumpVal == upVal || jumpVal == downVal || clawVal ==
breathVal || clawVal == confVal || clawVal == swlVal || clawVal == swrVal || clawVal
== leftVal || clawVal == rightVal || clawVal == upVal || clawVal == downVal ||
breathVal == confVal || breathVal == swlVal || breathVal == swrVal || breathVal ==
leftVal || breathVal == rightVal || breathVal == upVal || breathVal == downVal ||
confVal == swlVal || confVal == swrVal || confVal == leftVal || confVal == rightVal
|| confVal == upVal || confVal == downVal || swlVal == swrVal || swlVal == leftVal
|| swlVal == rightVal || swlVal == upVal || swlVal == downVal || swrVal == leftVal
|| swrVal == rightVal || swrVal == upVal || swrVal == downVal || leftVal == rightVal
|| leftVal == upVal || leftVal == upVal || rightVal == upVal || rightVal == leftVal
|| upVal == downVal)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
confVal = 0;
confControlX = 13;
confControlY = 5;
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
upVal = 0;
upControlX = 13;
upControlY = 5;
downVal = 0;
downControlX = 13;
downControlY = 5;
controlType = 0;
}
checkControl = 1;
}
if (checkHealth == 0)
{
healthType = save.Data.saveHealthType;
if (healthType > 1 || healthType < 0)
{
healthType = 0;
}
checkHealth = 1;
}
checkVolume = save.Data.saveBGMNum;
if (checkVolume > 10 || checkVolume < 0)
{
checkVolume = 10;
}
if (checkVolume == 10)
{
volume = 1.0f;
}
if (checkVolume == 9)
{
volume = 0.9f;
}
if (checkVolume == 8)
{
volume = 0.8f;
}
if (checkVolume == 7)
{
volume = 0.7f;
}
if (checkVolume == 6)
{
volume = 0.6f;
}
if (checkVolume == 5)
{
volume = 0.5f;
}
if (checkVolume == 4)
{
volume = 0.4f;
}
if (checkVolume == 3)
{
volume = 0.3f;
}
if (checkVolume == 2)
{
volume = 0.2f;
}
if (checkVolume == 1)
{
volume = 0.1f;
}
if (checkVolume == 0)
{
volume = 0.0f;
}
checkSFX = save.Data.saveSFXNum;
if (checkSFX > 10 || checkSFX < 0)
{
checkSFX = 0;
}
if (checkSFX == 10)
{
sfxVolume = 1.0f;
}
if (checkSFX == 9)
{
sfxVolume = 0.9f;
}
if (checkSFX == 8)
{
sfxVolume = 0.8f;
}
if (checkSFX == 7)
{
sfxVolume = 0.7f;
}
if (checkSFX == 6)
{
sfxVolume = 0.6f;
}
if (checkSFX == 5)
{
sfxVolume = 0.5f;
}
if (checkSFX == 4)
{
sfxVolume = 0.4f;
}
if (checkSFX == 3)
{
sfxVolume = 0.3f;
}
if (checkSFX == 2)
{
sfxVolume = 0.2f;
}
if (checkSFX == 1)
{
sfxVolume = 0.1f;
}
if (checkSFX == 0)
{
sfxVolume = 0.0f;
}
}
#endregion
logoWait++;
if (logoWait < 360)
{
fadedIn = true;
}
if (logoWait > 360)
{
fadedIn = false;
}
if (logoWait > 420 && opacity == 0)
{
displayLogo = false;
displayTitle = true;
toTitleScreen = true;
}
}
if (displayTitle == true)
{
if (tempVolume > 0.0f && opacity >= 32)
{
playStageMusic.playBGM(volume, tempVolume, pauseVolume);
}
if (fadedIn == false && toTitleScreen == true)
{
fadedIn = true;
toTitleScreen = false;
}
titleTimer++;
if (titleTimer >= 16)
{
titleFrame++;
titleTimer = 0;
}
if (titleFrame > 3)
{
titleFrame = 0;
}
}
if (opacity >= 64 && displayTitle == true)
{
if (titleY < 0)
{
titleY++;
titleY++;
titleY++;
titleY++;
}
else if (titleY >= 0)
{
titleInPlace = true;
titleY = 0;
}
if (titleInPlace == true)
{
titleCT++;
if (titleCT >= 6 && titleFrameY < 3)
{
titleCT = 0;
titleFrameX++;
}
else if (titleCT >= 12)
{
titleCT = 0;
titleFrameX++;
}
if (titleFrameX >= 6)
{
titleFrameX = 0;
if (titleFrameY < 3)
{
titleFrameY++;
}
else if (titleFrameY >= 3)
{
if (titleFrameY == 3)
{
titleFrameY = 4;
}
else if (titleFrameY >= 4)
{
titleFrameY = 3;
}
}
}
}
}
if (opacity == 255 && titleFrameY > 2 && displayTitle == true)
{
titleExtraCT++;
if (titleExtraCT >= 75)
{
titleExtraCT = 0;
titleExtraFrame++;
if (titleExtraFrame > 3)
{
titleExtraFrame = 0;
}
}
#region keys up
if (kbState.IsKeyUp(Keys.Down) && kbState.IsKeyUp(Keys.S) &&
gpState.ThumbSticks.Left.Y > -0.5f)
{
lastKeyDown = false;
}
if (kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.W) &&
gpState.ThumbSticks.Left.Y < 0.5f)
{
lastKeyUp = false;
}
if (kbState.IsKeyUp(Keys.Left) && kbState.IsKeyUp(Keys.A) &&
gpState.ThumbSticks.Left.X > -0.5f)
{
lastKeyLeft = false;
}
if (kbState.IsKeyUp(Keys.Right) && kbState.IsKeyUp(Keys.D) &&
gpState.ThumbSticks.Left.X < 0.5f)
{
lastKeyRight = false;
}
if (kbState.IsKeyUp(Keys.Enter) && kbState.IsKeyUp(Keys.C) &&
kbState.IsKeyUp(Keys.E) && gpState.IsButtonUp(Buttons.A))
{
lastKeyC = false;
}
if (kbState.IsKeyUp(Keys.Escape) && kbState.IsKeyUp(Keys.X) &&
kbState.IsKeyUp(Keys.Space) && gpState.IsButtonUp(Buttons.B))
{
lastKeyX = false;
}
#endregion
#region regular menu
if (optionsLook == false && controlsLook == false)
{
if (pointerLoc == 0) //START
{
if ((kbState.IsKeyDown(Keys.Enter) || kbState.IsKeyDown
(Keys.C) || kbState.IsKeyDown(Keys.E) || gpState.IsButtonDown(Buttons.A)) && fadedIn
== true && lastKeyC == false)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
if (jumpVal == 0 || clawVal == 0 || breathVal == 0
|| confVal == 0 || swlVal == 0 || swrVal == 0 || leftVal == 0 || rightVal == 0 ||
upVal == 0 || downVal == 0)
{
controlType = 0;
}
if (jumpVal == 27 && clawVal == 26 && breathVal ==
15 && confVal == 28 && swlVal == 16 && swrVal == 17 && leftVal == 49 && rightVal ==
50 && upVal == 51 && downVal == 52)
{
controlType = 0;
}
//RESET ALL SETTINGS
#region reset
mapGridX = 5;
mapGridY = 1;
recallMapPosX = 870;
recallMapPosY = 285;
from4e1 = false;
from4e2 = false;
goldNow = 0;
goldAvailable = 0;
goldTotal = 0;
atkLevel = 0;
breathMaxBonus = 0;
breathDmgBonus = 0;
clawDmgBonus = 0;
breathCritBonus = 0;
breathCycleBonus = 0;
defLevel = 0;
drgnHPBonus = 0;
spikeDRBonus = 0;
drgnDRBonus = 0;
sptLevel = 0;
drgnFlyBonus = 0;
freezeTimeBonus = 0;
preserveGP = 0;
acidArmorRedBonus = 0;
EXPReducer = 1;
drgnHPXP = 0;
breathMaxXP = 0;
drgnFlyXP = 0;
clawXP = 0;
breathXP = 0;
drgnHPLV = 0;
breathMaxLV = 0;
drgnFlyLV = 0;
clawLV = 0;
breathLV = 0;
have01Hatchling = false;
drgnHPTreasure1 = 0;
have02Smile = false;
drgnHPTreasure2 = 0;
have03Crest = false;
drgnDRTreasure1 = 0;
have04Underpants = false;
drgnDRTreasure2 = 0;
have05Sollerets = false;
spikeDRTreasure = 0;
have06Scepter = false;
breathDmgTreasure1 = 0;
have07Momiji = false;
breathDmgTreasure2 = 0;
have08Ninjato = false;
breathMaxTreasure1 = 0;
have09Ring = false;
breathMaxTreasure2 = 0;
have10Sunset = false;
breathMaxTreasure3 = 0;
have11Dreihander = false;
clawDmgTreasure1 = 0;
have12Endeavour = false;
clawDmgTreasure2 = 0;
have13Doll = false;
clawSize = 0;
have14Liqueur = false;
acidArmorRedTreasure = 0;
have15Penultima = false;
breathCycleTreasure = 0;
have16Leaf = false;
drgnFlyTreasure1 = 0;
have17HTTYD = false;
drgnFlyTreasure2 = 0;
have18Gust = false;
drgnFlyTreasure3 = 0;
have19Shirt = false;
drgnFlyTreasure4 = 0;
have20Deduction = false;
freezeTreasure = 0;
have21Topaz = false;
have22Sapphire = false;
have23Garnet = false;
have24Ruby = false;
have25Diamond = false;
on1e2 = false;
on1e3 = false;
on1eB = false;
on2e1 = false;
on2e2 = false;
on2e3 = false;
on2eB = false;
on3e1 = false;
on3e2 = false;
on3e3 = false;
on3eB = false;
on4e1 = false;
on4e2 = false;
on4e3 = false;
on4e4 = false;
on4eB = false;
on5e1 = false;
on5e2 = false;
on5eB = false;
on6e1 = false;
on6eB = false;
on7eB = false;
seenStory1_2 = false;
seenStory1_B = false;
seenStory2_2 = false;
seenStory2_B = false;
seenStory3_B = false;
seenStory4_4 = false;
seenStory4_B = false;
seenStory5_B = false;
seenStory6_1 = false;
seenStory7_B = false;
haveBolt = false;
haveFrost = false;
haveAcid = false;
haveGanja = false;
boss1Clear = false;
boss1Clean = 0;
boss2Clear = false;
boss2Clean = 0;
boss3Clear = false;
boss3Clean = 0;
boss4Clear = false;
boss4Clean = 0;
boss5Clear = false;
boss5Clean = 0;
boss6Clear = false;
npcQuest = 0;
whistle1 = 0;
whistle2 = 0;
whistle3 = 0;
questHPBonus = 0;
#endregion
//END RESET ALL SETTINGS
fadedIn = false;
toStory = true;
story1 = true;
fadeWait = true;
lastKeyC = true;
save.Data.saveSavedOnce = true;
musicFade = true;
}
if ((((kbState.IsKeyDown(Keys.Down) ||
kbState.IsKeyDown(Keys.S)) && (kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.W)))
|| (gpState.ThumbSticks.Left.Y < -0.5f)) && lastKeyDown == false && fadedIn == true)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
pointerLoc++;
}
if ((((kbState.IsKeyDown(Keys.Up) || kbState.IsKeyDown
(Keys.W)) && (kbState.IsKeyUp(Keys.Down) && kbState.IsKeyUp(Keys.S))) ||
(gpState.ThumbSticks.Left.Y > 0.5f)) && lastKeyUp == false && fadedIn == true)
{
lastKeyUp = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
pointerLoc = 3;
}
}
if (pointerLoc == 1) //CONTINUE
{
if ((kbState.IsKeyDown(Keys.Enter) || kbState.IsKeyDown
(Keys.C) || kbState.IsKeyDown(Keys.E) || gpState.IsButtonDown(Buttons.A)) && fadedIn
== true && lastKeyC == false)
{
lastKeyC = true;
if (save.Data.saveSavedOnce == true)
{
//LOAD ALL SETTINGS
#region load
mapGridX = save.Data.saveMapGridX;
mapGridY = save.Data.saveMapGridY;
recallMapPosX = save.Data.saveMapPosX;
recallMapPosY = save.Data.saveMapPosY;
from4e1 = save.Data.savefrom4e1;
from4e2 = save.Data.savefrom4e2;
goldNow = save.Data.saveGoldNow;
goldAvailable = save.Data.saveGoldAvailable;
goldTotal = save.Data.saveGoldTotal;
if (save.Data.saveAtkLV < 0)
{
atkLevel = 0;
}
if (save.Data.saveAtkLV > 6)
{
atkLevel = 6;
}
if (save.Data.saveAtkLV >= 0 &&
save.Data.saveAtkLV <= 6)
{
atkLevel = save.Data.saveAtkLV;
}
if (atkLevel == 1)
{
breathMaxBonus = 60;
}
if (atkLevel == 2)
{
breathMaxBonus = 60;
breathDmgBonus = 1;
}
if (atkLevel == 3)
{
breathMaxBonus = 60;
breathDmgBonus = 1;
clawDmgBonus = 2;
}
if (atkLevel == 4)
{
breathMaxBonus = 120;
breathDmgBonus = 1;
clawDmgBonus = 2;
}
if (atkLevel == 5)
{
breathMaxBonus = 120;
breathDmgBonus = 1;
clawDmgBonus = 2;
breathCritBonus = 2;
}
if (atkLevel == 5)
{
breathMaxBonus = 120;
breathDmgBonus = 1;
clawDmgBonus = 2;
breathCritBonus = 2;
breathCycleBonus = 60;
}
if (save.Data.saveDefLV < 0)
{
defLevel = 0;
}
if (save.Data.saveDefLV > 6)
{
defLevel = 6;
}
if (save.Data.saveDefLV >= 0 &&
save.Data.saveDefLV <= 6)
{
defLevel = save.Data.saveDefLV;
}
if (defLevel == 1)
{
drgnHPBonus = 1;
}
if (defLevel == 2)
{
drgnHPBonus = 2;
}
if (defLevel == 3)
{
drgnHPBonus = 3;
}
if (defLevel == 4)
{
drgnHPBonus = 3;
spikeDRBonus = 2;
}
if (defLevel == 5)
{
drgnHPBonus = 4;
spikeDRBonus = 2;
}
if (defLevel == 6)
{
drgnHPBonus = 4;
spikeDRBonus = 2;
drgnDRBonus = 1;
}
if (save.Data.saveSprLV < 0)
{
sptLevel = 0;
}
if (save.Data.saveSprLV > 6)
{
sptLevel = 6;
}
if (save.Data.saveSprLV >= 0 &&
save.Data.saveSprLV <= 6)
{
sptLevel = save.Data.saveSprLV;
}
if (sptLevel == 1)
{
drgnFlyBonus = 30;
}
if (sptLevel == 2)
{
drgnFlyBonus = 60;
}
if (sptLevel == 3)
{
drgnFlyBonus = 60;
freezeTimeBonus = 60;
}
if (sptLevel == 4)
{
drgnFlyBonus = 60;
freezeTimeBonus = 60;
preserveGP = 1;
}
if (sptLevel == 5)
{
drgnFlyBonus = 60;
freezeTimeBonus = 60;
preserveGP = 1;
acidArmorRedBonus = 1;
}
if (sptLevel == 6)
{
drgnFlyBonus = 60;
freezeTimeBonus = 60;
preserveGP = 1;
acidArmorRedBonus = 1;
EXPReducer = 2;
}
drgnHPXP = save.Data.saveHPXP;
breathMaxXP = save.Data.saveBreathMaxXP;
drgnFlyXP = save.Data.saveFlyXP;
clawXP = save.Data.saveClawXP;
breathXP = save.Data.saveBreathDmgXP;
drgnHPLV = save.Data.saveHPLV;
breathMaxLV = save.Data.saveBreathMaxLV;
drgnFlyLV = save.Data.saveFlyLV;
clawLV = save.Data.saveClawLV;
breathLV = save.Data.saveBreathDmgLV;
have01Hatchling = save.Data.saveHatchling;
if (save.Data.saveHatchling == true)
{
drgnHPTreasure1 = 1;
}
have02Smile = save.Data.saveSmile;
if (save.Data.saveSmile == true)
{
drgnHPTreasure2 = 1;
}
have03Crest = save.Data.saveCrest;
if (save.Data.saveCrest == true)
{
drgnDRTreasure1 = 1;
}
have04Underpants = save.Data.saveUnderpants;
if (save.Data.saveUnderpants == true)
{
drgnDRTreasure2 = 1;
}
have05Sollerets = save.Data.saveSollerets;
if (save.Data.saveSollerets == true)
{
spikeDRTreasure = 2;
}
have06Scepter = save.Data.saveScepter;
if (save.Data.saveScepter == true)
{
breathDmgTreasure1 = 1;
}
have07Momiji = save.Data.saveMomiji;
if (save.Data.saveMomiji == true)
{
breathDmgTreasure2 = 1;
}
have08Ninjato = save.Data.saveNinjato;
if (save.Data.saveNinjato == true)
{
breathMaxTreasure1 = 60;
}
have09Ring = save.Data.saveRing;
if (save.Data.saveRing == true)
{
breathMaxTreasure2 = 60;
}
have10Sunset = save.Data.saveSunset;
if (save.Data.saveSunset == true)
{
breathMaxTreasure3 = 60;
}
have11Dreihander = save.Data.saveDreihander;
if (save.Data.saveDreihander == true)
{
clawDmgTreasure1 = 2;
}
have12Endeavour = save.Data.saveEndeavour;
if (save.Data.saveEndeavour == true)
{
clawDmgTreasure2 = 2;
}
have13Doll = save.Data.saveDoll;
if (save.Data.saveDoll == true)
{
clawSize = 1;
}
have14Liqueur = save.Data.saveLiqueur;
if (save.Data.saveLiqueur == true)
{
acidArmorRedTreasure = 1;
}
have15Penultima = save.Data.savePenultima;
if (save.Data.savePenultima == true)
{
breathCycleTreasure = 1;
}
have16Leaf = save.Data.saveLeaf;
if (save.Data.saveLeaf == true)
{
drgnFlyTreasure1 = 30;
}
have17HTTYD = save.Data.saveHTTYD;
if (save.Data.saveHTTYD == true)
{
drgnFlyTreasure2 = 30;
}
have18Gust = save.Data.saveGust;
if (save.Data.saveGust == true)
{
drgnFlyTreasure3 = 30;
}
have19Shirt = save.Data.saveShirt;
if (save.Data.saveShirt == true)
{
drgnFlyTreasure4 = 30;
}
have20Deduction = save.Data.saveDeduction;
if (save.Data.saveDeduction == true)
{
freezeTreasure = 2;
}
have21Topaz = save.Data.saveTopaz;
have22Sapphire = save.Data.saveSapphire;
have23Garnet = save.Data.saveGarnet;
have24Ruby = save.Data.saveRuby;
have25Diamond = save.Data.saveDiamond;
on1e2 = save.Data.saves1e2On;
on1e3 = save.Data.saves1e3On;
on1eB = save.Data.saves1ebOn;
on2e1 = save.Data.saves2e1On;
on2e2 = save.Data.saves2e2On;
on2e3 = save.Data.saves2e3On;
on2eB = save.Data.saves2ebOn;
on3e1 = save.Data.saves3e1On;
on3e2 = save.Data.saves3e2On;
on3e3 = save.Data.saves3e3On;
on3eB = save.Data.saves3ebOn;
on4e1 = save.Data.saves4e1On;
on4e2 = save.Data.saves4e2On;
on4e3 = save.Data.saves4e3On;
on4e4 = save.Data.saves4e4On;
on4eB = save.Data.saves4ebOn;
on5e1 = save.Data.saves5e1On;
on5e2 = save.Data.saves5e2On;
on5eB = save.Data.saves5ebOn;
on6e1 = save.Data.saves6e1On;
on6eB = save.Data.saves6eBOn;
on7eB = save.Data.saves7eBOn;
seenStory1_2 = save.Data.saves1e2Seen;
seenStory1_B = save.Data.saves1eBSeen;
seenStory2_2 = save.Data.saves2e2Seen;
seenStory2_B = save.Data.saves2eBSeen;
seenStory3_B = save.Data.saves3eBSeen;
seenStory4_4 = save.Data.saves4e4Seen;
seenStory4_B = save.Data.saves4eBSeen;
seenStory5_B = save.Data.saves5eBSeen;
seenStory6_1 = save.Data.saves6e1Seen;
seenStory7_B = save.Data.saves7eBSeen;
haveBolt = save.Data.savehaveBolt;
haveFrost = save.Data.savehaveCold;
haveAcid = save.Data.savehaveAcid;
haveGanja = save.Data.savehaveHerb;
boss1Clear = save.Data.saveboss1Clear;
if (save.Data.saveboss1Clear == true)
{
boss1Clean = 1;
}
boss2Clear = save.Data.saveboss2Clear;
if (save.Data.saveboss2Clear == true)
{
boss2Clean = 1;
}
boss3Clear = save.Data.saveboss3Clear;
if (save.Data.saveboss3Clear == true)
{
boss3Clean = 1;
}
boss4Clear = save.Data.saveboss4Clear;
if (save.Data.saveboss4Clear == true)
{
boss4Clean = 1;
}
boss5Clear = save.Data.saveboss5Clear;
if (save.Data.saveboss5Clear == true)
{
boss5Clean = 1;
}
boss6Clear = save.Data.saveboss6Clear;
if (save.Data.saveQuest == 1 ||
save.Data.saveQuest == 2 || save.Data.saveQuest == 3)
{
npcQuest = save.Data.saveQuest;
}
else
{
npcQuest = 0;
}
whistle1 = save.Data.saveWhistle1;
if (whistle1 < 0)
{
whistle1 = 0;
}
if (whistle1 > 1)
{
whistle1 = 1;
}
whistle2 = save.Data.saveWhistle2;
if (whistle2 < 0)
{
whistle2 = 0;
}
if (whistle2 > 1)
{
whistle2 = 1;
}
whistle3 = save.Data.saveWhistle3;
if (whistle3 < 0)
{
whistle3 = 0;
}
if (whistle3 > 1)
{
whistle3 = 1;
}
boss1NoDmg = save.Data.boss1Clean;
boss2NoDmg = save.Data.boss2Clean;
boss3NoDmg = save.Data.boss3Clean;
boss4NoDmg = save.Data.boss4Clean;
boss5NoDmg = save.Data.boss5Clean;
if (npcQuest >= 3)
{
questHPBonus = 1;
}
#endregion
//END LOAD ALL SETTINGS
if (jumpVal == 0 || clawVal == 0 || breathVal ==
0 || confVal == 0 || swlVal == 0 || swrVal == 0 || leftVal == 0 || rightVal == 0 ||
upVal == 0 || downVal == 0)
{
controlType = 0;
}
if (jumpVal == 27 && clawVal == 26 && breathVal
== 15 && confVal == 28 && swlVal == 16 && swrVal == 17 && leftVal == 49 && rightVal
== 50 && upVal == 51 && downVal == 52)
{
controlType = 0;
}
if (menuYesPlay == false)
{
menuYesPlay = true;
}
musicFade = true;
toWorldMap = true;
fadedIn = false;
fadeWait = true;
}
else
{
if (menuNoPlay == false)
{
menuNoPlay = true;
}
}
}
if ((((kbState.IsKeyDown(Keys.Down) ||
kbState.IsKeyDown(Keys.S)) && (kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.W)))
|| (gpState.ThumbSticks.Left.Y < -0.5f)) && lastKeyDown == false && fadedIn == true)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
pointerLoc++;
}
if ((((kbState.IsKeyDown(Keys.Up) || kbState.IsKeyDown
(Keys.W)) && (kbState.IsKeyUp(Keys.Down) && kbState.IsKeyUp(Keys.S))) ||
(gpState.ThumbSticks.Left.Y > 0.5f)) && lastKeyUp == false && fadedIn == true)
{
lastKeyUp = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
pointerLoc--;
}
}
if (pointerLoc == 2) //OPTIONS
{
if ((kbState.IsKeyDown(Keys.Enter) || kbState.IsKeyDown
(Keys.C) || kbState.IsKeyDown(Keys.E) || gpState.IsButtonDown(Buttons.A)) && fadedIn
== true && lastKeyC == false)
{
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
optionsLook = true;
optionsPointerLoc = 0;
optionsPointerX = 550;
optionsPointerY = 285;
saveRes = resNow;
titleExtraCT = 0;
titleExtraFrame = 0;
fontTypeOn = false;
}
if ((((kbState.IsKeyDown(Keys.Down) ||
kbState.IsKeyDown(Keys.S)) && (kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.W)))
|| (gpState.ThumbSticks.Left.Y < -0.5f)) && lastKeyDown == false && fadedIn == true)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
pointerLoc++;
}
if ((((kbState.IsKeyDown(Keys.Up) || kbState.IsKeyDown
(Keys.W)) && (kbState.IsKeyUp(Keys.Down) && kbState.IsKeyUp(Keys.S))) ||
(gpState.ThumbSticks.Left.Y > 0.5f)) && lastKeyUp == false && fadedIn == true)
{
lastKeyUp = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
pointerLoc--;
}
}
if (pointerLoc == 3) //EXIT
{
if ((kbState.IsKeyDown(Keys.Enter) || kbState.IsKeyDown
(Keys.C) || kbState.IsKeyDown(Keys.E) || gpState.IsButtonDown(Buttons.A)) && fadedIn
== true && lastKeyC == false)
{
SteamAPI.Shutdown();
this.Exit();
lastKeyC = true;
}
if ((((kbState.IsKeyDown(Keys.Down) ||
kbState.IsKeyDown(Keys.S)) && (kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.W)))
|| (gpState.ThumbSticks.Left.Y < -0.5f)) && lastKeyDown == false && fadedIn == true)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
pointerLoc = 0;
}
if ((((kbState.IsKeyDown(Keys.Up) || kbState.IsKeyDown
(Keys.W)) && (kbState.IsKeyUp(Keys.Down) && kbState.IsKeyUp(Keys.S))) ||
(gpState.ThumbSticks.Left.Y > 0.5f)) && lastKeyUp == false && fadedIn == true)
{
lastKeyUp = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
pointerLoc--;
}
}
}
#endregion
#region options menu
if (optionsLook == true)
{
if (controlsLook == false)
{
if (lastKeyX == false && (kbState.IsKeyDown(Keys.Escape)
|| kbState.IsKeyDown(Keys.Space) || kbState.IsKeyDown(Keys.X) ||
gpState.IsButtonDown(Buttons.B)))
{
lastKeyX = true;
if (menuNoPlay == false)
{
menuNoPlay = true;
}
save.Data.saveLanguageType = languageType;
save.Data.saveControlType = controlType;
save.Data.saveHealthType = healthType;
save.Data.saveBGMNum = checkVolume;
save.Data.saveSFXNum = checkSFX;
save.Data.resSetting = resNow;
save.Data.fontType = fontSetting;
save.Data.saveJump = jumpVal;
save.Data.saveClaw = clawVal;
save.Data.saveBreath = breathVal;
save.Data.saveConf = confVal;
save.Data.saveSwl = swlVal;
save.Data.saveSwr = swrVal;
save.Data.saveLeft = leftVal;
save.Data.saveRight = rightVal;
save.Data.saveUp = upVal;
save.Data.saveDown = downVal;
save.Save();
optionsLook = false;
}
#region toggle u/d
if (controlsLook == false)
{
if (lastKeyDown == false && (((kbState.IsKeyDown
(Keys.Down) || kbState.IsKeyDown(Keys.S)) && (kbState.IsKeyUp(Keys.Up) &&
kbState.IsKeyUp(Keys.W))) || (gpState.ThumbSticks.Left.Y < -0.5f)))
{
lastKeyDown = true;
optionsPointerLoc++;
if (optionsPointerLoc >= 6)
{
optionsPointerLoc = 0;
}
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
titleExtraCT = 0;
titleExtraFrame = 0;
}
if (lastKeyUp == false && (((kbState.IsKeyDown
(Keys.Up) || kbState.IsKeyDown(Keys.W)) && (kbState.IsKeyUp(Keys.Down) &&
kbState.IsKeyUp(Keys.S))) || gpState.ThumbSticks.Left.Y > 0.5f))
{
lastKeyUp = true;
optionsPointerLoc--;
if (optionsPointerLoc < 0)
{
optionsPointerLoc = 5;
}
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
titleExtraCT = 0;
titleExtraFrame = 0;
}
}
#endregion
#region language
if (optionsPointerLoc == 0)
{
if (fontTypeOn == false)
{
if (lastKeyLeft == false &&
(((kbState.IsKeyDown(Keys.Left) || kbState.IsKeyDown(Keys.A)) && (kbState.IsKeyUp
(Keys.Right) && kbState.IsKeyUp(Keys.D))) || gpState.ThumbSticks.Left.X < -0.5f))
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
languageType--;
if (languageType < 0)
{
if (bonusOn == false)
{
languageType = 2;
}
else
{
languageType = 4;
}
}
if (languageType == 3)
{
languageType = 2;
}
}
if (lastKeyRight == false &&
(((kbState.IsKeyDown(Keys.Right) || kbState.IsKeyDown(Keys.D)) && (kbState.IsKeyUp
(Keys.Left) && kbState.IsKeyUp(Keys.A))) || gpState.ThumbSticks.Left.X > 0.5f))
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
languageType++;
if (bonusOn == false)
{
if (languageType > 2)
{
if (bonusOn == false)
{
languageType = 0;
}
else
{
languageType = 4;
}
}
}
else
{
if (languageType == 3)
{
languageType = 4;
}
if (languageType > 4)
{
languageType = 0;
}
}
}
if ((kbState.IsKeyDown(Keys.Enter) ||
kbState.IsKeyDown(Keys.C) || kbState.IsKeyDown(Keys.E) || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
if (languageType != 2)
{
fontTypeOn = true;
}
}
}
if (fontTypeOn == true)
{
if (lastKeyLeft == false &&
(((kbState.IsKeyDown(Keys.Left) || kbState.IsKeyDown(Keys.A)) && (kbState.IsKeyUp
(Keys.Right) && kbState.IsKeyUp(Keys.D))) || gpState.ThumbSticks.Left.X < -0.5f))
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
fontSetting--;
if (fontSetting < 0)
{
fontSetting = 1;
}
}
if (lastKeyRight == false &&
(((kbState.IsKeyDown(Keys.Right) || kbState.IsKeyDown(Keys.D)) && (kbState.IsKeyUp
(Keys.Left) && kbState.IsKeyUp(Keys.A))) || gpState.ThumbSticks.Left.X > 0.5f))
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
fontSetting++;
if (fontSetting > 1)
{
fontSetting = 0;
}
}
if ((kbState.IsKeyDown(Keys.Enter) ||
kbState.IsKeyDown(Keys.C) || kbState.IsKeyDown(Keys.E) || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
fontTypeOn = false;
}
}
}
#endregion
#region controls
if (optionsPointerLoc == 1)
{
if (lastKeyLeft == false && (((kbState.IsKeyDown
(Keys.Left) || kbState.IsKeyDown(Keys.A)) && (kbState.IsKeyUp(Keys.Right) &&
kbState.IsKeyUp(Keys.D))) || gpState.ThumbSticks.Left.X < -0.5f))
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
controlType--;
if (controlType < 0)
{
controlType = 1;
}
titleExtraCT = 0;
titleExtraFrame = 0;
}
if (lastKeyRight == false && (((kbState.IsKeyDown
(Keys.Right) || kbState.IsKeyDown(Keys.D)) && (kbState.IsKeyUp(Keys.Left) &&
kbState.IsKeyUp(Keys.A))) || gpState.ThumbSticks.Left.X > 0.5f))
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
controlType++;
if (controlType > 1)
{
controlType = 0;
}
titleExtraCT = 0;
titleExtraFrame = 0;
}
if (lastKeyC == false && controlType == 1 &&
(kbState.IsKeyDown(Keys.Enter) || kbState.IsKeyDown(Keys.C) || kbState.IsKeyDown
(Keys.E) || gpState.IsButtonDown(Buttons.A)))
{
lastKeyC = true;
controlsLook = true;
controlsMenuPos = 0;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
}
}
#endregion
#region health
if (optionsPointerLoc == 2)
{
if (lastKeyLeft == false && (((kbState.IsKeyDown
(Keys.Left) || kbState.IsKeyDown(Keys.A)) && (kbState.IsKeyUp(Keys.Right) &&
kbState.IsKeyUp(Keys.D))) || gpState.ThumbSticks.Left.X < -0.5f))
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
healthType--;
if (healthType < 0)
{
healthType = 1;
}
}
if (lastKeyRight == false && (((kbState.IsKeyDown
(Keys.Right) || kbState.IsKeyDown(Keys.D)) && (kbState.IsKeyUp(Keys.Left) &&
kbState.IsKeyUp(Keys.A))) || gpState.ThumbSticks.Left.X > 0.5f))
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
healthType++;
if (healthType > 1)
{
healthType = 0;
}
}
}
#endregion
#region BGM Volume
if (optionsPointerLoc == 3)
{
if (lastKeyLeft == false && (((kbState.IsKeyDown
(Keys.Left) || kbState.IsKeyDown(Keys.A)) && (kbState.IsKeyUp(Keys.Right) &&
kbState.IsKeyUp(Keys.D))) || gpState.ThumbSticks.Left.X < -0.5f))
{
lastKeyLeft = true;
if (checkVolume > 0)
{
checkVolume--;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
}
else if (checkVolume <= 0)
{
checkVolume = 0;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
}
if (checkVolume == 10)
{
volume = 1.0f;
}
if (checkVolume == 9)
{
volume = 0.9f;
}
if (checkVolume == 8)
{
volume = 0.8f;
}
if (checkVolume == 7)
{
volume = 0.7f;
}
if (checkVolume == 6)
{
volume = 0.6f;
}
if (checkVolume == 5)
{
volume = 0.5f;
}
if (checkVolume == 4)
{
volume = 0.4f;
}
if (checkVolume == 3)
{
volume = 0.3f;
}
if (checkVolume == 2)
{
volume = 0.2f;
}
if (checkVolume == 1)
{
volume = 0.1f;
}
if (checkVolume == 0)
{
volume = 0.0f;
}
}
if (lastKeyRight == false && (((kbState.IsKeyDown
(Keys.Right) || kbState.IsKeyDown(Keys.D)) && (kbState.IsKeyUp(Keys.Left) &&
kbState.IsKeyUp(Keys.A))) || gpState.ThumbSticks.Left.X > 0.5f))
{
lastKeyRight = true;
if (checkVolume < 10)
{
checkVolume++;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
}
else if (checkVolume >= 10)
{
checkVolume = 10;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
}
if (checkVolume == 10)
{
volume = 1.0f;
}
if (checkVolume == 9)
{
volume = 0.9f;
}
if (checkVolume == 8)
{
volume = 0.8f;
}
if (checkVolume == 7)
{
volume = 0.7f;
}
if (checkVolume == 6)
{
volume = 0.6f;
}
if (checkVolume == 5)
{
volume = 0.5f;
}
if (checkVolume == 4)
{
volume = 0.4f;
}
if (checkVolume == 3)
{
volume = 0.3f;
}
if (checkVolume == 2)
{
volume = 0.2f;
}
if (checkVolume == 1)
{
volume = 0.1f;
}
if (checkVolume == 0)
{
volume = 0.0f;
}
}
}
#endregion
#region SFX Volume
if (optionsPointerLoc == 4)
{
if (lastKeyLeft == false && (((kbState.IsKeyDown
(Keys.Left) || kbState.IsKeyDown(Keys.A)) && (kbState.IsKeyUp(Keys.Right) &&
kbState.IsKeyUp(Keys.D))) || gpState.ThumbSticks.Left.X < -0.5f))
{
lastKeyLeft = true;
if (checkSFX > 0)
{
checkSFX--;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
}
else if (checkSFX <= 0)
{
checkSFX = 0;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
}
if (checkSFX == 10)
{
sfxVolume = 1.0f;
}
if (checkSFX == 9)
{
sfxVolume = 0.9f;
}
if (checkSFX == 8)
{
sfxVolume = 0.8f;
}
if (checkSFX == 7)
{
sfxVolume = 0.7f;
}
if (checkSFX == 6)
{
sfxVolume = 0.6f;
}
if (checkSFX == 5)
{
sfxVolume = 0.5f;
}
if (checkSFX == 4)
{
sfxVolume = 0.4f;
}
if (checkSFX == 3)
{
sfxVolume = 0.3f;
}
if (checkSFX == 2)
{
sfxVolume = 0.2f;
}
if (checkSFX == 1)
{
sfxVolume = 0.1f;
}
if (checkSFX == 0)
{
sfxVolume = 0.0f;
}
}
if (lastKeyRight == false && (((kbState.IsKeyDown
(Keys.Right) || kbState.IsKeyDown(Keys.D)) && (kbState.IsKeyUp(Keys.Left) &&
kbState.IsKeyUp(Keys.A))) || gpState.ThumbSticks.Left.X > 0.5f))
{
lastKeyRight = true;
if (checkSFX < 10)
{
checkSFX++;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
}
else if (checkSFX >= 10)
{
checkSFX = 10;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
}
if (checkSFX == 10)
{
sfxVolume = 1.0f;
}
if (checkSFX == 9)
{
sfxVolume = 0.9f;
}
if (checkSFX == 8)
{
sfxVolume = 0.8f;
}
if (checkSFX == 7)
{
sfxVolume = 0.7f;
}
if (checkSFX == 6)
{
sfxVolume = 0.6f;
}
if (checkSFX == 5)
{
sfxVolume = 0.5f;
}
if (checkSFX == 4)
{
sfxVolume = 0.4f;
}
if (checkSFX == 3)
{
sfxVolume = 0.3f;
}
if (checkSFX == 2)
{
sfxVolume = 0.2f;
}
if (checkSFX == 1)
{
sfxVolume = 0.1f;
}
if (checkSFX == 0)
{
sfxVolume = 0.0f;
}
}
}
#endregion
#region Resolution
if (optionsPointerLoc == 5)
{
if (lastKeyLeft == false && (((kbState.IsKeyDown
(Keys.Left) || kbState.IsKeyDown(Keys.A)) && (kbState.IsKeyUp(Keys.Right) &&
kbState.IsKeyUp(Keys.D))) || gpState.ThumbSticks.Left.X < -0.5f))
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
saveRes--;
if (saveRes < 0)
{
saveRes = 3;
}
titleExtraCT = 0;
titleExtraFrame = 0;
}
if (lastKeyRight == false && (((kbState.IsKeyDown
(Keys.Right) || kbState.IsKeyDown(Keys.D)) && (kbState.IsKeyUp(Keys.Left) &&
kbState.IsKeyUp(Keys.A))) || gpState.ThumbSticks.Left.X > 0.5f))
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
saveRes++;
if (saveRes > 3)
{
saveRes = 0;
}
titleExtraCT = 0;
titleExtraFrame = 0;
}
if (lastKeyC == false && resNow != saveRes &&
(kbState.IsKeyDown(Keys.Enter) || kbState.IsKeyDown(Keys.C) || kbState.IsKeyDown
(Keys.E) || gpState.IsButtonDown(Buttons.A)))
{
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
if (saveRes == 0)
{
Resolution.SetVirtualResolution(1280, 800);
Resolution.SetResolution(1280, 800, false);
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 800;
resMod = 0;
resNow = 0;
}
else if (saveRes == 1)
{
Resolution.SetVirtualResolution(1280, 720);
Resolution.SetResolution(1280, 720, false);
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
resMod = 40;
resNow = 1;
}
else if (saveRes == 2)
{
Resolution.SetVirtualResolution(1280, 800);
Resolution.SetResolution(1280, 800, true);
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 800;
resMod = 0;
resNow = 2;
}
else if (saveRes == 3)
{
Resolution.SetVirtualResolution(1280, 720);
Resolution.SetResolution(1280, 720, true);
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
resMod = 40;
resNow = 3;
}
graphics.ApplyChanges();
}
}
#endregion
}
}
#endregion
#region controls menu
if (controlsLook == true)
{
#region toggle u/d
if (jumpAssign == false && breathAssign == false &&
clawAssign == false && confAssign == false && swlAssign == false && swrAssign ==
false && upAssign == false && downAssign == false && leftAssign == false &&
rightAssign == false)
{
if (lastKeyDown == false && (((kbState.IsKeyDown
(Keys.Down) || kbState.IsKeyDown(Keys.S)) && (kbState.IsKeyUp(Keys.Up) &&
kbState.IsKeyUp(Keys.W))) || gpState.ThumbSticks.Left.Y < -0.5f))
{
lastKeyDown = true;
controlsMenuPos++;
if (controlsMenuPos >= 10)
{
controlsMenuPos = 0;
}
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
}
if (lastKeyUp == false && (((kbState.IsKeyDown(Keys.Up)
|| kbState.IsKeyDown(Keys.W)) && (kbState.IsKeyUp(Keys.Down) && kbState.IsKeyUp
(Keys.S))) || gpState.ThumbSticks.Left.Y > 0.5f))
{
lastKeyUp = true;
controlsMenuPos--;
if (controlsMenuPos < 0)
{
controlsMenuPos = 9;
}
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
}
}
#endregion
#region cancel
if (lastKeyX == false && jumpAssign == false && breathAssign
== false && clawAssign == false && confAssign == false && swlAssign == false &&
swrAssign == false && upAssign == false && downAssign == false && leftAssign ==
false && rightAssign == false && (kbState.IsKeyDown(Keys.Escape) ||
kbState.IsKeyDown(Keys.Space) || kbState.IsKeyDown(Keys.X) || gpState.IsButtonDown
(Buttons.B)))
{
lastKeyX = true;
if (menuNoPlay == false)
{
menuNoPlay = true;
}
if (jumpAssign == true || breathAssign == true ||
clawAssign == true || confAssign == true || swlAssign == true || swrAssign == true
|| upAssign == true || downAssign == true || leftAssign == true || rightAssign ==
true)
{
jumpAssign = false;
breathAssign = false;
clawAssign = false;
confAssign = false;
swlAssign = false;
swrAssign = false;
upAssign = false;
downAssign = false;
leftAssign = false;
rightAssign = false;
}
else if (jumpAssign == false && breathAssign == false &&
clawAssign == false && confAssign == false && swlAssign == false && swrAssign ==
false && upAssign == false && downAssign == false && leftAssign == false &&
rightAssign == false)
{
controlsLook = false;
optionsPointerLoc = 1;
if (jumpVal == 0 || breathVal == 0 || clawVal == 0
|| confVal == 0 || swlVal == 0 || swrVal == 0 || upVal == 0 || downVal == 0 ||
rightVal == 0 || leftVal == 0)
{
controlType = 0;
}
}
}
#endregion
#region assign turn on
if (lastKeyC == false && jumpAssign == false && breathAssign
== false && clawAssign == false && confAssign == false && swlAssign == false &&
swrAssign == false && upAssign == false && downAssign == false && leftAssign ==
false && rightAssign == false && (kbState.IsKeyDown(Keys.Enter) ||
kbState.IsKeyDown(Keys.C) || kbState.IsKeyDown(Keys.E) || gpState.IsButtonDown
(Buttons.A)))
{
lastKeyC = true;
if (controlsMenuPos == 0)
{
jumpAssign = true;
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (controlsMenuPos == 1)
{
clawAssign = true;
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (controlsMenuPos == 2)
{
breathAssign = true;
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (controlsMenuPos == 3)
{
confAssign = true;
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (controlsMenuPos == 4)
{
swlAssign = true;
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (controlsMenuPos == 5)
{
swrAssign = true;
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (controlsMenuPos == 6)
{
leftAssign = true;
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (controlsMenuPos == 7)
{
rightAssign = true;
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (controlsMenuPos == 8)
{
upAssign = true;
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (controlsMenuPos == 9)
{
downAssign = true;
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region assign
#region assign jump
if (jumpAssign == true)
{
#region row 1
#region Tab
if (kbState.IsKeyDown(Keys.Tab))
{
jumpAssign = false;
jumpVal = 1;
jumpControlX = 0;
jumpControlY = 0;
if (clawVal == 1)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 1)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 1)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 1)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 1)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 1)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 1)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 1)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 1)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Q
if (kbState.IsKeyDown(Keys.Q))
{
jumpAssign = false;
jumpVal = 2;
jumpControlX = 1;
jumpControlY = 0;
if (clawVal == 2)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 2)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 2)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 2)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 2)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 2)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 2)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 2)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 2)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region W
if (kbState.IsKeyDown(Keys.W))
{
lastKeyUp = true;
jumpAssign = false;
jumpVal = 3;
jumpControlX = 2;
jumpControlY = 0;
if (clawVal == 3)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 3)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 3)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 3)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 3)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 3)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 3)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 3)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 3)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region E
if (kbState.IsKeyDown(Keys.E) && lastKeyC == false)
{
lastKeyC = true;
jumpAssign = false;
jumpVal = 4;
jumpControlX = 3;
jumpControlY = 0;
if (clawVal == 4)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 4)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 4)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 4)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 4)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 4)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 4)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 4)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 4)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region R
if (kbState.IsKeyDown(Keys.R))
{
jumpAssign = false;
jumpVal = 5;
jumpControlX = 4;
jumpControlY = 0;
if (clawVal == 5)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 5)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 5)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 5)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 5)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 5)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 5)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 5)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 5)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region T
if (kbState.IsKeyDown(Keys.T))
{
jumpAssign = false;
jumpVal = 6;
jumpControlX = 5;
jumpControlY = 0;
if (clawVal == 6)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 6)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 6)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 6)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 6)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 6)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 6)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 6)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 6)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Y
if (kbState.IsKeyDown(Keys.Y))
{
jumpAssign = false;
jumpVal = 7;
jumpControlX = 6;
jumpControlY = 0;
if (clawVal == 7)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 7)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 7)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 7)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 7)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 7)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 7)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 7)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 7)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region U
if (kbState.IsKeyDown(Keys.U))
{
jumpAssign = false;
jumpVal = 8;
jumpControlX = 7;
jumpControlY = 0;
if (clawVal == 8)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 8)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 8)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 8)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 8)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 8)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 8)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 8)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 8)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region I
if (kbState.IsKeyDown(Keys.I))
{
jumpAssign = false;
jumpVal = 9;
jumpControlX = 8;
jumpControlY = 0;
if (clawVal == 9)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 9)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 9)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 9)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 9)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 9)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 9)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 9)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 9)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region O
if (kbState.IsKeyDown(Keys.O))
{
jumpAssign = false;
jumpVal = 10;
jumpControlX = 9;
jumpControlY = 0;
if (clawVal == 10)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 10)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 10)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 10)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 10)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 10)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 10)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 10)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 10)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region P
if (kbState.IsKeyDown(Keys.P))
{
jumpAssign = false;
jumpVal = 11;
jumpControlX = 10;
jumpControlY = 0;
if (clawVal == 11)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 11)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 11)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 11)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 11)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 11)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 11)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 11)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 11)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region [
if (kbState.IsKeyDown(Keys.OemOpenBrackets))
{
jumpAssign = false;
jumpVal = 12;
jumpControlX = 11;
jumpControlY = 0;
if (clawVal == 12)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 12)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 12)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 12)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 12)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 12)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 12)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 12)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 12)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ]
if (kbState.IsKeyDown(Keys.OemCloseBrackets))
{
jumpAssign = false;
jumpVal = 13;
jumpControlX = 12;
jumpControlY = 0;
if (clawVal == 13)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 13)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 13)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 13)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 13)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 13)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 13)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 13)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 13)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region \
if (kbState.IsKeyDown(Keys.OemBackslash))
{
jumpAssign = false;
jumpVal = 14;
jumpControlX = 13;
jumpControlY = 0;
if (clawVal == 14)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 14)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 14)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 14)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 14)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 14)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 14)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 14)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 14)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 2
#region A
if (kbState.IsKeyDown(Keys.A))
{
lastKeyLeft = true;
jumpAssign = false;
jumpVal = 15;
jumpControlX = 0;
jumpControlY = 1;
if (clawVal == 15)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 15)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 15)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 15)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 15)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 15)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 15)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 15)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 15)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region S
if (kbState.IsKeyDown(Keys.S))
{
lastKeyDown = true;
jumpAssign = false;
jumpVal = 16;
jumpControlX = 1;
jumpControlY = 1;
if (clawVal == 16)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 16)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 16)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 16)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 16)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 16)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 16)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 16)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 16)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region D
if (kbState.IsKeyDown(Keys.D))
{
lastKeyRight = true;
jumpAssign = false;
jumpVal = 17;
jumpControlX = 2;
jumpControlY = 1;
if (clawVal == 17)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 17)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 17)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 17)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 17)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 17)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 17)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 17)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 17)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region F
if (kbState.IsKeyDown(Keys.F))
{
jumpAssign = false;
jumpVal = 18;
jumpControlX = 3;
jumpControlY = 1;
if (clawVal == 18)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 18)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 18)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 18)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 18)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 18)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 18)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 18)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 18)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region G
if (kbState.IsKeyDown(Keys.G))
{
jumpAssign = false;
jumpVal = 19;
jumpControlX = 4;
jumpControlY = 1;
if (clawVal == 19)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 19)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 19)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 19)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 19)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 19)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 19)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 19)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 19)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region H
if (kbState.IsKeyDown(Keys.H))
{
jumpAssign = false;
jumpVal = 20;
jumpControlX = 5;
jumpControlY = 1;
if (clawVal == 20)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 20)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 20)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 20)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 20)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 20)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 20)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 20)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 20)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region J
if (kbState.IsKeyDown(Keys.J))
{
jumpAssign = false;
jumpVal = 21;
jumpControlX = 6;
jumpControlY = 1;
if (clawVal == 21)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 21)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 21)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 21)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 21)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 21)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 21)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 21)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 21)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region K
if (kbState.IsKeyDown(Keys.K))
{
jumpAssign = false;
jumpVal = 22;
jumpControlX = 7;
jumpControlY = 1;
if (clawVal == 22)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 22)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 22)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 22)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 22)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 22)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 22)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 22)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 22)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region L
if (kbState.IsKeyDown(Keys.L))
{
jumpAssign = false;
jumpVal = 23;
jumpControlX = 8;
jumpControlY = 1;
if (clawVal == 23)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 23)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 23)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 23)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 23)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 23)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 23)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 23)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 23)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ;
if (kbState.IsKeyDown(Keys.OemSemicolon))
{
jumpAssign = false;
jumpVal = 24;
jumpControlX = 9;
jumpControlY = 1;
if (clawVal == 24)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 24)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 24)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 24)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 24)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 24)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 24)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 24)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 24)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region '
if (kbState.IsKeyDown(Keys.OemQuotes))
{
jumpAssign = false;
jumpVal = 25;
jumpControlX = 10;
jumpControlY = 1;
if (clawVal == 25)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 25)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 25)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 25)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 25)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 25)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 25)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 25)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 25)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 3
#region Z
if (kbState.IsKeyDown(Keys.Z))
{
jumpAssign = false;
jumpVal = 26;
jumpControlX = 0;
jumpControlY = 2;
if (clawVal == 26)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 26)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 26)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 26)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 26)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 26)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 26)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 26)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 26)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region X
if (kbState.IsKeyDown(Keys.X))
{
lastKeyX = true;
jumpAssign = false;
jumpVal = 27;
jumpControlX = 1;
jumpControlY = 2;
if (clawVal == 27)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 27)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 27)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 27)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 27)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 27)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 27)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 27)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 27)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region C
if (kbState.IsKeyDown(Keys.C) && lastKeyC == false)
{
lastKeyC = true;
jumpAssign = false;
jumpVal = 28;
jumpControlX = 2;
jumpControlY = 2;
if (clawVal == 28)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 28)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 28)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 28)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 28)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 28)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 28)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 28)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 28)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region V
if (kbState.IsKeyDown(Keys.V))
{
jumpAssign = false;
jumpVal = 29;
jumpControlX = 3;
jumpControlY = 2;
if (clawVal == 29)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 29)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 29)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 29)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 29)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 29)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 29)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 29)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 29)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region B
if (kbState.IsKeyDown(Keys.B))
{
jumpAssign = false;
jumpVal = 30;
jumpControlX = 4;
jumpControlY = 2;
if (clawVal == 30)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 30)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 30)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 30)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 30)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 30)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 30)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 30)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 30)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region N
if (kbState.IsKeyDown(Keys.N))
{
jumpAssign = false;
jumpVal = 31;
jumpControlX = 5;
jumpControlY = 2;
if (clawVal == 31)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 31)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 31)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 31)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 31)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 31)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 31)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 31)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 31)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region M
if (kbState.IsKeyDown(Keys.M))
{
jumpAssign = false;
jumpVal = 32;
jumpControlX = 6;
jumpControlY = 2;
if (clawVal == 32)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 32)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 32)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 32)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 32)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 32)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 32)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 32)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 32)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ,
if (kbState.IsKeyDown(Keys.OemComma))
{
jumpAssign = false;
jumpVal = 33;
jumpControlX = 7;
jumpControlY = 2;
if (clawVal == 33)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 33)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 33)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 33)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 33)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 33)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 33)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 33)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 33)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region .
if (kbState.IsKeyDown(Keys.OemPeriod))
{
jumpAssign = false;
jumpVal = 34;
jumpControlX = 8;
jumpControlY = 2;
if (clawVal == 34)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 34)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 34)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 34)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 34)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 34)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 34)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 34)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 34)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region /
if (kbState.IsKeyDown(Keys.OemQuestion))
{
jumpAssign = false;
jumpVal = 35;
jumpControlX = 9;
jumpControlY = 2;
if (clawVal == 35)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 35)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 35)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 35)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 35)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 35)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 35)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 35)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 35)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 4
#region Shift
if (kbState.IsKeyDown(Keys.LeftShift) ||
kbState.IsKeyDown(Keys.RightShift))
{
jumpAssign = false;
jumpVal = 36;
jumpControlX = 0;
jumpControlY = 3;
if (clawVal == 36)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 36)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 36)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 36)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 36)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 36)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 36)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 36)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 36)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Control
if (kbState.IsKeyDown(Keys.LeftControl) ||
kbState.IsKeyDown(Keys.RightControl))
{
jumpAssign = false;
jumpVal = 37;
jumpControlX = 1;
jumpControlY = 3;
if (clawVal == 37)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 37)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 37)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 37)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 37)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 37)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 37)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 37)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 37)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Space
if (kbState.IsKeyDown(Keys.Space))
{
lastKeyX = true;
jumpAssign = false;
jumpVal = 38;
jumpControlX = 2;
jumpControlY = 3;
if (clawVal == 38)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 38)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 38)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 38)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 38)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 38)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 38)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 38)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 38)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 5
#region 0
if (kbState.IsKeyDown(Keys.D0))
{
jumpAssign = false;
jumpVal = 39;
jumpControlX = 0;
jumpControlY = 4;
if (clawVal == 39)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 39)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 39)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 39)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 39)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 39)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 39)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 39)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 39)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 1
if (kbState.IsKeyDown(Keys.D1))
{
jumpAssign = false;
jumpVal = 40;
jumpControlX = 1;
jumpControlY = 4;
if (clawVal == 40)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 40)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 40)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 40)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 40)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 40)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 40)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 40)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 40)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 2
if (kbState.IsKeyDown(Keys.D2))
{
jumpAssign = false;
jumpVal = 41;
jumpControlX = 2;
jumpControlY = 4;
if (clawVal == 41)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 41)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 41)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 41)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 41)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 41)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 41)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 41)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 41)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 3
if (kbState.IsKeyDown(Keys.D3))
{
jumpAssign = false;
jumpVal = 42;
jumpControlX = 3;
jumpControlY = 4;
if (clawVal == 42)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 42)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 42)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 42)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 42)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 42)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 42)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 42)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 42)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 4
if (kbState.IsKeyDown(Keys.D4))
{
jumpAssign = false;
jumpVal = 43;
jumpControlX = 4;
jumpControlY = 4;
if (clawVal == 43)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 43)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 43)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 43)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 43)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 43)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 43)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 43)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 43)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 5
if (kbState.IsKeyDown(Keys.D5))
{
jumpAssign = false;
jumpVal = 44;
jumpControlX = 5;
jumpControlY = 4;
if (clawVal == 44)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 44)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 44)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 44)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 44)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 44)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 44)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 44)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 44)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 6
if (kbState.IsKeyDown(Keys.D6))
{
jumpAssign = false;
jumpVal = 45;
jumpControlX = 6;
jumpControlY = 4;
if (clawVal == 45)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 45)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 45)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 45)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 45)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 45)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 45)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 45)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 45)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 7
if (kbState.IsKeyDown(Keys.D7))
{
jumpAssign = false;
jumpVal = 46;
jumpControlX = 7;
jumpControlY = 4;
if (clawVal == 46)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 46)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 46)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 46)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 46)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 46)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 46)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 46)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 46)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 8
if (kbState.IsKeyDown(Keys.D8))
{
jumpAssign = false;
jumpVal = 47;
jumpControlX = 8;
jumpControlY = 4;
if (clawVal == 47)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 47)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 47)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 47)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 47)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 47)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 47)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 47)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 47)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 9
if (kbState.IsKeyDown(Keys.D9))
{
jumpAssign = false;
jumpVal = 48;
jumpControlX = 9;
jumpControlY = 4;
if (clawVal == 48)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 48)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 48)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 48)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 48)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 48)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 48)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 48)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 48)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 6
#region Left
if (kbState.IsKeyDown(Keys.Left))
{
lastKeyLeft = true;
jumpAssign = false;
jumpVal = 49;
jumpControlX = 0;
jumpControlY = 5;
if (clawVal == 49)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 49)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 49)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 49)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 49)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 49)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 49)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 49)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 49)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Right
if (kbState.IsKeyDown(Keys.Right))
{
lastKeyRight = true;
jumpAssign = false;
jumpVal = 50;
jumpControlX = 1;
jumpControlY = 5;
if (clawVal == 50)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 50)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 50)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 50)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 50)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 50)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 50)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 50)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 50)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Up
if (kbState.IsKeyDown(Keys.Up))
{
lastKeyUp = true;
jumpAssign = false;
jumpVal = 51;
jumpControlX = 2;
jumpControlY = 5;
if (clawVal == 51)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 51)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 51)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 51)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 51)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 51)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 51)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 51)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 51)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Down
if (kbState.IsKeyDown(Keys.Down))
{
lastKeyDown = true;
jumpAssign = false;
jumpVal = 52;
jumpControlX = 3;
jumpControlY = 5;
if (clawVal == 52)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 52)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 52)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 52)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 52)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 52)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 52)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 52)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 52)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
}
#endregion
#region assign claw
if (clawAssign == true)
{
#region row 1
#region Tab
if (kbState.IsKeyDown(Keys.Tab))
{
clawAssign = false;
clawVal = 1;
clawControlX = 0;
clawControlY = 0;
if (jumpVal == 1)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 1)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 1)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 1)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 1)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 1)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 1)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 1)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 1)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Q
if (kbState.IsKeyDown(Keys.Q))
{
clawAssign = false;
clawVal = 2;
clawControlX = 1;
clawControlY = 0;
if (jumpVal == 2)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 2)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 2)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 2)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 2)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 2)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 2)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 2)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 2)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region W
if (kbState.IsKeyDown(Keys.W))
{
lastKeyUp = true;
clawAssign = false;
clawVal = 3;
clawControlX = 2;
clawControlY = 0;
if (jumpVal == 3)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 3)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 3)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 3)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 3)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 3)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 3)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 3)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 3)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region E
if (kbState.IsKeyDown(Keys.E) && lastKeyC == false)
{
lastKeyC = true;
clawAssign = false;
clawVal = 4;
clawControlX = 3;
clawControlY = 0;
if (jumpVal == 4)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 4)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 4)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 4)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 4)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 4)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 4)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 4)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 4)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region R
if (kbState.IsKeyDown(Keys.R))
{
clawAssign = false;
clawVal = 5;
clawControlX = 4;
clawControlY = 0;
if (jumpVal == 5)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 5)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 5)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 5)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 5)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 5)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 5)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 5)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 5)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region T
if (kbState.IsKeyDown(Keys.T))
{
clawAssign = false;
clawVal = 6;
clawControlX = 5;
clawControlY = 0;
if (jumpVal == 6)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 6)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 6)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 6)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 6)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 6)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 6)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 6)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 6)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Y
if (kbState.IsKeyDown(Keys.Y))
{
clawAssign = false;
clawVal = 7;
clawControlX = 6;
clawControlY = 0;
if (jumpVal == 7)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 7)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 7)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 7)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 7)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 7)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 7)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 7)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 7)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region U
if (kbState.IsKeyDown(Keys.U))
{
clawAssign = false;
clawVal = 8;
clawControlX = 7;
clawControlY = 0;
if (jumpVal == 8)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 8)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 8)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 8)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 8)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 8)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 8)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 8)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 8)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region I
if (kbState.IsKeyDown(Keys.I))
{
clawAssign = false;
clawVal = 9;
clawControlX = 8;
clawControlY = 0;
if (jumpVal == 9)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 9)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 9)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 9)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 9)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 9)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 9)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 9)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 9)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region O
if (kbState.IsKeyDown(Keys.O))
{
clawAssign = false;
clawVal = 10;
clawControlX = 9;
clawControlY = 0;
if (jumpVal == 10)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 10)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 10)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 10)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 10)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 10)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 10)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 10)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 10)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region P
if (kbState.IsKeyDown(Keys.P))
{
clawAssign = false;
clawVal = 11;
clawControlX = 10;
clawControlY = 0;
if (jumpVal == 11)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 11)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 11)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 11)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 11)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 11)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 11)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 11)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 11)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region [
if (kbState.IsKeyDown(Keys.OemOpenBrackets))
{
clawAssign = false;
clawVal = 12;
clawControlX = 11;
clawControlY = 0;
if (jumpVal == 12)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 12)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 12)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 12)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 12)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 12)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 12)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 12)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 12)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ]
if (kbState.IsKeyDown(Keys.OemCloseBrackets))
{
clawAssign = false;
clawVal = 13;
clawControlX = 12;
clawControlY = 0;
if (jumpVal == 13)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 13)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 13)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 13)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 13)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 13)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 13)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 13)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 13)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region \
if (kbState.IsKeyDown(Keys.OemBackslash))
{
clawAssign = false;
clawVal = 14;
jumpControlX = 13;
clawControlY = 0;
if (jumpVal == 14)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 14)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 14)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 14)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 14)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 14)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 14)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 14)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 14)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 2
#region A
if (kbState.IsKeyDown(Keys.A))
{
lastKeyLeft = true;
clawAssign = false;
clawVal = 15;
clawControlX = 0;
clawControlY = 1;
if (jumpVal == 15)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 15)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 15)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 15)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 15)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 15)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 15)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 15)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 15)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region S
if (kbState.IsKeyDown(Keys.S))
{
lastKeyDown = true;
clawAssign = false;
clawVal = 16;
clawControlX = 1;
clawControlY = 1;
if (jumpVal == 16)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 16)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 16)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 16)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 16)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 16)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 16)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 16)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 16)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region D
if (kbState.IsKeyDown(Keys.D))
{
lastKeyRight = true;
clawAssign = false;
clawVal = 17;
clawControlX = 2;
clawControlY = 1;
if (jumpVal == 17)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 17)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 17)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 17)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 17)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 17)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 17)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 17)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 17)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region F
if (kbState.IsKeyDown(Keys.F))
{
clawAssign = false;
clawVal = 18;
clawControlX = 3;
clawControlY = 1;
if (jumpVal == 18)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 18)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 18)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 18)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 18)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 18)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 18)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 18)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 18)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region G
if (kbState.IsKeyDown(Keys.G))
{
clawAssign = false;
clawVal = 19;
clawControlX = 4;
clawControlY = 1;
if (jumpVal == 19)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 19)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 19)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 19)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 19)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 19)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 19)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 19)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 19)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region H
if (kbState.IsKeyDown(Keys.H))
{
clawAssign = false;
clawVal = 20;
clawControlX = 5;
clawControlY = 1;
if (jumpVal == 20)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 20)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 20)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 20)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 20)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 20)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 20)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 20)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 20)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region J
if (kbState.IsKeyDown(Keys.J))
{
clawAssign = false;
clawVal = 21;
clawControlX = 6;
clawControlY = 1;
if (jumpVal == 21)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 21)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 21)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 21)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 21)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 21)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 21)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 21)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 21)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region K
if (kbState.IsKeyDown(Keys.K))
{
clawAssign = false;
clawVal = 22;
clawControlX = 7;
clawControlY = 1;
if (jumpVal == 22)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 22)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 22)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 22)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 22)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 22)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 22)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 22)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 22)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region L
if (kbState.IsKeyDown(Keys.L))
{
clawAssign = false;
clawVal = 23;
clawControlX = 8;
clawControlY = 1;
if (jumpVal == 23)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 23)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 23)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 23)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 23)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 23)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 23)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 23)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 23)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ;
if (kbState.IsKeyDown(Keys.OemSemicolon))
{
clawAssign = false;
clawVal = 24;
clawControlX = 9;
clawControlY = 1;
if (jumpVal == 24)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 24)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 24)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 24)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 24)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 24)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 24)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 24)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 24)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region '
if (kbState.IsKeyDown(Keys.OemQuotes))
{
clawAssign = false;
clawVal = 25;
clawControlX = 10;
clawControlY = 1;
if (jumpVal == 25)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 25)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 25)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 25)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 25)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 25)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 25)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 25)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 25)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 3
#region Z
if (kbState.IsKeyDown(Keys.Z))
{
clawAssign = false;
clawVal = 26;
clawControlX = 0;
clawControlY = 2;
if (jumpVal == 26)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 26)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 26)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 26)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 26)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 26)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 26)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 26)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 26)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region X
if (kbState.IsKeyDown(Keys.X))
{
lastKeyX = true;
clawAssign = false;
clawVal = 27;
clawControlX = 1;
clawControlY = 2;
if (jumpVal == 27)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 27)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 27)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 27)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 27)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 27)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 27)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 27)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 27)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region C
if (kbState.IsKeyDown(Keys.C) && lastKeyC == false)
{
lastKeyC = true;
clawAssign = false;
clawVal = 28;
clawControlX = 2;
clawControlY = 2;
if (jumpVal == 28)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 28)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 28)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 28)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 28)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 28)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 28)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 28)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 28)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region V
if (kbState.IsKeyDown(Keys.V))
{
clawAssign = false;
clawVal = 29;
clawControlX = 3;
clawControlY = 2;
if (jumpVal == 29)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 29)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 29)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 29)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 29)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 29)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 29)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 29)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 29)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region B
if (kbState.IsKeyDown(Keys.B))
{
clawAssign = false;
clawVal = 30;
clawControlX = 4;
clawControlY = 2;
if (jumpVal == 30)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 30)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 30)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 30)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 30)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 30)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 30)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 30)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 30)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region N
if (kbState.IsKeyDown(Keys.N))
{
clawAssign = false;
clawVal = 31;
clawControlX = 5;
clawControlY = 2;
if (jumpVal == 31)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 31)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 31)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 31)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 31)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 31)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 31)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 31)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 31)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region M
if (kbState.IsKeyDown(Keys.M))
{
clawAssign = false;
clawVal = 32;
clawControlX = 6;
clawControlY = 2;
if (jumpVal == 32)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 32)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 32)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 32)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 32)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 32)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 32)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 32)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 32)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ,
if (kbState.IsKeyDown(Keys.OemComma))
{
clawAssign = false;
clawVal = 33;
clawControlX = 7;
clawControlY = 2;
if (jumpVal == 33)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 33)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 33)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 33)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 33)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 33)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 33)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 33)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 33)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region .
if (kbState.IsKeyDown(Keys.OemPeriod))
{
clawAssign = false;
clawVal = 34;
clawControlX = 8;
clawControlY = 2;
if (jumpVal == 34)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 34)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 34)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 34)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 34)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 34)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 34)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 34)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 34)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region /
if (kbState.IsKeyDown(Keys.OemQuestion))
{
clawAssign = false;
clawVal = 35;
clawControlX = 9;
clawControlY = 2;
if (jumpVal == 35)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 35)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 35)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 35)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 35)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 35)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 35)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 35)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 35)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 4
#region Shift
if (kbState.IsKeyDown(Keys.LeftShift) ||
kbState.IsKeyDown(Keys.RightShift))
{
clawAssign = false;
clawVal = 36;
clawControlX = 0;
clawControlY = 3;
if (jumpVal == 36)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 36)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 36)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 36)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 36)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 36)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 36)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 36)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 36)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Control
if (kbState.IsKeyDown(Keys.LeftControl) ||
kbState.IsKeyDown(Keys.RightControl))
{
clawAssign = false;
clawVal = 37;
clawControlX = 1;
clawControlY = 3;
if (jumpVal == 37)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 37)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 37)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 37)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 37)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 37)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 37)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 37)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 37)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Space
if (kbState.IsKeyDown(Keys.Space))
{
lastKeyX = true;
clawAssign = false;
clawVal = 38;
clawControlX = 2;
clawControlY = 3;
if (jumpVal == 38)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 38)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 38)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 38)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 38)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 38)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 38)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 38)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 38)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 5
#region 0
if (kbState.IsKeyDown(Keys.D0))
{
clawAssign = false;
clawVal = 39;
clawControlX = 0;
clawControlY = 4;
if (jumpVal == 39)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 39)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 39)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 39)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 39)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 39)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 39)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 39)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 39)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 1
if (kbState.IsKeyDown(Keys.D1))
{
clawAssign = false;
clawVal = 40;
clawControlX = 1;
clawControlY = 4;
if (jumpVal == 40)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 40)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 40)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 40)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 40)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 40)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 40)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 40)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 40)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 2
if (kbState.IsKeyDown(Keys.D2))
{
clawAssign = false;
clawVal = 41;
clawControlX = 2;
clawControlY = 4;
if (jumpVal == 41)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 41)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 41)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 41)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 41)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 41)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 41)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 41)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 41)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 3
if (kbState.IsKeyDown(Keys.D3))
{
clawAssign = false;
clawVal = 42;
clawControlX = 3;
clawControlY = 4;
if (jumpVal == 42)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 42)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 42)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 42)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 42)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 42)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 42)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 42)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 42)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 4
if (kbState.IsKeyDown(Keys.D4))
{
clawAssign = false;
clawVal = 43;
clawControlX = 4;
clawControlY = 4;
if (jumpVal == 43)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 43)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 43)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 43)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 43)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 43)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 43)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 43)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 43)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 5
if (kbState.IsKeyDown(Keys.D5))
{
clawAssign = false;
clawVal = 44;
clawControlX = 5;
clawControlY = 4;
if (jumpVal == 44)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 44)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 44)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 44)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 44)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 44)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 44)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 44)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 44)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 6
if (kbState.IsKeyDown(Keys.D6))
{
clawAssign = false;
clawVal = 45;
clawControlX = 6;
clawControlY = 4;
if (jumpVal == 45)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 45)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 45)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 45)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 45)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 45)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 45)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 45)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 45)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 7
if (kbState.IsKeyDown(Keys.D7))
{
clawAssign = false;
clawVal = 46;
clawControlX = 7;
clawControlY = 4;
if (jumpVal == 46)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 46)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 46)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 46)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 46)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 46)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 46)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 46)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 46)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 8
if (kbState.IsKeyDown(Keys.D8))
{
clawAssign = false;
clawVal = 47;
clawControlX = 8;
clawControlY = 4;
if (jumpVal == 47)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 47)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 47)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 47)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 47)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 47)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 47)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 47)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 47)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 9
if (kbState.IsKeyDown(Keys.D9))
{
clawAssign = false;
clawVal = 48;
clawControlX = 9;
clawControlY = 4;
if (jumpVal == 48)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 48)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 48)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 48)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 48)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 48)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 48)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 48)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 48)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 6
#region Left
if (kbState.IsKeyDown(Keys.Left))
{
lastKeyLeft = true;
clawAssign = false;
clawVal = 49;
clawControlX = 0;
jumpControlY = 5;
if (jumpVal == 49)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 49)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 49)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 49)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 49)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 49)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 49)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 49)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 49)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Right
if (kbState.IsKeyDown(Keys.Right))
{
lastKeyRight = true;
clawAssign = false;
clawVal = 50;
clawControlX = 1;
jumpControlY = 5;
if (jumpVal == 50)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 50)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 50)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 50)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 50)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 50)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 50)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 50)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 50)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Up
if (kbState.IsKeyDown(Keys.Up))
{
lastKeyUp = true;
clawAssign = false;
clawVal = 51;
clawControlX = 2;
jumpControlY = 5;
if (jumpVal == 51)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 51)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 51)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 51)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 51)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 51)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 51)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 51)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 51)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Down
if (kbState.IsKeyDown(Keys.Down))
{
lastKeyDown = true;
clawAssign = false;
clawVal = 52;
clawControlX = 3;
jumpControlY = 5;
if (jumpVal == 52)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (breathVal == 52)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 52)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 52)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 52)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 52)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 52)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 52)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 52)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
}
#endregion
#region assign breath
if (breathAssign == true)
{
#region row 1
#region Tab
if (kbState.IsKeyDown(Keys.Tab))
{
breathAssign = false;
breathVal = 1;
breathControlX = 0;
breathControlY = 0;
if (clawVal == 1)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 1)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 1)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 1)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 1)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 1)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 1)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 1)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 1)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Q
if (kbState.IsKeyDown(Keys.Q))
{
breathAssign = false;
breathVal = 2;
breathControlX = 1;
breathControlY = 0;
if (clawVal == 2)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 2)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 2)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 2)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 2)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 2)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 2)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 2)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 2)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region W
if (kbState.IsKeyDown(Keys.W))
{
lastKeyUp = true;
breathAssign = false;
breathVal = 3;
breathControlX = 2;
breathControlY = 0;
if (clawVal == 3)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 3)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 3)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 3)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 3)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 3)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 3)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 3)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 3)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region E
if (kbState.IsKeyDown(Keys.E) && lastKeyC == false)
{
lastKeyC = true;
breathAssign = false;
breathVal = 4;
breathControlX = 3;
breathControlY = 0;
if (clawVal == 4)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 4)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 4)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 4)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 4)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 4)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 4)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 4)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 4)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region R
if (kbState.IsKeyDown(Keys.R))
{
breathAssign = false;
breathVal = 5;
breathControlX = 4;
breathControlY = 0;
if (clawVal == 5)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 5)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 5)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 5)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 5)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 5)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 5)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 5)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 5)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region T
if (kbState.IsKeyDown(Keys.T))
{
breathAssign = false;
breathVal = 6;
breathControlX = 5;
breathControlY = 0;
if (clawVal == 6)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 6)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 6)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 6)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 6)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 6)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 6)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 6)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 6)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Y
if (kbState.IsKeyDown(Keys.Y))
{
breathAssign = false;
breathVal = 7;
breathControlX = 6;
breathControlY = 0;
if (clawVal == 7)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 7)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 7)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 7)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 7)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 7)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 7)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 7)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 7)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region U
if (kbState.IsKeyDown(Keys.U))
{
breathAssign = false;
breathVal = 8;
breathControlX = 7;
breathControlY = 0;
if (clawVal == 8)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 8)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 8)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 8)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 8)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 8)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 8)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 8)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 8)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region I
if (kbState.IsKeyDown(Keys.I))
{
breathAssign = false;
breathVal = 9;
breathControlX = 8;
breathControlY = 0;
if (clawVal == 9)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 9)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 9)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 9)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 9)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 9)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 9)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 9)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 9)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region O
if (kbState.IsKeyDown(Keys.O))
{
breathAssign = false;
breathVal = 10;
breathControlX = 9;
breathControlY = 0;
if (clawVal == 10)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 10)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 10)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 10)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 10)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 10)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 10)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 10)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 10)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region P
if (kbState.IsKeyDown(Keys.P))
{
breathAssign = false;
breathVal = 11;
breathControlX = 10;
breathControlY = 0;
if (clawVal == 11)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 11)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 11)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 11)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 11)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 11)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 11)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 11)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 11)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region [
if (kbState.IsKeyDown(Keys.OemOpenBrackets))
{
breathAssign = false;
breathVal = 12;
breathControlX = 11;
breathControlY = 0;
if (clawVal == 12)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 12)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 12)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 12)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 12)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 12)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 12)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 12)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 12)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ]
if (kbState.IsKeyDown(Keys.OemCloseBrackets))
{
breathAssign = false;
breathVal = 13;
breathControlX = 12;
breathControlY = 0;
if (clawVal == 13)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 13)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 13)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 13)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 13)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 13)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 13)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 13)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 13)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region \
if (kbState.IsKeyDown(Keys.OemBackslash))
{
breathAssign = false;
breathVal = 14;
jumpControlX = 13;
breathControlY = 0;
if (clawVal == 14)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 14)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 14)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 14)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 14)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 14)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 14)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 14)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 14)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 2
#region A
if (kbState.IsKeyDown(Keys.A))
{
lastKeyLeft = true;
breathAssign = false;
breathVal = 15;
breathControlX = 0;
breathControlY = 1;
if (clawVal == 15)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 15)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 15)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 15)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 15)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 15)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 15)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 15)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 15)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region S
if (kbState.IsKeyDown(Keys.S))
{
lastKeyDown = true;
breathAssign = false;
breathVal = 16;
breathControlX = 1;
breathControlY = 1;
if (clawVal == 16)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 16)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 16)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 16)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 16)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 16)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 16)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 16)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 16)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region D
if (kbState.IsKeyDown(Keys.D))
{
lastKeyRight = true;
breathAssign = false;
breathVal = 17;
breathControlX = 2;
breathControlY = 1;
if (clawVal == 17)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 17)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 17)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 17)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 17)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 17)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 17)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 17)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 17)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region F
if (kbState.IsKeyDown(Keys.F))
{
breathAssign = false;
breathVal = 18;
breathControlX = 3;
breathControlY = 1;
if (clawVal == 18)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 18)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 18)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 18)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 18)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 18)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 18)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 18)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 18)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region G
if (kbState.IsKeyDown(Keys.G))
{
breathAssign = false;
breathVal = 19;
breathControlX = 4;
breathControlY = 1;
if (clawVal == 19)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 19)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 19)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 19)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 19)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 19)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 19)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 19)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 19)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region H
if (kbState.IsKeyDown(Keys.H))
{
breathAssign = false;
breathVal = 20;
breathControlX = 5;
breathControlY = 1;
if (clawVal == 20)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 20)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 20)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 20)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 20)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 20)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 20)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 20)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 20)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region J
if (kbState.IsKeyDown(Keys.J))
{
breathAssign = false;
breathVal = 21;
breathControlX = 6;
breathControlY = 1;
if (clawVal == 21)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 21)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 21)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 21)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 21)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 21)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 21)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 21)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 21)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region K
if (kbState.IsKeyDown(Keys.K))
{
breathAssign = false;
breathVal = 22;
breathControlX = 7;
breathControlY = 1;
if (clawVal == 22)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 22)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 22)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 22)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 22)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 22)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 22)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 22)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 22)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region L
if (kbState.IsKeyDown(Keys.L))
{
breathAssign = false;
breathVal = 23;
breathControlX = 8;
breathControlY = 1;
if (clawVal == 23)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 23)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 23)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 23)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 23)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 23)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 23)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 23)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 23)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ;
if (kbState.IsKeyDown(Keys.OemSemicolon))
{
breathAssign = false;
breathVal = 24;
breathControlX = 9;
breathControlY = 1;
if (clawVal == 24)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 24)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 24)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 24)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 24)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 24)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 24)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 24)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 24)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region '
if (kbState.IsKeyDown(Keys.OemQuotes))
{
breathAssign = false;
breathVal = 25;
breathControlX = 10;
breathControlY = 1;
if (clawVal == 25)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 25)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 25)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 25)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 25)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 25)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 25)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 25)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 25)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 3
#region Z
if (kbState.IsKeyDown(Keys.Z))
{
breathAssign = false;
breathVal = 26;
breathControlX = 0;
breathControlY = 2;
if (clawVal == 26)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 26)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 26)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 26)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 26)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 26)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 26)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 26)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 26)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region X
if (kbState.IsKeyDown(Keys.X))
{
lastKeyX = true;
breathAssign = false;
breathVal = 27;
breathControlX = 1;
breathControlY = 2;
if (clawVal == 27)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 27)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 27)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 27)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 27)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 27)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 27)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 27)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 27)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region C
if (kbState.IsKeyDown(Keys.C) && lastKeyC == false)
{
lastKeyC = true;
breathAssign = false;
breathVal = 28;
breathControlX = 2;
breathControlY = 2;
if (clawVal == 28)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 28)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 28)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 28)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 28)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 28)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 28)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 28)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 28)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region V
if (kbState.IsKeyDown(Keys.V))
{
breathAssign = false;
breathVal = 29;
breathControlX = 3;
breathControlY = 2;
if (clawVal == 29)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 29)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 29)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 29)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 29)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 29)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 29)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 29)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 29)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region B
if (kbState.IsKeyDown(Keys.B))
{
breathAssign = false;
breathVal = 30;
breathControlX = 4;
breathControlY = 2;
if (clawVal == 30)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 30)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 30)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 30)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 30)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 30)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 30)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 30)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 30)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region N
if (kbState.IsKeyDown(Keys.N))
{
breathAssign = false;
breathVal = 31;
breathControlX = 5;
breathControlY = 2;
if (clawVal == 31)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 31)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 31)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 31)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 31)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 31)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 31)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 31)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 31)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region M
if (kbState.IsKeyDown(Keys.M))
{
breathAssign = false;
breathVal = 32;
breathControlX = 6;
breathControlY = 2;
if (clawVal == 32)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 32)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 32)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 32)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 32)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 32)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 32)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 32)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 32)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ,
if (kbState.IsKeyDown(Keys.OemComma))
{
breathAssign = false;
breathVal = 33;
breathControlX = 7;
breathControlY = 2;
if (clawVal == 33)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 33)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 33)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 33)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 33)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 33)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 33)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 33)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 33)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region .
if (kbState.IsKeyDown(Keys.OemPeriod))
{
breathAssign = false;
breathVal = 34;
breathControlX = 8;
breathControlY = 2;
if (clawVal == 34)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 34)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 34)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 34)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 34)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 34)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 34)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 34)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 34)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region /
if (kbState.IsKeyDown(Keys.OemQuestion))
{
breathAssign = false;
breathVal = 35;
breathControlX = 9;
breathControlY = 2;
if (clawVal == 35)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 35)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 35)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 35)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 35)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 35)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 35)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 35)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 35)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 4
#region Shift
if (kbState.IsKeyDown(Keys.LeftShift) ||
kbState.IsKeyDown(Keys.RightShift))
{
breathAssign = false;
breathVal = 36;
breathControlX = 0;
breathControlY = 3;
if (clawVal == 36)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 36)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 36)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 36)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 36)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 36)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 36)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 36)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 36)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Control
if (kbState.IsKeyDown(Keys.LeftControl) ||
kbState.IsKeyDown(Keys.RightControl))
{
breathAssign = false;
breathVal = 37;
breathControlX = 1;
breathControlY = 3;
if (clawVal == 37)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 37)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 37)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 37)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 37)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 37)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 37)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 37)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 37)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Space
if (kbState.IsKeyDown(Keys.Space))
{
lastKeyX = true;
breathAssign = false;
breathVal = 38;
breathControlX = 2;
breathControlY = 3;
if (clawVal == 38)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 38)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 38)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 38)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 38)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 38)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 38)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 38)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 38)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 5
#region 0
if (kbState.IsKeyDown(Keys.D0))
{
breathAssign = false;
breathVal = 39;
breathControlX = 0;
breathControlY = 4;
if (clawVal == 39)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 39)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 39)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 39)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 39)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 39)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 39)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 39)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 39)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 1
if (kbState.IsKeyDown(Keys.D1))
{
breathAssign = false;
breathVal = 40;
breathControlX = 1;
breathControlY = 4;
if (clawVal == 40)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 40)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 40)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 40)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 40)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 40)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 40)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 40)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 40)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 2
if (kbState.IsKeyDown(Keys.D2))
{
breathAssign = false;
breathVal = 41;
breathControlX = 2;
breathControlY = 4;
if (clawVal == 41)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 41)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 41)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 41)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 41)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 41)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 41)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 41)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 41)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 3
if (kbState.IsKeyDown(Keys.D3))
{
breathAssign = false;
breathVal = 42;
breathControlX = 3;
breathControlY = 4;
if (clawVal == 42)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 42)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 42)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 42)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 42)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 42)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 42)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 42)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 42)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 4
if (kbState.IsKeyDown(Keys.D4))
{
breathAssign = false;
breathVal = 43;
breathControlX = 4;
breathControlY = 4;
if (clawVal == 43)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 43)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 43)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 43)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 43)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 43)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 43)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 43)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 43)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 5
if (kbState.IsKeyDown(Keys.D5))
{
breathAssign = false;
breathVal = 44;
breathControlX = 5;
breathControlY = 4;
if (clawVal == 44)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 44)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 44)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 44)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 44)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 44)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 44)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 44)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 44)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 6
if (kbState.IsKeyDown(Keys.D6))
{
breathAssign = false;
breathVal = 45;
breathControlX = 6;
breathControlY = 4;
if (clawVal == 45)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 45)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 45)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 45)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 45)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 45)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 45)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 45)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 45)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 7
if (kbState.IsKeyDown(Keys.D7))
{
breathAssign = false;
breathVal = 46;
breathControlX = 7;
breathControlY = 4;
if (clawVal == 46)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 46)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 46)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 46)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 46)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 46)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 46)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 46)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 46)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 8
if (kbState.IsKeyDown(Keys.D8))
{
breathAssign = false;
breathVal = 47;
breathControlX = 8;
breathControlY = 4;
if (clawVal == 47)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 47)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 47)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 47)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 47)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 47)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 47)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 47)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 47)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 9
if (kbState.IsKeyDown(Keys.D9))
{
breathAssign = false;
breathVal = 48;
breathControlX = 9;
breathControlY = 4;
if (clawVal == 48)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 48)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 48)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 48)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 48)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 48)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 48)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 48)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 48)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 6
#region Left
if (kbState.IsKeyDown(Keys.Left))
{
lastKeyLeft = true;
breathAssign = false;
breathVal = 49;
breathControlX = 0;
jumpControlY = 5;
if (clawVal == 49)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 49)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 49)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 49)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 49)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 49)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 49)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 49)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 49)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Right
if (kbState.IsKeyDown(Keys.Right))
{
lastKeyRight = true;
breathAssign = false;
breathVal = 50;
breathControlX = 1;
jumpControlY = 5;
if (clawVal == 50)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 50)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 50)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 50)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 50)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 50)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 50)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 50)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 50)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Up
if (kbState.IsKeyDown(Keys.Up))
{
lastKeyUp = true;
breathAssign = false;
breathVal = 51;
breathControlX = 2;
jumpControlY = 5;
if (clawVal == 51)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 51)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 51)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 51)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 51)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 51)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 51)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 51)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 51)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Down
if (kbState.IsKeyDown(Keys.Down))
{
lastKeyDown = true;
breathAssign = false;
breathVal = 52;
breathControlX = 3;
jumpControlY = 5;
if (clawVal == 52)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (jumpVal == 52)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (confVal == 52)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 52)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 52)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 52)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 52)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 52)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 52)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
}
#endregion
#region assign conf
if (confAssign == true)
{
#region row 1
#region Tab
if (kbState.IsKeyDown(Keys.Tab))
{
confAssign = false;
confVal = 1;
confControlX = 0;
confControlY = 0;
if (clawVal == 1)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 1)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 1)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 1)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 1)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 1)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 1)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 1)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 1)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Q
if (kbState.IsKeyDown(Keys.Q))
{
confAssign = false;
confVal = 2;
confControlX = 1;
confControlY = 0;
if (clawVal == 2)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 2)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 2)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 2)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 2)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 2)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 2)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 2)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 2)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region W
if (kbState.IsKeyDown(Keys.W))
{
lastKeyUp = true;
confAssign = false;
confVal = 3;
confControlX = 2;
confControlY = 0;
if (clawVal == 3)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 3)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 3)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 3)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 3)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 3)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 3)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 3)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 3)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region E
if (kbState.IsKeyDown(Keys.E) && lastKeyC == false)
{
lastKeyC = true;
confAssign = false;
confVal = 4;
confControlX = 3;
confControlY = 0;
if (clawVal == 4)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 4)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 4)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 4)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 4)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 4)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 4)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 4)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 4)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region R
if (kbState.IsKeyDown(Keys.R))
{
confAssign = false;
confVal = 5;
confControlX = 4;
confControlY = 0;
if (clawVal == 5)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 5)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 5)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 5)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 5)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 5)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 5)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 5)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 5)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region T
if (kbState.IsKeyDown(Keys.T))
{
confAssign = false;
confVal = 6;
confControlX = 5;
confControlY = 0;
if (clawVal == 6)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 6)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 6)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 6)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 6)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 6)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 6)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 6)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 6)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Y
if (kbState.IsKeyDown(Keys.Y))
{
confAssign = false;
confVal = 7;
confControlX = 6;
confControlY = 0;
if (clawVal == 7)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 7)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 7)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 7)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 7)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 7)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 7)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 7)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 7)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region U
if (kbState.IsKeyDown(Keys.U))
{
confAssign = false;
confVal = 8;
confControlX = 7;
confControlY = 0;
if (clawVal == 8)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 8)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 8)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 8)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 8)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 8)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 8)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 8)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 8)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region I
if (kbState.IsKeyDown(Keys.I))
{
confAssign = false;
confVal = 9;
confControlX = 8;
confControlY = 0;
if (clawVal == 9)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 9)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 9)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 9)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 9)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 9)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 9)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 9)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 9)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region O
if (kbState.IsKeyDown(Keys.O))
{
confAssign = false;
confVal = 10;
confControlX = 9;
confControlY = 0;
if (clawVal == 10)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 10)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 10)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 10)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 10)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 10)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 10)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 10)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 10)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region P
if (kbState.IsKeyDown(Keys.P))
{
confAssign = false;
confVal = 11;
confControlX = 10;
confControlY = 0;
if (clawVal == 11)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 11)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 11)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 11)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 11)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 11)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 11)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 11)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 11)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region [
if (kbState.IsKeyDown(Keys.OemOpenBrackets))
{
confAssign = false;
confVal = 12;
confControlX = 11;
confControlY = 0;
if (clawVal == 12)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 12)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 12)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 12)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 12)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 12)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 12)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 12)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 12)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ]
if (kbState.IsKeyDown(Keys.OemCloseBrackets))
{
confAssign = false;
confVal = 13;
confControlX = 12;
confControlY = 0;
if (clawVal == 13)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 13)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 13)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 13)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 13)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 13)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 13)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 13)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 13)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region \
if (kbState.IsKeyDown(Keys.OemBackslash))
{
confAssign = false;
confVal = 14;
jumpControlX = 13;
confControlY = 0;
if (clawVal == 14)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 14)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 14)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 14)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 14)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 14)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 14)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 14)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 14)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 2
#region A
if (kbState.IsKeyDown(Keys.A))
{
lastKeyLeft = true;
confAssign = false;
confVal = 15;
confControlX = 0;
confControlY = 1;
if (clawVal == 15)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 15)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 15)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 15)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 15)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 15)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 15)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 15)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 15)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region S
if (kbState.IsKeyDown(Keys.S))
{
lastKeyDown = true;
confAssign = false;
confVal = 16;
confControlX = 1;
confControlY = 1;
if (clawVal == 16)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 16)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 16)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 16)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 16)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 16)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 16)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 16)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 16)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region D
if (kbState.IsKeyDown(Keys.D))
{
lastKeyRight = true;
confAssign = false;
confVal = 17;
confControlX = 2;
confControlY = 1;
if (clawVal == 17)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 17)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 17)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 17)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 17)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 17)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 17)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 17)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 17)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region F
if (kbState.IsKeyDown(Keys.F))
{
confAssign = false;
confVal = 18;
confControlX = 3;
confControlY = 1;
if (clawVal == 18)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 18)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 18)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 18)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 18)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 18)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 18)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 18)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 18)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region G
if (kbState.IsKeyDown(Keys.G))
{
confAssign = false;
confVal = 19;
confControlX = 4;
confControlY = 1;
if (clawVal == 19)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 19)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 19)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 19)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 19)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 19)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 19)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 19)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 19)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region H
if (kbState.IsKeyDown(Keys.H))
{
confAssign = false;
confVal = 20;
confControlX = 5;
confControlY = 1;
if (clawVal == 20)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 20)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 20)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 20)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 20)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 20)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 20)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 20)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 20)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region J
if (kbState.IsKeyDown(Keys.J))
{
confAssign = false;
confVal = 21;
confControlX = 6;
confControlY = 1;
if (clawVal == 21)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 21)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 21)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 21)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 21)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 21)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 21)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 21)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 21)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region K
if (kbState.IsKeyDown(Keys.K))
{
confAssign = false;
confVal = 22;
confControlX = 7;
confControlY = 1;
if (clawVal == 22)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 22)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 22)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 22)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 22)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 22)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 22)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 22)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 22)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region L
if (kbState.IsKeyDown(Keys.L))
{
confAssign = false;
confVal = 23;
confControlX = 8;
confControlY = 1;
if (clawVal == 23)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 23)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 23)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 23)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 23)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 23)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 23)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 23)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 23)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ;
if (kbState.IsKeyDown(Keys.OemSemicolon))
{
confAssign = false;
confVal = 24;
confControlX = 9;
confControlY = 1;
if (clawVal == 24)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 24)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 24)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 24)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 24)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 24)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 24)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 24)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 24)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region '
if (kbState.IsKeyDown(Keys.OemQuotes))
{
confAssign = false;
confVal = 25;
confControlX = 10;
confControlY = 1;
if (clawVal == 25)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 25)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 25)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 25)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 25)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 25)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 25)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 25)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 25)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 3
#region Z
if (kbState.IsKeyDown(Keys.Z))
{
confAssign = false;
confVal = 26;
confControlX = 0;
confControlY = 2;
if (clawVal == 26)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 26)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 26)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 26)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 26)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 26)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 26)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 26)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 26)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region X
if (kbState.IsKeyDown(Keys.X))
{
lastKeyX = true;
confAssign = false;
confVal = 27;
confControlX = 1;
confControlY = 2;
if (clawVal == 27)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 27)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 27)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 27)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 27)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 27)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 27)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 27)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 27)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region C
if (kbState.IsKeyDown(Keys.C) && lastKeyC == false)
{
lastKeyC = true;
confAssign = false;
confVal = 28;
confControlX = 2;
confControlY = 2;
if (clawVal == 28)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 28)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 28)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 28)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 28)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 28)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 28)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 28)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 28)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region V
if (kbState.IsKeyDown(Keys.V))
{
confAssign = false;
confVal = 29;
confControlX = 3;
confControlY = 2;
if (clawVal == 29)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 29)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 29)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 29)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 29)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 29)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 29)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 29)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 29)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region B
if (kbState.IsKeyDown(Keys.B))
{
confAssign = false;
confVal = 30;
confControlX = 4;
confControlY = 2;
if (clawVal == 30)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 30)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 30)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 30)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 30)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 30)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 30)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 30)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 30)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region N
if (kbState.IsKeyDown(Keys.N))
{
confAssign = false;
confVal = 31;
confControlX = 5;
confControlY = 2;
if (clawVal == 31)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 31)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 31)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 31)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 31)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 31)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 31)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 31)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 31)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region M
if (kbState.IsKeyDown(Keys.M))
{
confAssign = false;
confVal = 32;
confControlX = 6;
confControlY = 2;
if (clawVal == 32)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 32)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 32)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 32)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 32)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 32)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 32)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 32)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 32)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ,
if (kbState.IsKeyDown(Keys.OemComma))
{
confAssign = false;
confVal = 33;
confControlX = 7;
confControlY = 2;
if (clawVal == 33)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 33)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 33)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 33)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 33)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 33)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 33)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 33)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 33)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region .
if (kbState.IsKeyDown(Keys.OemPeriod))
{
confAssign = false;
confVal = 34;
confControlX = 8;
confControlY = 2;
if (clawVal == 34)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 34)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 34)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 34)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 34)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 34)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 34)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 34)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 34)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region /
if (kbState.IsKeyDown(Keys.OemQuestion))
{
confAssign = false;
confVal = 35;
confControlX = 9;
confControlY = 2;
if (clawVal == 35)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 35)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 35)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 35)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 35)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 35)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 35)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 35)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 35)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 4
#region Shift
if (kbState.IsKeyDown(Keys.LeftShift) ||
kbState.IsKeyDown(Keys.RightShift))
{
confAssign = false;
confVal = 36;
confControlX = 0;
confControlY = 3;
if (clawVal == 36)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 36)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 36)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 36)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 36)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 36)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 36)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 36)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 36)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Control
if (kbState.IsKeyDown(Keys.LeftControl) ||
kbState.IsKeyDown(Keys.RightControl))
{
confAssign = false;
confVal = 37;
confControlX = 1;
confControlY = 3;
if (clawVal == 37)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 37)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 37)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 37)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 37)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 37)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 37)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 37)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 37)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Space
if (kbState.IsKeyDown(Keys.Space))
{
lastKeyX = true;
confAssign = false;
confVal = 38;
confControlX = 2;
confControlY = 3;
if (clawVal == 38)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 38)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 38)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 38)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 38)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 38)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 38)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 38)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 38)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 5
#region 0
if (kbState.IsKeyDown(Keys.D0))
{
confAssign = false;
confVal = 39;
confControlX = 0;
confControlY = 4;
if (clawVal == 39)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 39)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 39)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 39)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 39)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 39)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 39)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 39)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 39)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 1
if (kbState.IsKeyDown(Keys.D1))
{
confAssign = false;
confVal = 40;
confControlX = 1;
confControlY = 4;
if (clawVal == 40)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 40)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 40)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 40)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 40)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 40)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 40)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 40)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 40)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 2
if (kbState.IsKeyDown(Keys.D2))
{
confAssign = false;
confVal = 41;
confControlX = 2;
confControlY = 4;
if (clawVal == 41)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 41)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 41)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 41)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 41)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 41)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 41)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 41)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 41)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 3
if (kbState.IsKeyDown(Keys.D3))
{
confAssign = false;
confVal = 42;
confControlX = 3;
confControlY = 4;
if (clawVal == 42)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 42)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 42)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 42)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 42)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 42)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 42)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 42)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 42)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 4
if (kbState.IsKeyDown(Keys.D4))
{
confAssign = false;
confVal = 43;
confControlX = 4;
confControlY = 4;
if (clawVal == 43)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 43)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 43)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 43)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 43)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 43)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 43)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 43)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 43)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 5
if (kbState.IsKeyDown(Keys.D5))
{
confAssign = false;
confVal = 44;
confControlX = 5;
confControlY = 4;
if (clawVal == 44)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 44)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 44)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 44)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 44)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 44)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 44)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 44)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 44)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 6
if (kbState.IsKeyDown(Keys.D6))
{
confAssign = false;
confVal = 45;
confControlX = 6;
confControlY = 4;
if (clawVal == 45)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 45)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 45)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 45)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 45)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 45)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 45)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 45)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 45)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 7
if (kbState.IsKeyDown(Keys.D7))
{
confAssign = false;
confVal = 46;
confControlX = 7;
confControlY = 4;
if (clawVal == 46)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 46)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 46)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 46)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 46)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 46)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 46)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 46)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 46)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 8
if (kbState.IsKeyDown(Keys.D8))
{
confAssign = false;
confVal = 47;
confControlX = 8;
confControlY = 4;
if (clawVal == 47)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 47)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 47)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 47)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 47)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 47)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 47)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 47)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 47)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 9
if (kbState.IsKeyDown(Keys.D9))
{
confAssign = false;
confVal = 48;
confControlX = 9;
confControlY = 4;
if (clawVal == 48)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 48)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 48)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 48)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 48)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 48)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 48)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 48)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 48)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 6
#region Left
if (kbState.IsKeyDown(Keys.Left))
{
lastKeyLeft = true;
confAssign = false;
confVal = 49;
confControlX = 0;
jumpControlY = 5;
if (clawVal == 49)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 49)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 49)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 49)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 49)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 49)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 49)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 49)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 49)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Right
if (kbState.IsKeyDown(Keys.Right))
{
lastKeyRight = true;
confAssign = false;
confVal = 50;
confControlX = 1;
jumpControlY = 5;
if (clawVal == 50)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 50)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 50)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 50)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 50)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 50)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 50)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 50)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 50)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Up
if (kbState.IsKeyDown(Keys.Up))
{
lastKeyUp = true;
confAssign = false;
confVal = 51;
confControlX = 2;
jumpControlY = 5;
if (clawVal == 51)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 51)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 51)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 51)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 51)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 51)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 51)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 51)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 51)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Down
if (kbState.IsKeyDown(Keys.Down))
{
lastKeyDown = true;
confAssign = false;
confVal = 52;
confControlX = 3;
jumpControlY = 5;
if (clawVal == 52)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 52)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (jumpVal == 52)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swlVal == 52)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 52)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 52)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 52)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 52)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 52)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
}
#endregion
#region assign swl
if (swlAssign == true)
{
#region row 1
#region Tab
if (kbState.IsKeyDown(Keys.Tab))
{
swlAssign = false;
swlVal = 1;
swlControlX = 0;
swlControlY = 0;
if (clawVal == 1)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 1)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 1)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 1)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 1)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 1)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 1)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 1)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 1)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Q
if (kbState.IsKeyDown(Keys.Q))
{
swlAssign = false;
swlVal = 2;
swlControlX = 1;
swlControlY = 0;
if (clawVal == 2)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 2)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 2)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 2)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 2)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 2)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 2)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 2)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 2)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region W
if (kbState.IsKeyDown(Keys.W))
{
lastKeyUp = true;
swlAssign = false;
swlVal = 3;
swlControlX = 2;
swlControlY = 0;
if (clawVal == 3)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 3)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 3)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 3)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 3)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 3)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 3)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 3)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 3)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region E
if (kbState.IsKeyDown(Keys.E) && lastKeyC == false)
{
lastKeyC = true;
swlAssign = false;
swlVal = 4;
swlControlX = 3;
swlControlY = 0;
if (clawVal == 4)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 4)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 4)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 4)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 4)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 4)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 4)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 4)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 4)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region R
if (kbState.IsKeyDown(Keys.R))
{
swlAssign = false;
swlVal = 5;
swlControlX = 4;
swlControlY = 0;
if (clawVal == 5)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 5)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 5)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 5)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 5)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 5)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 5)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 5)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 5)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region T
if (kbState.IsKeyDown(Keys.T))
{
swlAssign = false;
swlVal = 6;
swlControlX = 5;
swlControlY = 0;
if (clawVal == 6)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 6)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 6)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 6)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 6)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 6)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 6)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 6)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 6)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Y
if (kbState.IsKeyDown(Keys.Y))
{
swlAssign = false;
swlVal = 7;
swlControlX = 6;
swlControlY = 0;
if (clawVal == 7)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 7)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 7)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 7)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 7)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 7)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 7)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 7)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 7)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region U
if (kbState.IsKeyDown(Keys.U))
{
swlAssign = false;
swlVal = 8;
swlControlX = 7;
swlControlY = 0;
if (clawVal == 8)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 8)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 8)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 8)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 8)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 8)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 8)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 8)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 8)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region I
if (kbState.IsKeyDown(Keys.I))
{
swlAssign = false;
swlVal = 9;
swlControlX = 8;
swlControlY = 0;
if (clawVal == 9)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 9)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 9)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 9)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 9)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 9)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 9)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 9)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 9)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region O
if (kbState.IsKeyDown(Keys.O))
{
swlAssign = false;
swlVal = 10;
swlControlX = 9;
swlControlY = 0;
if (clawVal == 10)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 10)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 10)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 10)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 10)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 10)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 10)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 10)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 10)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region P
if (kbState.IsKeyDown(Keys.P))
{
swlAssign = false;
swlVal = 11;
swlControlX = 10;
swlControlY = 0;
if (clawVal == 11)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 11)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 11)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 11)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 11)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 11)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 11)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 11)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 11)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region [
if (kbState.IsKeyDown(Keys.OemOpenBrackets))
{
swlAssign = false;
swlVal = 12;
swlControlX = 11;
swlControlY = 0;
if (clawVal == 12)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 12)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 12)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 12)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 12)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 12)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 12)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 12)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 12)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ]
if (kbState.IsKeyDown(Keys.OemCloseBrackets))
{
swlAssign = false;
swlVal = 13;
swlControlX = 12;
swlControlY = 0;
if (clawVal == 13)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 13)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 13)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 13)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 13)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 13)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 13)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 13)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 13)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region \
if (kbState.IsKeyDown(Keys.OemBackslash))
{
swlAssign = false;
swlVal = 14;
jumpControlX = 13;
swlControlY = 0;
if (clawVal == 14)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 14)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 14)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 14)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 14)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 14)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 14)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 14)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 14)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 2
#region A
if (kbState.IsKeyDown(Keys.A))
{
lastKeyLeft = true;
swlAssign = false;
swlVal = 15;
swlControlX = 0;
swlControlY = 1;
if (clawVal == 15)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 15)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 15)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 15)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 15)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 15)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 15)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 15)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 15)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region S
if (kbState.IsKeyDown(Keys.S))
{
lastKeyDown = true;
swlAssign = false;
swlVal = 16;
swlControlX = 1;
swlControlY = 1;
if (clawVal == 16)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 16)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 16)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 16)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 16)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 16)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 16)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 16)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 16)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region D
if (kbState.IsKeyDown(Keys.D))
{
lastKeyRight = true;
swlAssign = false;
swlVal = 17;
swlControlX = 2;
swlControlY = 1;
if (clawVal == 17)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 17)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 17)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 17)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 17)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 17)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 17)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 17)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 17)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region F
if (kbState.IsKeyDown(Keys.F))
{
swlAssign = false;
swlVal = 18;
swlControlX = 3;
swlControlY = 1;
if (clawVal == 18)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 18)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 18)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 18)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 18)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 18)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 18)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 18)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 18)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region G
if (kbState.IsKeyDown(Keys.G))
{
swlAssign = false;
swlVal = 19;
swlControlX = 4;
swlControlY = 1;
if (clawVal == 19)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 19)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 19)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 19)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 19)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 19)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 19)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 19)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 19)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region H
if (kbState.IsKeyDown(Keys.H))
{
swlAssign = false;
swlVal = 20;
swlControlX = 5;
swlControlY = 1;
if (clawVal == 20)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 20)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 20)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 20)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 20)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 20)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 20)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 20)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 20)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region J
if (kbState.IsKeyDown(Keys.J))
{
swlAssign = false;
swlVal = 21;
swlControlX = 6;
swlControlY = 1;
if (clawVal == 21)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 21)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 21)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 21)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 21)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 21)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 21)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 21)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 21)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region K
if (kbState.IsKeyDown(Keys.K))
{
swlAssign = false;
swlVal = 22;
swlControlX = 7;
swlControlY = 1;
if (clawVal == 22)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 22)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 22)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 22)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 22)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 22)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 22)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 22)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 22)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region L
if (kbState.IsKeyDown(Keys.L))
{
swlAssign = false;
swlVal = 23;
swlControlX = 8;
swlControlY = 1;
if (clawVal == 23)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 23)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 23)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 23)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 23)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 23)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 23)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 23)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 23)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ;
if (kbState.IsKeyDown(Keys.OemSemicolon))
{
swlAssign = false;
swlVal = 24;
swlControlX = 9;
swlControlY = 1;
if (clawVal == 24)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 24)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 24)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 24)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 24)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 24)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 24)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 24)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 24)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region '
if (kbState.IsKeyDown(Keys.OemQuotes))
{
swlAssign = false;
swlVal = 25;
swlControlX = 10;
swlControlY = 1;
if (clawVal == 25)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 25)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 25)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 25)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 25)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 25)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 25)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 25)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 25)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 3
#region Z
if (kbState.IsKeyDown(Keys.Z))
{
swlAssign = false;
swlVal = 26;
swlControlX = 0;
swlControlY = 2;
if (clawVal == 26)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 26)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 26)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 26)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 26)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 26)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 26)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 26)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 26)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region X
if (kbState.IsKeyDown(Keys.X))
{
lastKeyX = true;
swlAssign = false;
swlVal = 27;
swlControlX = 1;
swlControlY = 2;
if (clawVal == 27)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 27)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 27)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 27)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 27)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 27)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 27)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 27)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 27)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region C
if (kbState.IsKeyDown(Keys.C) && lastKeyC == false)
{
lastKeyC = true;
swlAssign = false;
swlVal = 28;
swlControlX = 2;
swlControlY = 2;
if (clawVal == 28)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 28)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 28)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 28)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 28)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 28)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 28)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 28)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 28)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region V
if (kbState.IsKeyDown(Keys.V))
{
swlAssign = false;
swlVal = 29;
swlControlX = 3;
swlControlY = 2;
if (clawVal == 29)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 29)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 29)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 29)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 29)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 29)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 29)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 29)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 29)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region B
if (kbState.IsKeyDown(Keys.B))
{
swlAssign = false;
swlVal = 30;
swlControlX = 4;
swlControlY = 2;
if (clawVal == 30)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 30)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 30)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 30)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 30)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 30)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 30)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 30)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 30)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region N
if (kbState.IsKeyDown(Keys.N))
{
swlAssign = false;
swlVal = 31;
swlControlX = 5;
swlControlY = 2;
if (clawVal == 31)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 31)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 31)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 31)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 31)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 31)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 31)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 31)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 31)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region M
if (kbState.IsKeyDown(Keys.M))
{
swlAssign = false;
swlVal = 32;
swlControlX = 6;
swlControlY = 2;
if (clawVal == 32)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 32)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 32)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 32)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 32)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 32)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 32)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 32)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 32)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ,
if (kbState.IsKeyDown(Keys.OemComma))
{
swlAssign = false;
swlVal = 33;
swlControlX = 7;
swlControlY = 2;
if (clawVal == 33)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 33)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 33)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 33)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 33)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 33)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 33)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 33)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 33)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region .
if (kbState.IsKeyDown(Keys.OemPeriod))
{
swlAssign = false;
swlVal = 34;
swlControlX = 8;
swlControlY = 2;
if (clawVal == 34)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 34)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 34)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 34)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 34)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 34)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 34)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 34)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 34)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region /
if (kbState.IsKeyDown(Keys.OemQuestion))
{
swlAssign = false;
swlVal = 35;
swlControlX = 9;
swlControlY = 2;
if (clawVal == 35)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 35)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 35)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 35)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 35)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 35)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 35)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 35)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 35)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 4
#region Shift
if (kbState.IsKeyDown(Keys.LeftShift) ||
kbState.IsKeyDown(Keys.RightShift))
{
swlAssign = false;
swlVal = 36;
swlControlX = 0;
swlControlY = 3;
if (clawVal == 36)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 36)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 36)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 36)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 36)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 36)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 36)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 36)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 36)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Control
if (kbState.IsKeyDown(Keys.LeftControl) ||
kbState.IsKeyDown(Keys.RightControl))
{
swlAssign = false;
swlVal = 37;
swlControlX = 1;
swlControlY = 3;
if (clawVal == 37)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 37)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 37)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 37)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 37)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 37)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 37)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 37)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 37)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Space
if (kbState.IsKeyDown(Keys.Space))
{
lastKeyX = true;
swlAssign = false;
swlVal = 38;
swlControlX = 2;
swlControlY = 3;
if (clawVal == 38)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 38)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 38)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 38)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 38)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 38)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 38)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 38)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 38)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 5
#region 0
if (kbState.IsKeyDown(Keys.D0))
{
swlAssign = false;
swlVal = 39;
swlControlX = 0;
swlControlY = 4;
if (clawVal == 39)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 39)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 39)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 39)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 39)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 39)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 39)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 39)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 39)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 1
if (kbState.IsKeyDown(Keys.D1))
{
swlAssign = false;
swlVal = 40;
swlControlX = 1;
swlControlY = 4;
if (clawVal == 40)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 40)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 40)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 40)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 40)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 40)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 40)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 40)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 40)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 2
if (kbState.IsKeyDown(Keys.D2))
{
swlAssign = false;
swlVal = 41;
swlControlX = 2;
swlControlY = 4;
if (clawVal == 41)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 41)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 41)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 41)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 41)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 41)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 41)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 41)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 41)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 3
if (kbState.IsKeyDown(Keys.D3))
{
swlAssign = false;
swlVal = 42;
swlControlX = 3;
swlControlY = 4;
if (clawVal == 42)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 42)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 42)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 42)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 42)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 42)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 42)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 42)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 42)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 4
if (kbState.IsKeyDown(Keys.D4))
{
swlAssign = false;
swlVal = 43;
swlControlX = 4;
swlControlY = 4;
if (clawVal == 43)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 43)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 43)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 43)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 43)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 43)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 43)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 43)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 43)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 5
if (kbState.IsKeyDown(Keys.D5))
{
swlAssign = false;
swlVal = 44;
swlControlX = 5;
swlControlY = 4;
if (clawVal == 44)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 44)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 44)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 44)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 44)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 44)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 44)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 44)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 44)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 6
if (kbState.IsKeyDown(Keys.D6))
{
swlAssign = false;
swlVal = 45;
swlControlX = 6;
swlControlY = 4;
if (clawVal == 45)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 45)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 45)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 45)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 45)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 45)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 45)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 45)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 45)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 7
if (kbState.IsKeyDown(Keys.D7))
{
swlAssign = false;
swlVal = 46;
swlControlX = 7;
swlControlY = 4;
if (clawVal == 46)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 46)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 46)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 46)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 46)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 46)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 46)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 46)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 46)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 8
if (kbState.IsKeyDown(Keys.D8))
{
swlAssign = false;
swlVal = 47;
swlControlX = 8;
swlControlY = 4;
if (clawVal == 47)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 47)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 47)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 47)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 47)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 47)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 47)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 47)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 47)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 9
if (kbState.IsKeyDown(Keys.D9))
{
swlAssign = false;
swlVal = 48;
swlControlX = 9;
swlControlY = 4;
if (clawVal == 48)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 48)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 48)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 48)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 48)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 48)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 48)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 48)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 48)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 6
#region Left
if (kbState.IsKeyDown(Keys.Left))
{
lastKeyLeft = true;
swlAssign = false;
swlVal = 49;
swlControlX = 0;
jumpControlY = 5;
if (clawVal == 49)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 49)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 49)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 49)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 49)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 49)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 49)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 49)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 49)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Right
if (kbState.IsKeyDown(Keys.Right))
{
lastKeyRight = true;
swlAssign = false;
swlVal = 50;
swlControlX = 1;
jumpControlY = 5;
if (clawVal == 50)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 50)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 50)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 50)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 50)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 50)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 50)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 50)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 50)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Up
if (kbState.IsKeyDown(Keys.Up))
{
lastKeyUp = true;
swlAssign = false;
swlVal = 51;
swlControlX = 2;
jumpControlY = 5;
if (clawVal == 51)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 51)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 51)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 51)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 51)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 51)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 51)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 51)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 51)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Down
if (kbState.IsKeyDown(Keys.Down))
{
lastKeyDown = true;
swlAssign = false;
swlVal = 52;
swlControlX = 3;
jumpControlY = 5;
if (clawVal == 52)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 52)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 52)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (jumpVal == 52)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (swrVal == 52)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 52)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 52)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 52)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 52)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
}
#endregion
#region assign swr
if (swrAssign == true)
{
#region row 1
#region Tab
if (kbState.IsKeyDown(Keys.Tab))
{
swrAssign = false;
swrVal = 1;
swrControlX = 0;
swrControlY = 0;
if (clawVal == 1)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 1)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 1)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 1)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 1)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 1)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 1)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 1)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 1)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Q
if (kbState.IsKeyDown(Keys.Q))
{
swrAssign = false;
swrVal = 2;
swrControlX = 1;
swrControlY = 0;
if (clawVal == 2)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 2)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 2)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 2)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 2)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 2)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 2)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 2)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 2)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region W
if (kbState.IsKeyDown(Keys.W))
{
lastKeyUp = true;
swrAssign = false;
swrVal = 3;
swrControlX = 2;
swrControlY = 0;
if (clawVal == 3)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 3)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 3)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 3)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 3)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 3)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 3)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 3)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 3)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region E
if (kbState.IsKeyDown(Keys.E) && lastKeyC == false)
{
lastKeyC = true;
swrAssign = false;
swrVal = 4;
swrControlX = 3;
swrControlY = 0;
if (clawVal == 4)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 4)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 4)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 4)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 4)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 4)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 4)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 4)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 4)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region R
if (kbState.IsKeyDown(Keys.R))
{
swrAssign = false;
swrVal = 5;
swrControlX = 4;
swrControlY = 0;
if (clawVal == 5)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 5)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 5)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 5)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 5)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 5)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 5)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 5)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 5)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region T
if (kbState.IsKeyDown(Keys.T))
{
swrAssign = false;
swrVal = 6;
swrControlX = 5;
swrControlY = 0;
if (clawVal == 6)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 6)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 6)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 6)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 6)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 6)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 6)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 6)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 6)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Y
if (kbState.IsKeyDown(Keys.Y))
{
swrAssign = false;
swrVal = 7;
swrControlX = 6;
swrControlY = 0;
if (clawVal == 7)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 7)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 7)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 7)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 7)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 7)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 7)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 7)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 7)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region U
if (kbState.IsKeyDown(Keys.U))
{
swrAssign = false;
swrVal = 8;
swrControlX = 7;
swrControlY = 0;
if (clawVal == 8)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 8)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 8)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 8)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 8)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 8)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 8)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 8)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 8)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region I
if (kbState.IsKeyDown(Keys.I))
{
swrAssign = false;
swrVal = 9;
swrControlX = 8;
swrControlY = 0;
if (clawVal == 9)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 9)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 9)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 9)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 9)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 9)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 9)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 9)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 9)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region O
if (kbState.IsKeyDown(Keys.O))
{
swrAssign = false;
swrVal = 10;
swrControlX = 9;
swrControlY = 0;
if (clawVal == 10)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 10)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 10)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 10)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 10)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 10)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 10)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 10)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 10)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region P
if (kbState.IsKeyDown(Keys.P))
{
swrAssign = false;
swrVal = 11;
swrControlX = 10;
swrControlY = 0;
if (clawVal == 11)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 11)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 11)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 11)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 11)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 11)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 11)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 11)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 11)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region [
if (kbState.IsKeyDown(Keys.OemOpenBrackets))
{
swrAssign = false;
swrVal = 12;
swrControlX = 11;
swrControlY = 0;
if (clawVal == 12)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 12)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 12)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 12)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 12)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 12)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 12)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 12)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 12)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ]
if (kbState.IsKeyDown(Keys.OemCloseBrackets))
{
swrAssign = false;
swrVal = 13;
swrControlX = 12;
swrControlY = 0;
if (clawVal == 13)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 13)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 13)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 13)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 13)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 13)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 13)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 13)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 13)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region \
if (kbState.IsKeyDown(Keys.OemBackslash))
{
swrAssign = false;
swrVal = 14;
jumpControlX = 13;
swrControlY = 0;
if (clawVal == 14)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 14)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 14)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 14)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 14)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 14)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 14)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 14)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 14)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 2
#region A
if (kbState.IsKeyDown(Keys.A))
{
lastKeyLeft = true;
swrAssign = false;
swrVal = 15;
swrControlX = 0;
swrControlY = 1;
if (clawVal == 15)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 15)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 15)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 15)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 15)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 15)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 15)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 15)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 15)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region S
if (kbState.IsKeyDown(Keys.S))
{
lastKeyDown = true;
swrAssign = false;
swrVal = 16;
swrControlX = 1;
swrControlY = 1;
if (clawVal == 16)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 16)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 16)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 16)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 16)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 16)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 16)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 16)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 16)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region D
if (kbState.IsKeyDown(Keys.D))
{
lastKeyRight = true;
swrAssign = false;
swrVal = 17;
swrControlX = 2;
swrControlY = 1;
if (clawVal == 17)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 17)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 17)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 17)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 17)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 17)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 17)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 17)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 17)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region F
if (kbState.IsKeyDown(Keys.F))
{
swrAssign = false;
swrVal = 18;
swrControlX = 3;
swrControlY = 1;
if (clawVal == 18)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 18)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 18)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 18)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 18)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 18)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 18)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 18)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 18)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region G
if (kbState.IsKeyDown(Keys.G))
{
swrAssign = false;
swrVal = 19;
swrControlX = 4;
swrControlY = 1;
if (clawVal == 19)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 19)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 19)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 19)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 19)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 19)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 19)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 19)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 19)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region H
if (kbState.IsKeyDown(Keys.H))
{
swrAssign = false;
swrVal = 20;
swrControlX = 5;
swrControlY = 1;
if (clawVal == 20)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 20)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 20)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 20)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 20)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 20)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 20)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 20)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 20)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region J
if (kbState.IsKeyDown(Keys.J))
{
swrAssign = false;
swrVal = 21;
swrControlX = 6;
swrControlY = 1;
if (clawVal == 21)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 21)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 21)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 21)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 21)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 21)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 21)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 21)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 21)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region K
if (kbState.IsKeyDown(Keys.K))
{
swrAssign = false;
swrVal = 22;
swrControlX = 7;
swrControlY = 1;
if (clawVal == 22)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 22)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 22)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 22)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 22)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 22)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 22)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 22)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 22)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region L
if (kbState.IsKeyDown(Keys.L))
{
swrAssign = false;
swrVal = 23;
swrControlX = 8;
swrControlY = 1;
if (clawVal == 23)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 23)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 23)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 23)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 23)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 23)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 23)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 23)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 23)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ;
if (kbState.IsKeyDown(Keys.OemSemicolon))
{
swrAssign = false;
swrVal = 24;
swrControlX = 9;
swrControlY = 1;
if (clawVal == 24)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 24)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 24)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 24)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 24)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 24)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 24)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 24)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 24)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region '
if (kbState.IsKeyDown(Keys.OemQuotes))
{
swrAssign = false;
swrVal = 25;
swrControlX = 10;
swrControlY = 1;
if (clawVal == 25)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 25)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 25)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 25)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 25)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 25)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 25)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 25)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 25)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 3
#region Z
if (kbState.IsKeyDown(Keys.Z))
{
swrAssign = false;
swrVal = 26;
swrControlX = 0;
swrControlY = 2;
if (clawVal == 26)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 26)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 26)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 26)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 26)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 26)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 26)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 26)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 26)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region X
if (kbState.IsKeyDown(Keys.X))
{
lastKeyX = true;
swrAssign = false;
swrVal = 27;
swrControlX = 1;
swrControlY = 2;
if (clawVal == 27)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 27)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 27)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 27)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 27)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 27)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 27)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 27)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 27)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region C
if (kbState.IsKeyDown(Keys.C) && lastKeyC == false)
{
lastKeyC = true;
swrAssign = false;
swrVal = 28;
swrControlX = 2;
swrControlY = 2;
if (clawVal == 28)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 28)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 28)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 28)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 28)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 28)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 28)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 28)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 28)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region V
if (kbState.IsKeyDown(Keys.V))
{
swrAssign = false;
swrVal = 29;
swrControlX = 3;
swrControlY = 2;
if (clawVal == 29)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 29)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 29)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 29)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 29)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 29)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 29)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 29)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 29)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region B
if (kbState.IsKeyDown(Keys.B))
{
swrAssign = false;
swrVal = 30;
swrControlX = 4;
swrControlY = 2;
if (clawVal == 30)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 30)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 30)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 30)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 30)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 30)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 30)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 30)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 30)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region N
if (kbState.IsKeyDown(Keys.N))
{
swrAssign = false;
swrVal = 31;
swrControlX = 5;
swrControlY = 2;
if (clawVal == 31)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 31)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 31)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 31)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 31)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 31)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 31)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 31)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 31)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region M
if (kbState.IsKeyDown(Keys.M))
{
swrAssign = false;
swrVal = 32;
swrControlX = 6;
swrControlY = 2;
if (clawVal == 32)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 32)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 32)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 32)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 32)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 32)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 32)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 32)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 32)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ,
if (kbState.IsKeyDown(Keys.OemComma))
{
swrAssign = false;
swrVal = 33;
swrControlX = 7;
swrControlY = 2;
if (clawVal == 33)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 33)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 33)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 33)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 33)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 33)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 33)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 33)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 33)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region .
if (kbState.IsKeyDown(Keys.OemPeriod))
{
swrAssign = false;
swrVal = 34;
swrControlX = 8;
swrControlY = 2;
if (clawVal == 34)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 34)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 34)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 34)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 34)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 34)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 34)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 34)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 34)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region /
if (kbState.IsKeyDown(Keys.OemQuestion))
{
swrAssign = false;
swrVal = 35;
swrControlX = 9;
swrControlY = 2;
if (clawVal == 35)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 35)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 35)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 35)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 35)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 35)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 35)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 35)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 35)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 4
#region Shift
if (kbState.IsKeyDown(Keys.LeftShift) ||
kbState.IsKeyDown(Keys.RightShift))
{
swrAssign = false;
swrVal = 36;
swrControlX = 0;
swrControlY = 3;
if (clawVal == 36)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 36)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 36)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 36)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 36)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 36)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 36)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 36)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 36)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Control
if (kbState.IsKeyDown(Keys.LeftControl) ||
kbState.IsKeyDown(Keys.RightControl))
{
swrAssign = false;
swrVal = 37;
swrControlX = 1;
swrControlY = 3;
if (clawVal == 37)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 37)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 37)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 37)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 37)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 37)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 37)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 37)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 37)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Space
if (kbState.IsKeyDown(Keys.Space))
{
lastKeyX = true;
swrAssign = false;
swrVal = 38;
swrControlX = 2;
swrControlY = 3;
if (clawVal == 38)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 38)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 38)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 38)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 38)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 38)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 38)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 38)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 38)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 5
#region 0
if (kbState.IsKeyDown(Keys.D0))
{
swrAssign = false;
swrVal = 39;
swrControlX = 0;
swrControlY = 4;
if (clawVal == 39)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 39)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 39)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 39)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 39)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 39)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 39)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 39)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 39)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 1
if (kbState.IsKeyDown(Keys.D1))
{
swrAssign = false;
swrVal = 40;
swrControlX = 1;
swrControlY = 4;
if (clawVal == 40)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 40)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 40)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 40)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 40)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 40)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 40)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 40)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 40)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 2
if (kbState.IsKeyDown(Keys.D2))
{
swrAssign = false;
swrVal = 41;
swrControlX = 2;
swrControlY = 4;
if (clawVal == 41)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 41)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 41)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 41)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 41)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 41)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 41)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 41)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 41)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 3
if (kbState.IsKeyDown(Keys.D3))
{
swrAssign = false;
swrVal = 42;
swrControlX = 3;
swrControlY = 4;
if (clawVal == 42)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 42)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 42)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 42)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 42)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 42)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 42)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 42)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 42)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 4
if (kbState.IsKeyDown(Keys.D4))
{
swrAssign = false;
swrVal = 43;
swrControlX = 4;
swrControlY = 4;
if (clawVal == 43)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 43)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 43)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 43)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 43)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 43)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 43)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 43)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 43)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 5
if (kbState.IsKeyDown(Keys.D5))
{
swrAssign = false;
swrVal = 44;
swrControlX = 5;
swrControlY = 4;
if (clawVal == 44)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 44)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 44)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 44)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 44)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 44)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 44)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 44)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 44)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 6
if (kbState.IsKeyDown(Keys.D6))
{
swrAssign = false;
swrVal = 45;
swrControlX = 6;
swrControlY = 4;
if (clawVal == 45)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 45)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 45)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 45)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 45)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 45)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 45)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 45)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 45)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 7
if (kbState.IsKeyDown(Keys.D7))
{
swrAssign = false;
swrVal = 46;
swrControlX = 7;
swrControlY = 4;
if (clawVal == 46)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 46)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 46)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 46)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 46)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 46)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 46)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 46)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 46)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 8
if (kbState.IsKeyDown(Keys.D8))
{
swrAssign = false;
swrVal = 47;
swrControlX = 8;
swrControlY = 4;
if (clawVal == 47)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 47)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 47)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 47)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 47)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 47)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 47)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 47)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 47)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 9
if (kbState.IsKeyDown(Keys.D9))
{
swrAssign = false;
swrVal = 48;
swrControlX = 9;
swrControlY = 4;
if (clawVal == 48)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 48)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 48)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 48)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 48)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 48)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 48)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 48)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 48)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 6
#region Left
if (kbState.IsKeyDown(Keys.Left))
{
lastKeyLeft = true;
swrAssign = false;
swrVal = 49;
swrControlX = 0;
jumpControlY = 5;
if (clawVal == 49)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 49)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 49)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 49)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 49)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 49)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 49)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 49)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 49)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Right
if (kbState.IsKeyDown(Keys.Right))
{
lastKeyRight = true;
swrAssign = false;
swrVal = 50;
swrControlX = 1;
jumpControlY = 5;
if (clawVal == 50)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 50)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 50)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 50)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 50)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 50)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 50)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 50)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 50)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Up
if (kbState.IsKeyDown(Keys.Up))
{
lastKeyUp = true;
swrAssign = false;
swrVal = 51;
swrControlX = 2;
jumpControlY = 5;
if (clawVal == 51)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 51)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 51)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 51)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 51)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 51)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 51)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 51)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 51)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Down
if (kbState.IsKeyDown(Keys.Down))
{
lastKeyDown = true;
swrAssign = false;
swrVal = 52;
swrControlX = 3;
jumpControlY = 5;
if (clawVal == 52)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 52)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 52)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 52)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (jumpVal == 52)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (leftVal == 52)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 52)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 52)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 52)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
}
#endregion
#region assign left
if (leftAssign == true)
{
#region row 1
#region Tab
if (kbState.IsKeyDown(Keys.Tab))
{
leftAssign = false;
leftVal = 1;
leftControlX = 0;
leftControlY = 0;
if (clawVal == 1)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 1)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 1)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 1)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 1)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 1)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 1)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 1)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 1)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Q
if (kbState.IsKeyDown(Keys.Q))
{
leftAssign = false;
leftVal = 2;
leftControlX = 1;
leftControlY = 0;
if (clawVal == 2)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 2)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 2)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 2)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 2)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 2)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 2)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 2)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 2)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region W
if (kbState.IsKeyDown(Keys.W))
{
lastKeyUp = true;
leftAssign = false;
leftVal = 3;
leftControlX = 2;
leftControlY = 0;
if (clawVal == 3)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 3)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 3)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 3)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 3)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 3)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 3)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 3)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 3)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region E
if (kbState.IsKeyDown(Keys.E) && lastKeyC == false)
{
lastKeyC = true;
leftAssign = false;
leftVal = 4;
leftControlX = 3;
leftControlY = 0;
if (clawVal == 4)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 4)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 4)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 4)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 4)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 4)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 4)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 4)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 4)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region R
if (kbState.IsKeyDown(Keys.R))
{
leftAssign = false;
leftVal = 5;
leftControlX = 4;
leftControlY = 0;
if (clawVal == 5)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 5)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 5)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 5)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 5)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 5)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 5)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 5)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 5)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region T
if (kbState.IsKeyDown(Keys.T))
{
leftAssign = false;
leftVal = 6;
leftControlX = 5;
leftControlY = 0;
if (clawVal == 6)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 6)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 6)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 6)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 6)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 6)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 6)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 6)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 6)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Y
if (kbState.IsKeyDown(Keys.Y))
{
leftAssign = false;
leftVal = 7;
leftControlX = 6;
leftControlY = 0;
if (clawVal == 7)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 7)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 7)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 7)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 7)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 7)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 7)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 7)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 7)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region U
if (kbState.IsKeyDown(Keys.U))
{
leftAssign = false;
leftVal = 8;
leftControlX = 7;
leftControlY = 0;
if (clawVal == 8)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 8)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 8)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 8)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 8)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 8)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 8)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 8)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 8)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region I
if (kbState.IsKeyDown(Keys.I))
{
leftAssign = false;
leftVal = 9;
leftControlX = 8;
leftControlY = 0;
if (clawVal == 9)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 9)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 9)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 9)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 9)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 9)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 9)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 9)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 9)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region O
if (kbState.IsKeyDown(Keys.O))
{
leftAssign = false;
leftVal = 10;
leftControlX = 9;
leftControlY = 0;
if (clawVal == 10)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 10)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 10)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 10)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 10)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 10)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 10)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 10)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 10)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region P
if (kbState.IsKeyDown(Keys.P))
{
leftAssign = false;
leftVal = 11;
leftControlX = 10;
leftControlY = 0;
if (clawVal == 11)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 11)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 11)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 11)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 11)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 11)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 11)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 11)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 11)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region [
if (kbState.IsKeyDown(Keys.OemOpenBrackets))
{
leftAssign = false;
leftVal = 12;
leftControlX = 11;
leftControlY = 0;
if (clawVal == 12)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 12)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 12)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 12)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 12)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 12)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 12)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 12)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 12)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ]
if (kbState.IsKeyDown(Keys.OemCloseBrackets))
{
leftAssign = false;
leftVal = 13;
leftControlX = 12;
leftControlY = 0;
if (clawVal == 13)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 13)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 13)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 13)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 13)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 13)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 13)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 13)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 13)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region \
if (kbState.IsKeyDown(Keys.OemBackslash))
{
leftAssign = false;
leftVal = 14;
jumpControlX = 13;
leftControlY = 0;
if (clawVal == 14)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 14)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 14)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 14)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 14)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 14)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 14)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 14)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 14)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 2
#region A
if (kbState.IsKeyDown(Keys.A))
{
lastKeyLeft = true;
leftAssign = false;
leftVal = 15;
leftControlX = 0;
leftControlY = 1;
if (clawVal == 15)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 15)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 15)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 15)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 15)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 15)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 15)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 15)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 15)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region S
if (kbState.IsKeyDown(Keys.S))
{
lastKeyDown = true;
leftAssign = false;
leftVal = 16;
leftControlX = 1;
leftControlY = 1;
if (clawVal == 16)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 16)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 16)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 16)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 16)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 16)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 16)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 16)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 16)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region D
if (kbState.IsKeyDown(Keys.D))
{
lastKeyRight = true;
leftAssign = false;
leftVal = 17;
leftControlX = 2;
leftControlY = 1;
if (clawVal == 17)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 17)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 17)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 17)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 17)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 17)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 17)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 17)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 17)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region F
if (kbState.IsKeyDown(Keys.F))
{
leftAssign = false;
leftVal = 18;
leftControlX = 3;
leftControlY = 1;
if (clawVal == 18)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 18)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 18)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 18)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 18)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 18)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 18)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 18)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 18)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region G
if (kbState.IsKeyDown(Keys.G))
{
leftAssign = false;
leftVal = 19;
leftControlX = 4;
leftControlY = 1;
if (clawVal == 19)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 19)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 19)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 19)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 19)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 19)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 19)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 19)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 19)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region H
if (kbState.IsKeyDown(Keys.H))
{
leftAssign = false;
leftVal = 20;
leftControlX = 5;
leftControlY = 1;
if (clawVal == 20)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 20)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 20)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 20)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 20)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 20)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 20)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 20)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 20)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region J
if (kbState.IsKeyDown(Keys.J))
{
leftAssign = false;
leftVal = 21;
leftControlX = 6;
leftControlY = 1;
if (clawVal == 21)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 21)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 21)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 21)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 21)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 21)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 21)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 21)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 21)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region K
if (kbState.IsKeyDown(Keys.K))
{
leftAssign = false;
leftVal = 22;
leftControlX = 7;
leftControlY = 1;
if (clawVal == 22)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 22)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 22)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 22)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 22)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 22)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 22)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 22)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 22)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region L
if (kbState.IsKeyDown(Keys.L))
{
leftAssign = false;
leftVal = 23;
leftControlX = 8;
leftControlY = 1;
if (clawVal == 23)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 23)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 23)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 23)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 23)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 23)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 23)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 23)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 23)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ;
if (kbState.IsKeyDown(Keys.OemSemicolon))
{
leftAssign = false;
leftVal = 24;
leftControlX = 9;
leftControlY = 1;
if (clawVal == 24)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 24)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 24)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 24)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 24)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 24)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 24)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 24)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 24)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region '
if (kbState.IsKeyDown(Keys.OemQuotes))
{
leftAssign = false;
leftVal = 25;
leftControlX = 10;
leftControlY = 1;
if (clawVal == 25)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 25)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 25)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 25)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 25)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 25)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 25)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 25)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 25)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 3
#region Z
if (kbState.IsKeyDown(Keys.Z))
{
leftAssign = false;
leftVal = 26;
leftControlX = 0;
leftControlY = 2;
if (clawVal == 26)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 26)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 26)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 26)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 26)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 26)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 26)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 26)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 26)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region X
if (kbState.IsKeyDown(Keys.X))
{
lastKeyX = true;
leftAssign = false;
leftVal = 27;
leftControlX = 1;
leftControlY = 2;
if (clawVal == 27)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 27)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 27)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 27)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 27)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 27)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 27)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 27)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 27)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region C
if (kbState.IsKeyDown(Keys.C) && lastKeyC == false)
{
lastKeyC = true;
leftAssign = false;
leftVal = 28;
leftControlX = 2;
leftControlY = 2;
if (clawVal == 28)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 28)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 28)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 28)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 28)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 28)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 28)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 28)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 28)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region V
if (kbState.IsKeyDown(Keys.V))
{
leftAssign = false;
leftVal = 29;
leftControlX = 3;
leftControlY = 2;
if (clawVal == 29)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 29)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 29)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 29)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 29)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 29)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 29)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 29)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 29)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region B
if (kbState.IsKeyDown(Keys.B))
{
leftAssign = false;
leftVal = 30;
leftControlX = 4;
leftControlY = 2;
if (clawVal == 30)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 30)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 30)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 30)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 30)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 30)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 30)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 30)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 30)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region N
if (kbState.IsKeyDown(Keys.N))
{
leftAssign = false;
leftVal = 31;
leftControlX = 5;
leftControlY = 2;
if (clawVal == 31)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 31)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 31)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 31)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 31)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 31)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 31)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 31)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 31)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region M
if (kbState.IsKeyDown(Keys.M))
{
leftAssign = false;
leftVal = 32;
leftControlX = 6;
leftControlY = 2;
if (clawVal == 32)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 32)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 32)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 32)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 32)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 32)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 32)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 32)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 32)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ,
if (kbState.IsKeyDown(Keys.OemComma))
{
leftAssign = false;
leftVal = 33;
leftControlX = 7;
leftControlY = 2;
if (clawVal == 33)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 33)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 33)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 33)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 33)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 33)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 33)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 33)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 33)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region .
if (kbState.IsKeyDown(Keys.OemPeriod))
{
leftAssign = false;
leftVal = 34;
leftControlX = 8;
leftControlY = 2;
if (clawVal == 34)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 34)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 34)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 34)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 34)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 34)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 34)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 34)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 34)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region /
if (kbState.IsKeyDown(Keys.OemQuestion))
{
leftAssign = false;
leftVal = 35;
leftControlX = 9;
leftControlY = 2;
if (clawVal == 35)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 35)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 35)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 35)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 35)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 35)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 35)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 35)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 35)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 4
#region Shift
if (kbState.IsKeyDown(Keys.LeftShift) ||
kbState.IsKeyDown(Keys.RightShift))
{
leftAssign = false;
leftVal = 36;
leftControlX = 0;
leftControlY = 3;
if (clawVal == 36)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 36)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 36)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 36)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 36)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 36)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 36)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 36)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 36)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Control
if (kbState.IsKeyDown(Keys.LeftControl) ||
kbState.IsKeyDown(Keys.RightControl))
{
leftAssign = false;
leftVal = 37;
leftControlX = 1;
leftControlY = 3;
if (clawVal == 37)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 37)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 37)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 37)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 37)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 37)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 37)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 37)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 37)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Space
if (kbState.IsKeyDown(Keys.Space))
{
lastKeyX = true;
leftAssign = false;
leftVal = 38;
leftControlX = 2;
leftControlY = 3;
if (clawVal == 38)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 38)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 38)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 38)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 38)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 38)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 38)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 38)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 38)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 5
#region 0
if (kbState.IsKeyDown(Keys.D0))
{
leftAssign = false;
leftVal = 39;
leftControlX = 0;
leftControlY = 4;
if (clawVal == 39)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 39)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 39)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 39)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 39)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 39)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 39)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 39)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 39)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 1
if (kbState.IsKeyDown(Keys.D1))
{
leftAssign = false;
leftVal = 40;
leftControlX = 1;
leftControlY = 4;
if (clawVal == 40)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 40)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 40)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 40)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 40)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 40)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 40)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 40)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 40)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 2
if (kbState.IsKeyDown(Keys.D2))
{
leftAssign = false;
leftVal = 41;
leftControlX = 2;
leftControlY = 4;
if (clawVal == 41)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 41)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 41)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 41)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 41)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 41)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 41)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 41)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 41)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 3
if (kbState.IsKeyDown(Keys.D3))
{
leftAssign = false;
leftVal = 42;
leftControlX = 3;
leftControlY = 4;
if (clawVal == 42)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 42)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 42)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 42)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 42)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 42)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 42)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 42)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 42)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 4
if (kbState.IsKeyDown(Keys.D4))
{
leftAssign = false;
leftVal = 43;
leftControlX = 4;
leftControlY = 4;
if (clawVal == 43)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 43)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 43)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 43)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 43)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 43)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 43)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 43)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 43)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 5
if (kbState.IsKeyDown(Keys.D5))
{
leftAssign = false;
leftVal = 44;
leftControlX = 5;
leftControlY = 4;
if (clawVal == 44)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 44)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 44)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 44)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 44)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 44)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 44)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 44)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 44)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 6
if (kbState.IsKeyDown(Keys.D6))
{
leftAssign = false;
leftVal = 45;
leftControlX = 6;
leftControlY = 4;
if (clawVal == 45)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 45)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 45)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 45)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 45)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 45)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 45)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 45)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 45)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 7
if (kbState.IsKeyDown(Keys.D7))
{
leftAssign = false;
leftVal = 46;
leftControlX = 7;
leftControlY = 4;
if (clawVal == 46)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 46)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 46)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 46)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 46)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 46)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 46)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 46)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 46)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 8
if (kbState.IsKeyDown(Keys.D8))
{
leftAssign = false;
leftVal = 47;
leftControlX = 8;
leftControlY = 4;
if (clawVal == 47)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 47)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 47)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 47)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 47)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 47)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 47)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 47)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 47)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 9
if (kbState.IsKeyDown(Keys.D9))
{
leftAssign = false;
leftVal = 48;
leftControlX = 9;
leftControlY = 4;
if (clawVal == 48)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 48)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 48)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 48)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 48)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 48)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 48)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 48)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 48)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 6
#region Left
if (kbState.IsKeyDown(Keys.Left))
{
lastKeyLeft = true;
leftAssign = false;
leftVal = 49;
leftControlX = 0;
jumpControlY = 5;
if (clawVal == 49)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 49)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 49)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 49)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 49)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 49)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 49)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 49)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 49)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Right
if (kbState.IsKeyDown(Keys.Right))
{
lastKeyRight = true;
leftAssign = false;
leftVal = 50;
leftControlX = 1;
jumpControlY = 5;
if (clawVal == 50)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 50)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 50)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 50)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 50)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 50)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 50)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 50)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 50)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Up
if (kbState.IsKeyDown(Keys.Up))
{
lastKeyUp = true;
leftAssign = false;
leftVal = 51;
leftControlX = 2;
jumpControlY = 5;
if (clawVal == 51)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 51)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 51)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 51)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 51)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 51)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 51)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 51)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 51)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Down
if (kbState.IsKeyDown(Keys.Down))
{
lastKeyDown = true;
leftAssign = false;
leftVal = 52;
leftControlX = 3;
jumpControlY = 5;
if (clawVal == 52)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 52)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 52)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 52)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 52)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (jumpVal == 52)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (rightVal == 52)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 52)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 52)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
}
#endregion
#region assign right
if (rightAssign == true)
{
#region row 1
#region Tab
if (kbState.IsKeyDown(Keys.Tab))
{
rightAssign = false;
rightVal = 1;
rightControlX = 0;
rightControlY = 0;
if (clawVal == 1)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 1)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 1)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 1)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 1)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 1)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 1)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 1)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 1)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Q
if (kbState.IsKeyDown(Keys.Q))
{
rightAssign = false;
rightVal = 2;
rightControlX = 1;
rightControlY = 0;
if (clawVal == 2)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 2)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 2)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 2)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 2)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 2)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 2)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 2)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 2)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region W
if (kbState.IsKeyDown(Keys.W))
{
lastKeyUp = true;
rightAssign = false;
rightVal = 3;
rightControlX = 2;
rightControlY = 0;
if (clawVal == 3)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 3)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 3)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 3)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 3)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 3)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 3)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 3)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 3)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region E
if (kbState.IsKeyDown(Keys.E) && lastKeyC == false)
{
lastKeyC = true;
rightAssign = false;
rightVal = 4;
rightControlX = 3;
rightControlY = 0;
if (clawVal == 4)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 4)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 4)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 4)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 4)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 4)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 4)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 4)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 4)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region R
if (kbState.IsKeyDown(Keys.R))
{
rightAssign = false;
rightVal = 5;
rightControlX = 4;
rightControlY = 0;
if (clawVal == 5)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 5)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 5)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 5)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 5)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 5)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 5)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 5)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 5)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region T
if (kbState.IsKeyDown(Keys.T))
{
rightAssign = false;
rightVal = 6;
rightControlX = 5;
rightControlY = 0;
if (clawVal == 6)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 6)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 6)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 6)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 6)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 6)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 6)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 6)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 6)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Y
if (kbState.IsKeyDown(Keys.Y))
{
rightAssign = false;
rightVal = 7;
rightControlX = 6;
rightControlY = 0;
if (clawVal == 7)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 7)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 7)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 7)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 7)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 7)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 7)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 7)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 7)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region U
if (kbState.IsKeyDown(Keys.U))
{
rightAssign = false;
rightVal = 8;
rightControlX = 7;
rightControlY = 0;
if (clawVal == 8)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 8)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 8)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 8)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 8)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 8)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 8)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 8)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 8)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region I
if (kbState.IsKeyDown(Keys.I))
{
rightAssign = false;
rightVal = 9;
rightControlX = 8;
rightControlY = 0;
if (clawVal == 9)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 9)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 9)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 9)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 9)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 9)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 9)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 9)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 9)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region O
if (kbState.IsKeyDown(Keys.O))
{
rightAssign = false;
rightVal = 10;
rightControlX = 9;
rightControlY = 0;
if (clawVal == 10)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 10)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 10)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 10)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 10)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 10)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 10)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 10)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 10)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region P
if (kbState.IsKeyDown(Keys.P))
{
rightAssign = false;
rightVal = 11;
rightControlX = 10;
rightControlY = 0;
if (clawVal == 11)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 11)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 11)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 11)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 11)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 11)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 11)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 11)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 11)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region [
if (kbState.IsKeyDown(Keys.OemOpenBrackets))
{
rightAssign = false;
rightVal = 12;
rightControlX = 11;
rightControlY = 0;
if (clawVal == 12)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 12)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 12)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 12)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 12)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 12)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 12)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 12)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 12)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ]
if (kbState.IsKeyDown(Keys.OemCloseBrackets))
{
rightAssign = false;
rightVal = 13;
rightControlX = 12;
rightControlY = 0;
if (clawVal == 13)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 13)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 13)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 13)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 13)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 13)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 13)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 13)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 13)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region \
if (kbState.IsKeyDown(Keys.OemBackslash))
{
rightAssign = false;
rightVal = 14;
jumpControlX = 13;
rightControlY = 0;
if (clawVal == 14)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 14)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 14)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 14)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 14)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 14)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 14)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 14)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 14)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 2
#region A
if (kbState.IsKeyDown(Keys.A))
{
lastKeyLeft = true;
rightAssign = false;
rightVal = 15;
rightControlX = 0;
rightControlY = 1;
if (clawVal == 15)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 15)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 15)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 15)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 15)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 15)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 15)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 15)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 15)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region S
if (kbState.IsKeyDown(Keys.S))
{
lastKeyDown = true;
rightAssign = false;
rightVal = 16;
rightControlX = 1;
rightControlY = 1;
if (clawVal == 16)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 16)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 16)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 16)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 16)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 16)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 16)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 16)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 16)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region D
if (kbState.IsKeyDown(Keys.D))
{
lastKeyRight = true;
rightAssign = false;
rightVal = 17;
rightControlX = 2;
rightControlY = 1;
if (clawVal == 17)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 17)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 17)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 17)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 17)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 17)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 17)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 17)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 17)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region F
if (kbState.IsKeyDown(Keys.F))
{
rightAssign = false;
rightVal = 18;
rightControlX = 3;
rightControlY = 1;
if (clawVal == 18)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 18)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 18)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 18)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 18)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 18)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 18)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 18)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 18)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region G
if (kbState.IsKeyDown(Keys.G))
{
rightAssign = false;
rightVal = 19;
rightControlX = 4;
rightControlY = 1;
if (clawVal == 19)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 19)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 19)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 19)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 19)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 19)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 19)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 19)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 19)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region H
if (kbState.IsKeyDown(Keys.H))
{
rightAssign = false;
rightVal = 20;
rightControlX = 5;
rightControlY = 1;
if (clawVal == 20)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 20)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 20)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 20)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 20)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 20)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 20)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 20)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 20)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region J
if (kbState.IsKeyDown(Keys.J))
{
rightAssign = false;
rightVal = 21;
rightControlX = 6;
rightControlY = 1;
if (clawVal == 21)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 21)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 21)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 21)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 21)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 21)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 21)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 21)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 21)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region K
if (kbState.IsKeyDown(Keys.K))
{
rightAssign = false;
rightVal = 22;
rightControlX = 7;
rightControlY = 1;
if (clawVal == 22)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 22)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 22)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 22)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 22)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 22)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 22)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 22)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 22)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region L
if (kbState.IsKeyDown(Keys.L))
{
rightAssign = false;
rightVal = 23;
rightControlX = 8;
rightControlY = 1;
if (clawVal == 23)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 23)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 23)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 23)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 23)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 23)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 23)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 23)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 23)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ;
if (kbState.IsKeyDown(Keys.OemSemicolon))
{
rightAssign = false;
rightVal = 24;
rightControlX = 9;
rightControlY = 1;
if (clawVal == 24)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 24)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 24)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 24)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 24)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 24)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 24)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 24)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 24)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region '
if (kbState.IsKeyDown(Keys.OemQuotes))
{
rightAssign = false;
rightVal = 25;
rightControlX = 10;
rightControlY = 1;
if (clawVal == 25)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 25)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 25)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 25)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 25)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 25)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 25)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 25)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 25)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 3
#region Z
if (kbState.IsKeyDown(Keys.Z))
{
rightAssign = false;
rightVal = 26;
rightControlX = 0;
rightControlY = 2;
if (clawVal == 26)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 26)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 26)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 26)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 26)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 26)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 26)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 26)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 26)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region X
if (kbState.IsKeyDown(Keys.X))
{
lastKeyX = true;
rightAssign = false;
rightVal = 27;
rightControlX = 1;
rightControlY = 2;
if (clawVal == 27)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 27)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 27)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 27)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 27)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 27)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 27)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 27)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 27)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region C
if (kbState.IsKeyDown(Keys.C) && lastKeyC == false)
{
lastKeyC = true;
rightAssign = false;
rightVal = 28;
rightControlX = 2;
rightControlY = 2;
if (clawVal == 28)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 28)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 28)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 28)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 28)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 28)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 28)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 28)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 28)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region V
if (kbState.IsKeyDown(Keys.V))
{
rightAssign = false;
rightVal = 29;
rightControlX = 3;
rightControlY = 2;
if (clawVal == 29)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 29)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 29)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 29)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 29)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 29)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 29)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 29)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 29)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region B
if (kbState.IsKeyDown(Keys.B))
{
rightAssign = false;
rightVal = 30;
rightControlX = 4;
rightControlY = 2;
if (clawVal == 30)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 30)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 30)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 30)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 30)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 30)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 30)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 30)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 30)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region N
if (kbState.IsKeyDown(Keys.N))
{
rightAssign = false;
rightVal = 31;
rightControlX = 5;
rightControlY = 2;
if (clawVal == 31)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 31)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 31)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 31)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 31)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 31)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 31)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 31)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 31)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region M
if (kbState.IsKeyDown(Keys.M))
{
rightAssign = false;
rightVal = 32;
rightControlX = 6;
rightControlY = 2;
if (clawVal == 32)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 32)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 32)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 32)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 32)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 32)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 32)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 32)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 32)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ,
if (kbState.IsKeyDown(Keys.OemComma))
{
rightAssign = false;
rightVal = 33;
rightControlX = 7;
rightControlY = 2;
if (clawVal == 33)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 33)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 33)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 33)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 33)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 33)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 33)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 33)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 33)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region .
if (kbState.IsKeyDown(Keys.OemPeriod))
{
rightAssign = false;
rightVal = 34;
rightControlX = 8;
rightControlY = 2;
if (clawVal == 34)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 34)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 34)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 34)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 34)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 34)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 34)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 34)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 34)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region /
if (kbState.IsKeyDown(Keys.OemQuestion))
{
rightAssign = false;
rightVal = 35;
rightControlX = 9;
rightControlY = 2;
if (clawVal == 35)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 35)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 35)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 35)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 35)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 35)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 35)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 35)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 35)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 4
#region Shift
if (kbState.IsKeyDown(Keys.LeftShift) ||
kbState.IsKeyDown(Keys.RightShift))
{
rightAssign = false;
rightVal = 36;
rightControlX = 0;
rightControlY = 3;
if (clawVal == 36)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 36)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 36)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 36)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 36)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 36)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 36)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 36)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 36)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Control
if (kbState.IsKeyDown(Keys.LeftControl) ||
kbState.IsKeyDown(Keys.RightControl))
{
rightAssign = false;
rightVal = 37;
rightControlX = 1;
rightControlY = 3;
if (clawVal == 37)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 37)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 37)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 37)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 37)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 37)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 37)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 37)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 37)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Space
if (kbState.IsKeyDown(Keys.Space))
{
lastKeyX = true;
rightAssign = false;
rightVal = 38;
rightControlX = 2;
rightControlY = 3;
if (clawVal == 38)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 38)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 38)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 38)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 38)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 38)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 38)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 38)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 38)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 5
#region 0
if (kbState.IsKeyDown(Keys.D0))
{
rightAssign = false;
rightVal = 39;
rightControlX = 0;
rightControlY = 4;
if (clawVal == 39)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 39)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 39)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 39)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 39)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 39)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 39)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 39)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 39)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 1
if (kbState.IsKeyDown(Keys.D1))
{
rightAssign = false;
rightVal = 40;
rightControlX = 1;
rightControlY = 4;
if (clawVal == 40)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 40)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 40)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 40)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 40)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 40)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 40)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 40)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 40)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 2
if (kbState.IsKeyDown(Keys.D2))
{
rightAssign = false;
rightVal = 41;
rightControlX = 2;
rightControlY = 4;
if (clawVal == 41)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 41)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 41)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 41)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 41)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 41)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 41)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 41)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 41)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 3
if (kbState.IsKeyDown(Keys.D3))
{
rightAssign = false;
rightVal = 42;
rightControlX = 3;
rightControlY = 4;
if (clawVal == 42)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 42)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 42)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 42)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 42)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 42)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 42)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 42)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 42)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 4
if (kbState.IsKeyDown(Keys.D4))
{
rightAssign = false;
rightVal = 43;
rightControlX = 4;
rightControlY = 4;
if (clawVal == 43)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 43)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 43)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 43)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 43)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 43)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 43)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 43)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 43)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 5
if (kbState.IsKeyDown(Keys.D5))
{
rightAssign = false;
rightVal = 44;
rightControlX = 5;
rightControlY = 4;
if (clawVal == 44)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 44)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 44)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 44)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 44)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 44)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 44)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 44)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 44)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 6
if (kbState.IsKeyDown(Keys.D6))
{
rightAssign = false;
rightVal = 45;
rightControlX = 6;
rightControlY = 4;
if (clawVal == 45)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 45)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 45)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 45)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 45)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 45)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 45)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 45)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 45)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 7
if (kbState.IsKeyDown(Keys.D7))
{
rightAssign = false;
rightVal = 46;
rightControlX = 7;
rightControlY = 4;
if (clawVal == 46)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 46)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 46)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 46)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 46)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 46)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 46)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 46)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 46)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 8
if (kbState.IsKeyDown(Keys.D8))
{
rightAssign = false;
rightVal = 47;
rightControlX = 8;
rightControlY = 4;
if (clawVal == 47)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 47)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 47)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 47)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 47)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 47)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 47)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 47)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 47)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 9
if (kbState.IsKeyDown(Keys.D9))
{
rightAssign = false;
rightVal = 48;
rightControlX = 9;
rightControlY = 4;
if (clawVal == 48)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 48)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 48)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 48)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 48)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 48)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 48)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 48)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 48)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 6
#region Left
if (kbState.IsKeyDown(Keys.Left))
{
lastKeyLeft = true;
rightAssign = false;
rightVal = 49;
rightControlX = 0;
jumpControlY = 5;
if (clawVal == 49)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 49)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 49)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 49)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 49)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 49)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 49)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 49)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 49)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Right
if (kbState.IsKeyDown(Keys.Right))
{
lastKeyRight = true;
rightAssign = false;
rightVal = 50;
rightControlX = 1;
jumpControlY = 5;
if (clawVal == 50)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 50)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 50)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 50)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 50)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 50)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 50)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 50)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 50)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Up
if (kbState.IsKeyDown(Keys.Up))
{
lastKeyUp = true;
rightAssign = false;
rightVal = 51;
rightControlX = 2;
jumpControlY = 5;
if (clawVal == 51)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 51)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 51)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 51)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 51)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 51)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 51)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 51)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 51)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Down
if (kbState.IsKeyDown(Keys.Down))
{
lastKeyDown = true;
rightAssign = false;
rightVal = 52;
rightControlX = 3;
jumpControlY = 5;
if (clawVal == 52)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 52)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 52)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 52)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 52)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 52)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (jumpVal == 52)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (upVal == 52)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (downVal == 52)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
}
#endregion
#region assign up
if (upAssign == true)
{
#region row 1
#region Tab
if (kbState.IsKeyDown(Keys.Tab))
{
upAssign = false;
upVal = 1;
upControlX = 0;
upControlY = 0;
if (clawVal == 1)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 1)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 1)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 1)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 1)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 1)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 1)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 1)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 1)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Q
if (kbState.IsKeyDown(Keys.Q))
{
upAssign = false;
upVal = 2;
upControlX = 1;
upControlY = 0;
if (clawVal == 2)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 2)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 2)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 2)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 2)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 2)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 2)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 2)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 2)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region W
if (kbState.IsKeyDown(Keys.W))
{
lastKeyUp = true;
upAssign = false;
upVal = 3;
upControlX = 2;
upControlY = 0;
if (clawVal == 3)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 3)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 3)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 3)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 3)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 3)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 3)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 3)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 3)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region E
if (kbState.IsKeyDown(Keys.E) && lastKeyC == false)
{
lastKeyC = true;
upAssign = false;
upVal = 4;
upControlX = 3;
upControlY = 0;
if (clawVal == 4)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 4)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 4)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 4)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 4)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 4)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 4)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 4)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 4)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region R
if (kbState.IsKeyDown(Keys.R))
{
upAssign = false;
upVal = 5;
upControlX = 4;
upControlY = 0;
if (clawVal == 5)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 5)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 5)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 5)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 5)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 5)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 5)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 5)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 5)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region T
if (kbState.IsKeyDown(Keys.T))
{
upAssign = false;
upVal = 6;
upControlX = 5;
upControlY = 0;
if (clawVal == 6)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 6)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 6)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 6)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 6)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 6)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 6)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 6)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 6)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Y
if (kbState.IsKeyDown(Keys.Y))
{
upAssign = false;
upVal = 7;
upControlX = 6;
upControlY = 0;
if (clawVal == 7)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 7)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 7)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 7)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 7)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 7)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 7)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 7)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 7)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region U
if (kbState.IsKeyDown(Keys.U))
{
upAssign = false;
upVal = 8;
upControlX = 7;
upControlY = 0;
if (clawVal == 8)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 8)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 8)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 8)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 8)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 8)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 8)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 8)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 8)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region I
if (kbState.IsKeyDown(Keys.I))
{
upAssign = false;
upVal = 9;
upControlX = 8;
upControlY = 0;
if (clawVal == 9)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 9)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 9)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 9)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 9)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 9)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 9)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 9)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 9)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region O
if (kbState.IsKeyDown(Keys.O))
{
upAssign = false;
upVal = 10;
upControlX = 9;
upControlY = 0;
if (clawVal == 10)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 10)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 10)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 10)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 10)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 10)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 10)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 10)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 10)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region P
if (kbState.IsKeyDown(Keys.P))
{
upAssign = false;
upVal = 11;
upControlX = 10;
upControlY = 0;
if (clawVal == 11)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 11)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 11)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 11)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 11)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 11)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 11)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 11)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 11)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region [
if (kbState.IsKeyDown(Keys.OemOpenBrackets))
{
upAssign = false;
upVal = 12;
upControlX = 11;
upControlY = 0;
if (clawVal == 12)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 12)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 12)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 12)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 12)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 12)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 12)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 12)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 12)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ]
if (kbState.IsKeyDown(Keys.OemCloseBrackets))
{
upAssign = false;
upVal = 13;
upControlX = 12;
upControlY = 0;
if (clawVal == 13)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 13)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 13)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 13)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 13)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 13)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 13)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 13)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 13)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region \
if (kbState.IsKeyDown(Keys.OemBackslash))
{
upAssign = false;
upVal = 14;
jumpControlX = 13;
upControlY = 0;
if (clawVal == 14)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 14)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 14)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 14)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 14)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 14)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 14)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 14)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 14)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 2
#region A
if (kbState.IsKeyDown(Keys.A))
{
lastKeyLeft = true;
upAssign = false;
upVal = 15;
upControlX = 0;
upControlY = 1;
if (clawVal == 15)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 15)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 15)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 15)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 15)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 15)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 15)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 15)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 15)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region S
if (kbState.IsKeyDown(Keys.S))
{
lastKeyDown = true;
upAssign = false;
upVal = 16;
upControlX = 1;
upControlY = 1;
if (clawVal == 16)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 16)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 16)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 16)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 16)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 16)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 16)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 16)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 16)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region D
if (kbState.IsKeyDown(Keys.D))
{
lastKeyRight = true;
upAssign = false;
upVal = 17;
upControlX = 2;
upControlY = 1;
if (clawVal == 17)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 17)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 17)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 17)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 17)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 17)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 17)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 17)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 17)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region F
if (kbState.IsKeyDown(Keys.F))
{
upAssign = false;
upVal = 18;
upControlX = 3;
upControlY = 1;
if (clawVal == 18)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 18)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 18)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 18)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 18)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 18)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 18)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 18)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 18)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region G
if (kbState.IsKeyDown(Keys.G))
{
upAssign = false;
upVal = 19;
upControlX = 4;
upControlY = 1;
if (clawVal == 19)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 19)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 19)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 19)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 19)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 19)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 19)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 19)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 19)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region H
if (kbState.IsKeyDown(Keys.H))
{
upAssign = false;
upVal = 20;
upControlX = 5;
upControlY = 1;
if (clawVal == 20)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 20)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 20)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 20)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 20)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 20)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 20)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 20)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 20)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region J
if (kbState.IsKeyDown(Keys.J))
{
upAssign = false;
upVal = 21;
upControlX = 6;
upControlY = 1;
if (clawVal == 21)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 21)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 21)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 21)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 21)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 21)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 21)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 21)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 21)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region K
if (kbState.IsKeyDown(Keys.K))
{
upAssign = false;
upVal = 22;
upControlX = 7;
upControlY = 1;
if (clawVal == 22)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 22)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 22)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 22)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 22)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 22)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 22)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 22)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 22)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region L
if (kbState.IsKeyDown(Keys.L))
{
upAssign = false;
upVal = 23;
upControlX = 8;
upControlY = 1;
if (clawVal == 23)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 23)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 23)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 23)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 23)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 23)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 23)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 23)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 23)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ;
if (kbState.IsKeyDown(Keys.OemSemicolon))
{
upAssign = false;
upVal = 24;
upControlX = 9;
upControlY = 1;
if (clawVal == 24)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 24)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 24)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 24)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 24)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 24)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 24)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 24)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 24)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region '
if (kbState.IsKeyDown(Keys.OemQuotes))
{
upAssign = false;
upVal = 25;
upControlX = 10;
upControlY = 1;
if (clawVal == 25)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 25)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 25)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 25)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 25)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 25)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 25)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 25)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 25)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 3
#region Z
if (kbState.IsKeyDown(Keys.Z))
{
upAssign = false;
upVal = 26;
upControlX = 0;
upControlY = 2;
if (clawVal == 26)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 26)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 26)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 26)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 26)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 26)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 26)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 26)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 26)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region X
if (kbState.IsKeyDown(Keys.X))
{
lastKeyX = true;
upAssign = false;
upVal = 27;
upControlX = 1;
upControlY = 2;
if (clawVal == 27)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 27)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 27)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 27)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 27)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 27)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 27)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 27)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 27)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region C
if (kbState.IsKeyDown(Keys.C) && lastKeyC == false)
{
lastKeyC = true;
upAssign = false;
upVal = 28;
upControlX = 2;
upControlY = 2;
if (clawVal == 28)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 28)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 28)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 28)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 28)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 28)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 28)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 28)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 28)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region V
if (kbState.IsKeyDown(Keys.V))
{
upAssign = false;
upVal = 29;
upControlX = 3;
upControlY = 2;
if (clawVal == 29)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 29)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 29)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 29)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 29)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 29)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 29)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 29)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 29)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region B
if (kbState.IsKeyDown(Keys.B))
{
upAssign = false;
upVal = 30;
upControlX = 4;
upControlY = 2;
if (clawVal == 30)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 30)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 30)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 30)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 30)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 30)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 30)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 30)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 30)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region N
if (kbState.IsKeyDown(Keys.N))
{
upAssign = false;
upVal = 31;
upControlX = 5;
upControlY = 2;
if (clawVal == 31)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 31)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 31)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 31)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 31)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 31)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 31)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 31)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 31)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region M
if (kbState.IsKeyDown(Keys.M))
{
upAssign = false;
upVal = 32;
upControlX = 6;
upControlY = 2;
if (clawVal == 32)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 32)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 32)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 32)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 32)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 32)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 32)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 32)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 32)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region ,
if (kbState.IsKeyDown(Keys.OemComma))
{
upAssign = false;
upVal = 33;
upControlX = 7;
upControlY = 2;
if (clawVal == 33)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 33)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 33)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 33)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 33)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 33)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 33)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 33)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 33)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region .
if (kbState.IsKeyDown(Keys.OemPeriod))
{
upAssign = false;
upVal = 34;
upControlX = 8;
upControlY = 2;
if (clawVal == 34)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 34)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 34)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 34)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 34)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 34)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 34)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 34)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 34)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region /
if (kbState.IsKeyDown(Keys.OemQuestion))
{
upAssign = false;
upVal = 35;
upControlX = 9;
upControlY = 2;
if (clawVal == 35)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 35)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 35)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 35)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 35)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 35)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 35)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 35)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 35)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 4
#region Shift
if (kbState.IsKeyDown(Keys.LeftShift) ||
kbState.IsKeyDown(Keys.RightShift))
{
upAssign = false;
upVal = 36;
upControlX = 0;
upControlY = 3;
if (clawVal == 36)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 36)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 36)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 36)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 36)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 36)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 36)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 36)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 36)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Control
if (kbState.IsKeyDown(Keys.LeftControl) ||
kbState.IsKeyDown(Keys.RightControl))
{
upAssign = false;
upVal = 37;
upControlX = 1;
upControlY = 3;
if (clawVal == 37)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 37)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 37)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 37)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 37)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 37)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 37)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 37)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 37)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Space
if (kbState.IsKeyDown(Keys.Space))
{
lastKeyX = true;
upAssign = false;
upVal = 38;
upControlX = 2;
upControlY = 3;
if (clawVal == 38)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 38)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 38)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 38)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 38)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 38)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 38)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 38)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 38)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 5
#region 0
if (kbState.IsKeyDown(Keys.D0))
{
upAssign = false;
upVal = 39;
upControlX = 0;
upControlY = 4;
if (clawVal == 39)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 39)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 39)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 39)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 39)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 39)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 39)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 39)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 39)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 1
if (kbState.IsKeyDown(Keys.D1))
{
upAssign = false;
upVal = 40;
upControlX = 1;
upControlY = 4;
if (clawVal == 40)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 40)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 40)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 40)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 40)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 40)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 40)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 40)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 40)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 2
if (kbState.IsKeyDown(Keys.D2))
{
upAssign = false;
upVal = 41;
upControlX = 2;
upControlY = 4;
if (clawVal == 41)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 41)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 41)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 41)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 41)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 41)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 41)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 41)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 41)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 3
if (kbState.IsKeyDown(Keys.D3))
{
upAssign = false;
upVal = 42;
upControlX = 3;
upControlY = 4;
if (clawVal == 42)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 42)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 42)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 42)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 42)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 42)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 42)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 42)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 42)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 4
if (kbState.IsKeyDown(Keys.D4))
{
upAssign = false;
upVal = 43;
upControlX = 4;
upControlY = 4;
if (clawVal == 43)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 43)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 43)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 43)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 43)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 43)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 43)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 43)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 43)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 5
if (kbState.IsKeyDown(Keys.D5))
{
upAssign = false;
upVal = 44;
upControlX = 5;
upControlY = 4;
if (clawVal == 44)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 44)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 44)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 44)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 44)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 44)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 44)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 44)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 44)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 6
if (kbState.IsKeyDown(Keys.D6))
{
upAssign = false;
upVal = 45;
upControlX = 6;
upControlY = 4;
if (clawVal == 45)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 45)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 45)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 45)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 45)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 45)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 45)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 45)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 45)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 7
if (kbState.IsKeyDown(Keys.D7))
{
upAssign = false;
upVal = 46;
upControlX = 7;
upControlY = 4;
if (clawVal == 46)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 46)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 46)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 46)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 46)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 46)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 46)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 46)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 46)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 8
if (kbState.IsKeyDown(Keys.D8))
{
upAssign = false;
upVal = 47;
upControlX = 8;
upControlY = 4;
if (clawVal == 47)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 47)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 47)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 47)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 47)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 47)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 47)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 47)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 47)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region 9
if (kbState.IsKeyDown(Keys.D9))
{
upAssign = false;
upVal = 48;
upControlX = 9;
upControlY = 4;
if (clawVal == 48)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 48)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 48)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 48)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 48)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 48)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 48)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 48)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 48)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
#region row 6
#region Left
if (kbState.IsKeyDown(Keys.Left))
{
lastKeyLeft = true;
upAssign = false;
upVal = 49;
upControlX = 0;
jumpControlY = 5;
if (clawVal == 49)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 49)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 49)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 49)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 49)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 49)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 49)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 49)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 49)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Right
if (kbState.IsKeyDown(Keys.Right))
{
lastKeyRight = true;
upAssign = false;
upVal = 50;
upControlX = 1;
jumpControlY = 5;
if (clawVal == 50)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 50)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 50)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 50)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 50)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 50)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 50)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 50)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 50)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Up
if (kbState.IsKeyDown(Keys.Up))
{
lastKeyUp = true;
upAssign = false;
upVal = 51;
upControlX = 2;
jumpControlY = 5;
if (clawVal == 51)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 51)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 51)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 51)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 51)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 51)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 51)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 51)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 51)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#region Down
if (kbState.IsKeyDown(Keys.Down))
{
lastKeyDown = true;
upAssign = false;
upVal = 52;
upControlX = 3;
jumpControlY = 5;
if (clawVal == 52)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 52)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 52)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 52)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 52)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 52)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 52)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (jumpVal == 52)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
if (downVal == 52)
{
downVal = 0;
downControlX = 13;
downControlY = 5;
}
}
#endregion
#endregion
}
#endregion
#region assign down
if (downAssign == true)
{
#region row 1
#region Tab
if (kbState.IsKeyDown(Keys.Tab))
{
downAssign = false;
downVal = 1;
downControlX = 0;
downControlY = 0;
if (clawVal == 1)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 1)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 1)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 1)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 1)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 1)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 1)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 1)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 1)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region Q
if (kbState.IsKeyDown(Keys.Q))
{
downAssign = false;
downVal = 2;
downControlX = 1;
downControlY = 0;
if (clawVal == 2)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 2)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 2)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 2)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 2)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 2)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 2)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 2)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 2)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region W
if (kbState.IsKeyDown(Keys.W))
{
lastKeyUp = true;
downAssign = false;
downVal = 3;
downControlX = 2;
downControlY = 0;
if (clawVal == 3)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 3)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 3)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 3)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 3)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 3)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 3)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 3)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 3)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region E
if (kbState.IsKeyDown(Keys.E) && lastKeyC == false)
{
lastKeyC = true;
downAssign = false;
downVal = 4;
downControlX = 3;
downControlY = 0;
if (clawVal == 4)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 4)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 4)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 4)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 4)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 4)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 4)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 4)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 4)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region R
if (kbState.IsKeyDown(Keys.R))
{
downAssign = false;
downVal = 5;
downControlX = 4;
downControlY = 0;
if (clawVal == 5)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 5)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 5)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 5)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 5)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 5)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 5)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 5)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 5)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region T
if (kbState.IsKeyDown(Keys.T))
{
downAssign = false;
downVal = 6;
downControlX = 5;
downControlY = 0;
if (clawVal == 6)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 6)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 6)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 6)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 6)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 6)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 6)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 6)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 6)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region Y
if (kbState.IsKeyDown(Keys.Y))
{
downAssign = false;
downVal = 7;
downControlX = 6;
downControlY = 0;
if (clawVal == 7)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 7)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 7)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 7)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 7)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 7)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 7)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 7)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 7)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region U
if (kbState.IsKeyDown(Keys.U))
{
downAssign = false;
downVal = 8;
downControlX = 7;
downControlY = 0;
if (clawVal == 8)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 8)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 8)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 8)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 8)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 8)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 8)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 8)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 8)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region I
if (kbState.IsKeyDown(Keys.I))
{
downAssign = false;
downVal = 9;
downControlX = 8;
downControlY = 0;
if (clawVal == 9)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 9)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 9)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 9)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 9)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 9)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 9)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 9)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 9)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region O
if (kbState.IsKeyDown(Keys.O))
{
downAssign = false;
downVal = 10;
downControlX = 9;
downControlY = 0;
if (clawVal == 10)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 10)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 10)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 10)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 10)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 10)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 10)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 10)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 10)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region P
if (kbState.IsKeyDown(Keys.P))
{
downAssign = false;
downVal = 11;
downControlX = 10;
downControlY = 0;
if (clawVal == 11)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 11)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 11)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 11)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 11)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 11)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 11)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 11)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 11)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region [
if (kbState.IsKeyDown(Keys.OemOpenBrackets))
{
downAssign = false;
downVal = 12;
downControlX = 11;
downControlY = 0;
if (clawVal == 12)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 12)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 12)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 12)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 12)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 12)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 12)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 12)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 12)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region ]
if (kbState.IsKeyDown(Keys.OemCloseBrackets))
{
downAssign = false;
downVal = 13;
downControlX = 12;
downControlY = 0;
if (clawVal == 13)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 13)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 13)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 13)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 13)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 13)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 13)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 13)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 13)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region \
if (kbState.IsKeyDown(Keys.OemBackslash))
{
downAssign = false;
downVal = 14;
jumpControlX = 13;
downControlY = 0;
if (clawVal == 14)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 14)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 14)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 14)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 14)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 14)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 14)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 14)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 14)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#endregion
#region row 2
#region A
if (kbState.IsKeyDown(Keys.A))
{
lastKeyLeft = true;
downAssign = false;
downVal = 15;
downControlX = 0;
downControlY = 1;
if (clawVal == 15)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 15)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 15)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 15)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 15)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 15)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 15)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 15)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 15)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region S
if (kbState.IsKeyDown(Keys.S))
{
lastKeyDown = true;
downAssign = false;
downVal = 16;
downControlX = 1;
downControlY = 1;
if (clawVal == 16)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 16)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 16)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 16)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 16)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 16)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 16)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 16)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 16)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region D
if (kbState.IsKeyDown(Keys.D))
{
lastKeyRight = true;
downAssign = false;
downVal = 17;
downControlX = 2;
downControlY = 1;
if (clawVal == 17)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 17)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 17)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 17)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 17)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 17)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 17)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 17)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 17)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region F
if (kbState.IsKeyDown(Keys.F))
{
downAssign = false;
downVal = 18;
downControlX = 3;
downControlY = 1;
if (clawVal == 18)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 18)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 18)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 18)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 18)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 18)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 18)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 18)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 18)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region G
if (kbState.IsKeyDown(Keys.G))
{
downAssign = false;
downVal = 19;
downControlX = 4;
downControlY = 1;
if (clawVal == 19)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 19)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 19)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 19)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 19)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 19)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 19)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 19)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 19)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region H
if (kbState.IsKeyDown(Keys.H))
{
downAssign = false;
downVal = 20;
downControlX = 5;
downControlY = 1;
if (clawVal == 20)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 20)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 20)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 20)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 20)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 20)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 20)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 20)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 20)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region J
if (kbState.IsKeyDown(Keys.J))
{
downAssign = false;
downVal = 21;
downControlX = 6;
downControlY = 1;
if (clawVal == 21)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 21)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 21)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 21)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 21)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 21)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 21)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 21)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 21)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region K
if (kbState.IsKeyDown(Keys.K))
{
downAssign = false;
downVal = 22;
downControlX = 7;
downControlY = 1;
if (clawVal == 22)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 22)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 22)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 22)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 22)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 22)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 22)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 22)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 22)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region L
if (kbState.IsKeyDown(Keys.L))
{
downAssign = false;
downVal = 23;
downControlX = 8;
downControlY = 1;
if (clawVal == 23)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 23)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 23)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 23)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 23)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 23)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 23)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 23)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 23)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region ;
if (kbState.IsKeyDown(Keys.OemSemicolon))
{
downAssign = false;
downVal = 24;
downControlX = 9;
downControlY = 1;
if (clawVal == 24)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 24)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 24)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 24)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 24)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 24)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 24)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 24)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 24)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region '
if (kbState.IsKeyDown(Keys.OemQuotes))
{
downAssign = false;
downVal = 25;
downControlX = 10;
downControlY = 1;
if (clawVal == 25)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 25)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 25)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 25)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 25)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 25)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 25)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 25)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 25)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#endregion
#region row 3
#region Z
if (kbState.IsKeyDown(Keys.Z))
{
downAssign = false;
downVal = 26;
downControlX = 0;
downControlY = 2;
if (clawVal == 26)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 26)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 26)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 26)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 26)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 26)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 26)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 26)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 26)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region X
if (kbState.IsKeyDown(Keys.X))
{
lastKeyX = true;
downAssign = false;
downVal = 27;
downControlX = 1;
downControlY = 2;
if (clawVal == 27)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 27)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 27)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 27)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 27)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 27)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 27)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 27)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 27)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region C
if (kbState.IsKeyDown(Keys.C) && lastKeyC == false)
{
lastKeyC = true;
downAssign = false;
downVal = 28;
downControlX = 2;
downControlY = 2;
if (clawVal == 28)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 28)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 28)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 28)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 28)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 28)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 28)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 28)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 28)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region V
if (kbState.IsKeyDown(Keys.V))
{
downAssign = false;
downVal = 29;
downControlX = 3;
downControlY = 2;
if (clawVal == 29)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 29)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 29)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 29)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 29)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 29)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 29)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 29)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 29)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region B
if (kbState.IsKeyDown(Keys.B))
{
downAssign = false;
downVal = 30;
downControlX = 4;
downControlY = 2;
if (clawVal == 30)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 30)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 30)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 30)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 30)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 30)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 30)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 30)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 30)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region N
if (kbState.IsKeyDown(Keys.N))
{
downAssign = false;
downVal = 31;
downControlX = 5;
downControlY = 2;
if (clawVal == 31)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 31)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 31)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 31)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 31)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 31)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 31)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 31)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 31)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region M
if (kbState.IsKeyDown(Keys.M))
{
downAssign = false;
downVal = 32;
downControlX = 6;
downControlY = 2;
if (clawVal == 32)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 32)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 32)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 32)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 32)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 32)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 32)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 32)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 32)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region ,
if (kbState.IsKeyDown(Keys.OemComma))
{
downAssign = false;
downVal = 33;
downControlX = 7;
downControlY = 2;
if (clawVal == 33)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 33)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 33)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 33)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 33)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 33)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 33)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 33)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 33)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region .
if (kbState.IsKeyDown(Keys.OemPeriod))
{
downAssign = false;
downVal = 34;
downControlX = 8;
downControlY = 2;
if (clawVal == 34)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 34)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 34)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 34)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 34)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 34)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 34)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 34)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 34)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region /
if (kbState.IsKeyDown(Keys.OemQuestion))
{
downAssign = false;
downVal = 35;
downControlX = 9;
downControlY = 2;
if (clawVal == 35)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 35)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 35)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 35)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 35)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 35)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 35)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 35)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 35)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#endregion
#region row 4
#region Shift
if (kbState.IsKeyDown(Keys.LeftShift) ||
kbState.IsKeyDown(Keys.RightShift))
{
downAssign = false;
downVal = 36;
downControlX = 0;
downControlY = 3;
if (clawVal == 36)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 36)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 36)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 36)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 36)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 36)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 36)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 36)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 36)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region Control
if (kbState.IsKeyDown(Keys.LeftControl) ||
kbState.IsKeyDown(Keys.RightControl))
{
downAssign = false;
downVal = 37;
downControlX = 1;
downControlY = 3;
if (clawVal == 37)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 37)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 37)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 37)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 37)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 37)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 37)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 37)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 37)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region Space
if (kbState.IsKeyDown(Keys.Space))
{
lastKeyX = true;
downAssign = false;
downVal = 38;
downControlX = 2;
downControlY = 3;
if (clawVal == 38)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 38)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 38)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 38)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 38)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 38)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 38)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 38)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 38)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#endregion
#region row 5
#region 0
if (kbState.IsKeyDown(Keys.D0))
{
downAssign = false;
downVal = 39;
downControlX = 0;
downControlY = 4;
if (clawVal == 39)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 39)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 39)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 39)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 39)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 39)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 39)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 39)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 39)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region 1
if (kbState.IsKeyDown(Keys.D1))
{
downAssign = false;
downVal = 40;
downControlX = 1;
downControlY = 4;
if (clawVal == 40)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 40)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 40)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 40)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 40)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 40)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 40)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 40)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 40)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region 2
if (kbState.IsKeyDown(Keys.D2))
{
downAssign = false;
downVal = 41;
downControlX = 2;
downControlY = 4;
if (clawVal == 41)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 41)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 41)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 41)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 41)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 41)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 41)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 41)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 41)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region 3
if (kbState.IsKeyDown(Keys.D3))
{
downAssign = false;
downVal = 42;
downControlX = 3;
downControlY = 4;
if (clawVal == 42)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 42)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 42)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 42)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 42)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 42)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 42)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 42)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 42)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region 4
if (kbState.IsKeyDown(Keys.D4))
{
downAssign = false;
downVal = 43;
downControlX = 4;
downControlY = 4;
if (clawVal == 43)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 43)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 43)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 43)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 43)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 43)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 43)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 43)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 43)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region 5
if (kbState.IsKeyDown(Keys.D5))
{
downAssign = false;
downVal = 44;
downControlX = 5;
downControlY = 4;
if (clawVal == 44)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 44)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 44)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 44)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 44)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 44)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 44)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 44)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 44)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region 6
if (kbState.IsKeyDown(Keys.D6))
{
downAssign = false;
downVal = 45;
downControlX = 6;
downControlY = 4;
if (clawVal == 45)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 45)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 45)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 45)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 45)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 45)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 45)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 45)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 45)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region 7
if (kbState.IsKeyDown(Keys.D7))
{
downAssign = false;
downVal = 46;
downControlX = 7;
downControlY = 4;
if (clawVal == 46)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 46)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 46)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 46)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 46)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 46)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 46)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 46)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 46)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region 8
if (kbState.IsKeyDown(Keys.D8))
{
downAssign = false;
downVal = 47;
downControlX = 8;
downControlY = 4;
if (clawVal == 47)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 47)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 47)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 47)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 47)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 47)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 47)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 47)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 47)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region 9
if (kbState.IsKeyDown(Keys.D9))
{
downAssign = false;
downVal = 48;
downControlX = 9;
downControlY = 4;
if (clawVal == 48)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 48)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 48)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 48)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 48)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 48)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 48)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 48)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 48)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#endregion
#region row 6
#region Left
if (kbState.IsKeyDown(Keys.Left))
{
lastKeyLeft = true;
downAssign = false;
downVal = 49;
downControlX = 0;
jumpControlY = 5;
if (clawVal == 49)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 49)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 49)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 49)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 49)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 49)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 49)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 49)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 49)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region Right
if (kbState.IsKeyDown(Keys.Right))
{
lastKeyRight = true;
downAssign = false;
downVal = 50;
downControlX = 1;
jumpControlY = 5;
if (clawVal == 50)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 50)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 50)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 50)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 50)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 50)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 50)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 50)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 50)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region Up
if (kbState.IsKeyDown(Keys.Up))
{
lastKeyUp = true;
downAssign = false;
downVal = 51;
downControlX = 2;
jumpControlY = 5;
if (clawVal == 51)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 51)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 51)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 51)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 51)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 51)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 51)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 51)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 51)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#region Down
if (kbState.IsKeyDown(Keys.Down))
{
lastKeyDown = true;
downAssign = false;
downVal = 52;
downControlX = 3;
jumpControlY = 5;
if (clawVal == 52)
{
clawVal = 0;
clawControlX = 13;
clawControlY = 5;
}
if (breathVal == 52)
{
breathVal = 0;
breathControlX = 13;
breathControlY = 5;
}
if (confVal == 52)
{
confVal = 0;
confControlX = 13;
confControlY = 5;
}
if (swlVal == 52)
{
swlVal = 0;
swlControlX = 13;
swlControlY = 5;
}
if (swrVal == 52)
{
swrVal = 0;
swrControlX = 13;
swrControlY = 5;
}
if (leftVal == 52)
{
leftVal = 0;
leftControlX = 13;
leftControlY = 5;
}
if (rightVal == 52)
{
rightVal = 0;
rightControlX = 13;
rightControlY = 5;
}
if (upVal == 52)
{
upVal = 0;
upControlX = 13;
upControlY = 5;
}
if (jumpVal == 52)
{
jumpVal = 0;
jumpControlX = 13;
jumpControlY = 5;
}
}
#endregion
#endregion
}
#endregion
#endregion
#region instructions
if (jumpAssign == false && breathAssign == false &&
clawAssign == false && confAssign == false && swlAssign == false && swrAssign ==
false && upAssign == false && downAssign == false && leftAssign == false &&
rightAssign == false)
{
if (assignKey == true)
{
assignKey = false;
}
}
else
{
if (assignKey == false)
{
assignKey = true;
}
}
#endregion
}
#endregion
}
}
#endregion
#region storybook == true
if (storybook == true) //STORYBOOK INPUT
{
if (toStory == true)
{
if (overlayUp == true)
{
overlayDown = true;
}
if (fadedIn == false)
{
fadedIn = true;
}
toStory = false;
}
if (kbState.IsKeyUp(Keys.C) && confTrue == false &&
gpState.IsButtonUp(Buttons.A))
{
lastKeyC = false;
}
#region Storybook Music
if (tempVolume <= 0f)
{
if (storyHappy == true)
{
storyHappy = false;
playStoryHappy.pauseBGM();
}
if (storyEnemy == true)
{
storyEnemy = false;
playStoryEnemy.pauseBGM();
}
if (storyPulse == true)
{
storyPulse = false;
playStoryWistful.pauseBGM();
}
}
if (opacity >= 32)
{
if (storyHappy == true)
{
playStoryHappy.playBGM(volume, tempVolume);
}
if (storyEnemy == true)
{
playStoryEnemy.playBGM(volume, tempVolume);
}
if (storyPulse == true)
{
playStoryWistful.playBGM(volume, tempVolume);
}
}
#endregion
#region Storybook System
if (pageTurnWait == true)
{
pageTurnSFXWait++;
if (pageTurnSFXWait >= 60)
{
if (pageTurnPlay == false)
{
pageTurnPlay = true;
}
pageTurnSFXWait = 0;
pageTurnWait = false;
}
}
if (skipStory == true && opacity <= 0)
{
storybook = false;
skipStory = false;
}
if (whiteMatteOpacity <= 0 && blackMatteOpacity <= 0)
{
if (textFadeIn == true)
{
if (storyOpacity < 255)
{
storyOpacity = storyOpacity + 5;
}
if (storyOpacity > 255)
{
storyOpacity = 255;
}
}
if (textFadeOut == true)
{
if (storyOpacity > 0)
{
storyOpacity = storyOpacity - 5;
}
if (storyOpacity < 0)
{
storyOpacity = 0;
}
storyOpacityCT++;
}
if (pg1turn == true && storyOpacity == 0)
{
storyFGFrameCT++;
if (storyFGFrameY1 >= 4 && storyFGFrameX1 >= 2)
{
pg1turn = false;
page1Depth = -1;
page2Depth = 2;
page3Depth = 1;
}
else if (storyFGFrameCT >= 6)
{
storyFGFrameCT = 0;
if (storyFGFrameY1 < 5 && storyFGFrameX1 < 3)
{
storyFGFrameY1++;
}
if (storyFGFrameY1 >= 5 && storyFGFrameX1 < 3)
{
storyFGFrameY1 = 0;
storyFGFrameX1++;
}
}
}
if (pg2turn == true && storyOpacity == 0)
{
storyFGFrameCT++;
if (storyFGFrameY2 >= 4 && storyFGFrameX2 >= 2)
{
pg2turn = false;
page2Depth = -1;
page3Depth = 2;
page4Depth = 1;
}
else if (storyFGFrameCT >= 6)
{
storyFGFrameCT = 0;
if (storyFGFrameY2 < 5 && storyFGFrameX2 < 3)
{
storyFGFrameY2++;
}
if (storyFGFrameY2 >= 5 && storyFGFrameX2 < 3)
{
storyFGFrameY2 = 0;
storyFGFrameX2++;
}
}
}
if (pg3turn == true && storyOpacity == 0)
{
storyFGFrameCT++;
if (storyFGFrameY3 >= 4 && storyFGFrameX3 >= 2)
{
pg3turn = false;
page3Depth = -1;
page4Depth = 2;
page5Depth = 1;
}
else if (storyFGFrameCT >= 6)
{
storyFGFrameCT = 0;
if (storyFGFrameY3 < 5 && storyFGFrameX3 < 3)
{
storyFGFrameY3++;
}
if (storyFGFrameY3 >= 5 && storyFGFrameX3 < 3)
{
storyFGFrameY3 = 0;
storyFGFrameX3++;
}
}
}
if (pg4turn == true && storyOpacity == 0)
{
storyFGFrameCT++;
if (storyFGFrameY4 >= 4 && storyFGFrameX4 >= 2)
{
pg4turn = false;
page4Depth = -1;
page5Depth = 2;
page6Depth = 1;
}
else if (storyFGFrameCT >= 6)
{
storyFGFrameCT = 0;
if (storyFGFrameY4 < 5 && storyFGFrameX4 < 3)
{
storyFGFrameY4++;
}
if (storyFGFrameY4 >= 5 && storyFGFrameX4 < 3)
{
storyFGFrameY4 = 0;
storyFGFrameX4++;
}
}
}
if (pg5turn == true && storyOpacity == 0)
{
storyFGFrameCT++;
if (storyFGFrameY5 >= 4 && storyFGFrameX5 >= 2)
{
pg5turn = false;
page5Depth = -1;
page6Depth = 2;
page7Depth = 1;
}
else if (storyFGFrameCT >= 6)
{
storyFGFrameCT = 0;
if (storyFGFrameY5 < 5 && storyFGFrameX5 < 3)
{
storyFGFrameY5++;
}
if (storyFGFrameY5 >= 5 && storyFGFrameX5 < 3)
{
storyFGFrameY5 = 0;
storyFGFrameX5++;
}
}
}
if (pg6turn == true && storyOpacity == 0)
{
storyFGFrameCT++;
if (storyFGFrameY6 >= 4 && storyFGFrameX6 >= 2)
{
pg6turn = false;
page6Depth = -1;
page7Depth = 2;
}
else if (storyFGFrameCT >= 6)
{
storyFGFrameCT = 0;
if (storyFGFrameY6 < 5 && storyFGFrameX6 < 3)
{
storyFGFrameY6++;
}
if (storyFGFrameY6 >= 5 && storyFGFrameX6 < 3)
{
storyFGFrameY6 = 0;
storyFGFrameX6++;
}
}
}
if (pg7turn == true && storyOpacity == 0)
{
storyFGFrameCT++;
if (storyFGFrameY7 >= 4 && storyFGFrameX7 >= 2)
{
pg7turn = false;
page7Depth = -1;
}
else if (storyFGFrameCT >= 6)
{
storyFGFrameCT = 0;
if (storyFGFrameY7 < 5 && storyFGFrameX7 < 3)
{
storyFGFrameY7++;
}
if (storyFGFrameY7 >= 5 && storyFGFrameX7 < 3)
{
storyFGFrameY7 = 0;
storyFGFrameX7++;
}
}
}
if (storyOpacity == 0 && pg1turn == false && pg2turn == false &&
pg3turn == false && pg4turn == false && pg5turn == false && pg6turn == false &&
pg7turn == false && storyOpacityCT >= 60)
{
storyOpacityCT = 0;
textFadeIn = true;
textFadeOut = false;
if (storyEnd == true)
{
endingOverlayFrame++;
if (endpageFrameX == 2 && endpageFrameY >= 3)
{
storyTextFrameY++;
}
}
else if (storybookCredits == true)
{
creditsMonsterFrame++;
}
else
{
storyTextFrameY++;
}
}
}
#endregion
#region Story 1
if (story1 == true)
{
if (storyTextTotal == 0 && storyHappy == false)
{
musicFade = false;
tempVolume = 1.0f;
storyHappy = true;
}
if (storyTextTotal == 3 && storyEnemy == false && storyOpacity
== 255)
{
musicFade = false;
tempVolume = 1.0f;
storyEnemy = true;
}
if (opacity == 255)
{
toggleTutorial++;
if (toggleTutorial >= 150)
{
toggleTutorial = 0;
if (tutorialPos == 0)
{
tutorialPos = 2 - controlType;
}
else
{
tutorialPos = 0;
}
}
if ((kbState.IsKeyDown(Keys.C) || confTrue == true ||
gpState.IsButtonDown(Buttons.A)) && lastKeyC == false && storyOpacity == 255)
{
lastKeyC = true;
textFadeIn = false;
textFadeOut = true;
storyTextTotal++;
if (storyTextTotal == 2)
{
pg1turn = true;
musicFade = true;
pageTurnWait = true;
}
if (storyTextTotal == 3)
{
pg2turn = true;
pageTurnWait = true;
}
if (storyTextTotal == 7)
{
pg3turn = true;
pageTurnWait = true;
musicFade = true;
}
}
}
if (page3Depth < 0)
{
storybook = false;
toWorldMap = true;
fadedIn = false;
fadeWait = true;
}
if (kbState.IsKeyDown(Keys.Enter) || gpState.IsButtonDown
(Buttons.Start) && lastKeyEsc == false && skipStory == false)
{
musicFade = true;
toWorldMap = true;
fadedIn = false;
fadeWait = true;
skipStory = true;
}
}
#endregion
#region Story 1-2
if (story1_2pre == true)
{
if (storyTextTotal == 0 && storyEnemy == false)
{
musicFade = false;
tempVolume = 1.0f;
storyEnemy = true;
}
if (opacity == 255)
{
if ((kbState.IsKeyDown(Keys.C) || confTrue == true ||
gpState.IsButtonDown(Buttons.A)) && lastKeyC == false && storyOpacity == 255)
{
lastKeyC = true;
textFadeIn = false;
textFadeOut = true;
storyTextTotal++;
if (storyTextTotal == 2)
{
pg1turn = true;
pageTurnWait = true;
}
if (storyTextTotal == 3)
{
pg2turn = true;
pageTurnWait = true;
}
if (storyTextTotal == 4)
{
pg3turn = true;
pageTurnWait = true;
}
if (storyTextTotal == 7)
{
pg4turn = true;
pageTurnWait = true;
musicFade = true;
}
}
}
if (page4Depth < 0)
{
seenStory1_2 = true;
storybook = false;
toActionStage = true;
toStage1e2 = true;
fadedIn = false;
fadeWait = true;
}
if (kbState.IsKeyDown(Keys.Enter) || gpState.IsButtonDown
(Buttons.Start) && lastKeyEsc == false && skipStory == false)
{
musicFade = true;
seenStory1_2 = true;
toActionStage = true;
toStage1e2 = true;
fadedIn = false;
fadeWait = true;
skipStory = true;
}
}
#endregion
#region Story 1-B pre
if (story1_Bpre == true)
{
if (storyTextTotal == 0 && storyEnemy == false)
{
musicFade = false;
tempVolume = 1.0f;
storyEnemy = true;
}
if (opacity == 255)
{
if ((kbState.IsKeyDown(Keys.C) || confTrue == true ||
gpState.IsButtonDown(Buttons.A)) && lastKeyC == false && storyOpacity == 255)
{
lastKeyC = true;
textFadeIn = false;
textFadeOut = true;
storyTextTotal++;
if (storyTextTotal == 3)
{
pg1turn = true;
pageTurnWait = true;
}
if (storyTextTotal == 5)
{
pg2turn = true;
pageTurnWait = true;
musicFade = true;
}
}
}
if (page2Depth < 0)
{
seenStory1_B = true;
storybook = false;
toActionStage = true;
toStage1eB = true;
fadedIn = false;
fadeWait = true;
}
if (kbState.IsKeyDown(Keys.Enter) || gpState.IsButtonDown
(Buttons.Start) && lastKeyEsc == false && skipStory == false)
{
musicFade = true;
seenStory1_B = true;
toActionStage = true;
toStage1eB = true;
fadedIn = false;
fadeWait = true;
skipStory = true;
}
}
#endregion
#region Story 1-B post
if (story1_Bpost == true)
{
if (storyTextTotal == 0 && storyPulse == false)
{
musicFade = false;
tempVolume = 1.0f;
storyPulse = true;
}
if (opacity == 255)
{
if ((kbState.IsKeyDown(Keys.C) || confTrue == true ||
gpState.IsButtonDown(Buttons.A)) && lastKeyC == false && storyOpacity == 255)
{
lastKeyC = true;
textFadeIn = false;
textFadeOut = true;
storyTextTotal++;
if (storyTextTotal == 2)
{
pg1turn = true;
pageTurnWait = true;
}
if (storyTextTotal == 5)
{
pg2turn = true;
pageTurnWait = true;
musicFade = true;
}
}
}
if (page2Depth < 0)
{
haveBolt = true;
boss1Clear = true;
on2e1 = true;
on3e1 = true;
on5e1 = true;
storybook = false;
savingGame = true;
toWorldMap = true;
fadedIn = false;
fadeWait = true;
}
if (kbState.IsKeyDown(Keys.Enter) || gpState.IsButtonDown
(Buttons.Start) && lastKeyEsc == false && skipStory == false)
{
musicFade = true;
haveBolt = true;
boss1Clear = true;
on2e1 = true;
on3e1 = true;
on5e1 = true;
savingGame = true;
toWorldMap = true;
fadedIn = false;
fadeWait = true;
skipStory = true;
}
}
#endregion
#region Story Ending
if (storyEnd == true)
{
tempVolume = 1.0f;
if (opacity >= 255)
{
if (storyOpacity >= 255)
{
endingTextTimer++;
}
if (endpageFrameY == 0 && endpageFrameX < 1 &&
endingOverlayFrame < 4)
{
if (endingTextTimer >= 180)
{
endingTextTimer = 0;
textFadeIn = false;
textFadeOut = true;
}
}
if (endingOverlayFrame >= 4)
{
if (endpageCT == 0 && endpageFrameX == 0 &&
endpageFrameY == 0)
{
if (pageTurnPlay == false)
{
pageTurnPlay = true;
}
}
endpageCT++;
if (endpageCT >= 6)
{
endpageCT = 0;
if (endpageFrameY < 4)
{
endpageFrameY++;
}
if (endpageFrameY >= 4)
{
if (endpageFrameX < 2)
{
endpageFrameY = 0;
endpageFrameX++;
}
}
}
}
if (endingOverlayFrame >= 0 && storyTextTotal < 7)
{
playStoryEndingA.playBGM(volume, tempVolume);
}
if (storyTextTotal >= 7 && storyFGFrameX4 >= 1 &&
storyFGFrameY4 >= 2 && storyFGFrameX6 < 2)
{
playStoryEndingB.playBGM(volume, tempVolume);
}
if (endingTextTimer >= 560 && endpageFrameX == 2 &&
endpageFrameY >= 3)
{
endingTextTimer = 0;
textFadeIn = false;
textFadeOut = true;
storyTextTotal++;
if (storyTextTotal == 2)
{
pg1turn = true;
pageTurnWait = true;
}
if (storyTextTotal == 5)
{
pg2turn = true;
pageTurnWait = true;
}
if (storyTextTotal == 6)
{
pg3turn = true;
pageTurnWait = true;
}
if (storyTextTotal == 7)
{
pg4turn = true;
pageTurnWait = true;
}
if (storyTextTotal == 9)
{
pg5turn = true;
pageTurnWait = true;
}
if (storyTextTotal == 11)
{
pg6turn = true;
pageTurnWait = true;
}
}
if (storyFGFrameX3 == 2 && storyFGFrameY3 >= 3)
{
endingFlightCT++;
if (endingFlightCT >= 6)
{
endingFlightCT = 0;
endingFlightFrame++;
if (endingFlightAct == 3)
{
if (endingFlightFrame > 9)
{
endingFlightFrame = 9;
}
}
else if (endingFlightFrame >= 8)
{
endingFlightCycle++;
endingFlightFrame = 0;
}
}
if (have01Hatchling == true && have02Smile == true &&
have03Crest == true && have04Underpants == true && have05Sollerets == true &&
have06Scepter == true && have07Momiji == true && have08Ninjato == true && have09Ring
== true && have10Sunset == true && have11Dreihander == true && have12Endeavour ==
true && have13Doll == true && have14Liqueur == true && have15Penultima == true &&
have16Leaf == true && have17HTTYD == true && have18Gust == true && have19Shirt ==
true && have20Deduction == true && have21Topaz == true && have22Sapphire == true &&
have23Garnet == true && have24Ruby == true && have25Diamond == true)
{
if (endingFlightCycle < 3)
{
endingFlightAct = 0;
endingFlightXPos = 400;
}
else if (endingFlightCycle >= 4 && endingFlightCycle
< 6)
{
endingFlightAct = 1;
endingFlightXPos = 400;
}
else if (endingFlightCycle >= 8 && endingFlightCycle
< 9)
{
endingFlightAct = 2;
endingFlightXPos = 400;
}
else if (endingFlightCycle >= 9)
{
if (endingFlightAct != 4)
{
endingFlightAct = 4;
endingFlightFrame = 9;
endingFlightXPos = 400;
}
}
}
else
{
if (endingFlightCycle < 3)
{
endingFlightAct = 0;
endingFlightXPos = 400;
}
else if (endingFlightCycle >= 4 && endingFlightCycle
< 6)
{
endingFlightAct = 1;
endingFlightXPos = 440;
}
else if (endingFlightCycle >= 8 && endingFlightCycle
< 9)
{
endingFlightAct = 2;
endingFlightXPos = 480;
}
else if (endingFlightCycle >= 9)
{
if (endingFlightAct != 3)
{
if (splashPlay == false)
{
splashPlay = true;
}
endingFlightAct = 3;
endingFlightFrame = 0;
endingFlightXPos = 475;
}
}
}
}
}
if (page6Depth < 0)
{
toStory = true;
fadedIn = false;
fadeWait = true;
storybook = false;
storyEnd = false;
storybookCredits = true;
creditsMusicWait = 0;
creditsMusicBox = 0;
}
}
#endregion
}
#endregion
#region worldMap == true
if (worldMap == true && storybook == false) //WORLD MAP INPUT
{
if ((mapGridX == 5 && mapGridY == 1) || (mapGridX == 5 && mapGridY
== 2) || (mapGridX == 5 && mapGridY == 3) || (mapGridX == 5 && mapGridY == 4) ||
(mapGridX == 5 && mapGridY == 5) || (mapGridX == 7 && mapGridY == 8) || (mapGridX ==
7 && mapGridY == 9) || (mapGridX == 6 && mapGridY == 10) || (mapGridX == 8 &&
mapGridY == 10) || (mapGridX == 7 && mapGridY == 11) || (mapGridX == 3 && mapGridY
== 5) || (mapGridX == 2 && mapGridY == 6) || (mapGridX == 4 && mapGridY == 6) ||
(mapGridX == 3 && mapGridY == 9) || (mapGridX == 6 && mapGridY == 8) || (mapGridX ==
4 && mapGridY == 8) || (mapGridX == 5 && mapGridY == 8) || (mapGridX == 5 &&
mapGridY == 9) || (mapGridX == 5 && mapGridY == 10) || (mapGridX == 5 && mapGridY ==
0) || (mapGridX == 5 && mapGridY == 6) || (mapGridX == 5 && mapGridY == 7) ||
(mapGridX == 6 && mapGridY == 1) || (mapGridX == 8 && mapGridY == 9) || (mapGridX ==
9 && mapGridY == 10))
{
}
else
{
mapGridX = 5;
mapGridY = 1;
drgnX = 870;
drgnY = 285;
}
if (tempVolume > 0.0f && opacity >= 32)
{
playWorldMusic.playBGM(volume, tempVolume, pauseVolume);
}
drgnUnderwater = false;
if (playDefeat == true)
{
playDefeat = false;
}
if (playExit == true)
{
playExit = false;
}
if (stageExit == true)
{
stageExit = false;
endOfStage = false;
stageMusic = false;
}
if (toWorldMap == true && savingGame == false)
{
if (fadedIn == false)
{
fadedIn = true;
}
#region Calculate EXP
if (drgnHPLV > 6)
{
drgnHPLV = 6;
}
if (drgnHPXP > (10 + ((drgnHPLV * 4) / EXPReducer)))
{
if (drgnHPLV < 6)
{
drgnHPLV++;
}
else
{
drgnHPLV = 6;
}
drgnHPXP = drgnHPXP - (10 + (((drgnHPLV - 1) * 4) /
EXPReducer));
}
if (breathMaxLV > 40)
{
breathMaxLV = 40;
}
if (breathMaxXP > (((breathMax * 2) + (breathMax * ((breathMaxLV
+ 1) * (breathMaxLV + 1)))) / EXPReducer))
{
if (breathMaxLV < 40)
{
breathMaxLV++;
}
else
{
breathMaxLV = 40;
}
breathMaxXP = breathMaxXP - (((breathMax * 2) + (breathMax *
((breathMaxLV) * (breathMaxLV)))) / EXPReducer);
}
if (drgnFlyLV > 30)
{
drgnFlyLV = 30;
}
if (drgnFlyXP > (((drgnFlyMax * 3) + (drgnFlyMax * ((drgnFlyLV +
1) * (drgnFlyLV + 1)))) / EXPReducer))
{
if (drgnFlyLV < 30)
{
drgnFlyLV++;
}
else
{
drgnFlyLV = 30;
}
drgnFlyXP = drgnFlyXP - (((drgnFlyMax * 3) + (drgnFlyMax *
((drgnFlyLV) * (drgnFlyLV)))) / EXPReducer);
}
if (clawLV > 6)
{
clawLV = 6;
}
if (clawXP > ((((clawLV + 1) * (clawLV + 1)) * 10) /
EXPReducer))
{
if (clawLV < 6)
{
clawLV++;
}
else
{
clawLV = 6;
}
clawXP = clawXP - ((((clawLV) * (clawLV)) * 10) /
EXPReducer);
}
if (breathLV > 5)
{
breathLV = 5;
}
if (breathXP > ((((breathLV + 1) * (breathLV + 1)) * 13) /
EXPReducer))
{
if (breathLV < 5)
{
breathLV++;
}
else
{
breathLV = 5;
}
breathXP = breathXP - ((((breathLV) * (breathLV)) * 13) /
EXPReducer);
}
drgnHPMax = (6 + drgnHPLV + drgnHPBonus + drgnHPTreasure1 +
drgnHPTreasure2 + boss1Clean + boss2Clean + boss3Clean + boss4Clean + boss5Clean +
questHPBonus);
drgnFlyMax = (120 + (drgnFlyLV * 6) + drgnFlyBonus +
drgnFlyTreasure1 + drgnFlyTreasure2 + drgnFlyTreasure3 + drgnFlyTreasure4);
breathMax = (300 + (breathMaxLV * 6) + breathMaxBonus +
breathMaxTreasure1 + breathMaxTreasure2 + breathMaxTreasure3);
#endregion
cameraMaxX = 160;
cameraMaxY = 185;
toWorldMap = false;
titleMusic = false;
storyHappy = false;
storyEnemy = false;
}
//Camera CT
#region World Map Camera CT
mapCT++;
if (mapCT >= 18)
{
mapCT = 0;
mapFrame++;
if (mapFrame >= 4)
{
mapFrame = 0;
}
}
if (drgnY + 45 - 360 <= 0)
{
drgnCamY = 40;
}
else if (drgnY + 80 - 360 > 0)
{
if ((drgnY + 80 - 360) >= cameraMaxY)
{
drgnCamY = cameraMaxY;
}
else if ((drgnY + 80 - 360) < cameraMaxY)
{
drgnCamY = drgnY + 85 - 360;
}
}
if (drgnX + 31 - 800 <= 0)
{
drgnCamX = 0;
}
else if (drgnX + 31 - 640 > 0)
{
if ((drgnX + 31 - 640) < cameraMaxX)
{
drgnCamX = drgnX + 31 - 640;
}
else if (drgnX + 31 - 640 >= cameraMaxX)
{
drgnCamX = cameraMaxX;
}
}
#endregion
//End camera CT
if (opacity == 255 && savingGame == false)
{
#region Instructions
toggleTutorial++;
if (toggleTutorial >= 150)
{
toggleTutorial = 0;
if (tutorialPos == 0)
{
tutorialPos = 2 - controlType;
}
else
{
tutorialPos = 0;
seenTutorial = true;
}
}
worldMapCT++;
if (worldMapCT >= 60)
{
worldMapCT = 0;
if (worldMapFrame == 0)
{
worldMapFrame = 1;
}
else
{
worldMapFrame = 0;
}
}
#endregion
if ((kbState.IsKeyDown(Keys.Escape) || gpState.IsButtonDown
(Buttons.Start)) && escMenu == false && lastKeyEsc == false)
{
lastKeyEsc = true;
escMenu = true;
exitFrame = 0;
worldMapPointerModX = 0;
worldMapPointerModY = 0;
}
#region default control
if (controlType == 0)
{
#region World Map Keys Are Up
if (kbState.IsKeyUp(Keys.Up) && gpState.ThumbSticks.Left.Y
== 0 && lastKeyUp == true)
{
lastKeyUp = false;
worldMapCT = 0;
worldMapFrame = 0;
}
if (kbState.IsKeyUp(Keys.Right) &&
gpState.ThumbSticks.Left.X == 0 && lastKeyRight == true)
{
lastKeyRight = false;
worldMapCT = 0;
worldMapFrame = 0;
}
if (kbState.IsKeyUp(Keys.Down) && gpState.ThumbSticks.Left.Y
== 0 && lastKeyDown == true)
{
lastKeyDown = false;
worldMapCT = 0;
worldMapFrame = 0;
}
if (kbState.IsKeyUp(Keys.Left) && gpState.ThumbSticks.Left.X
== 0 && lastKeyLeft == true)
{
lastKeyLeft = false;
worldMapCT = 0;
worldMapFrame = 0;
}
if (kbState.IsKeyUp(Keys.C) && gpState.IsButtonUp(Buttons.A)
&& lastKeyC == true)
{
lastKeyC = false;
}
if (kbState.IsKeyUp(Keys.Escape) && gpState.IsButtonUp
(Buttons.Start) && lastKeyEsc == true)
{
lastKeyEsc = false;
}
#endregion
#region World Map Exit Menu
if (escMenu == true)
{
if ((kbState.IsKeyDown(Keys.C) || gpState.IsButtonDown
(Buttons.A)) && lastKeyC == false)
{
lastKeyC = true;
if (exitFrame == 0)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
fadedIn = false;
musicFade = true;
fadeWait = true;
toTitleScreen = true;
displayTitle = true;
}
if (exitFrame == 1)
{
if (menuNoPlay == false)
{
menuNoPlay = true;
}
escMenu = false;
}
}
if (((kbState.IsKeyDown(Keys.Right) && kbState.IsKeyUp
(Keys.Left)) || (gpState.ThumbSticks.Left.X > 0.5f)) && lastKeyRight == false)
{
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
lastKeyRight = true;
exitFrame = 1;
worldMapPointerModX = 384;
worldMapPointerModY = 5;
if (exitFrame > 1)
{
exitFrame = 1;
}
}
if (((kbState.IsKeyDown(Keys.Left) && kbState.IsKeyUp
(Keys.Right)) || (gpState.ThumbSticks.Left.X < -0.5f)) && lastKeyLeft == false)
{
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
lastKeyLeft = true;
exitFrame = 0;
worldMapPointerModX = 0;
worldMapPointerModY = 0;
if (exitFrame < 0)
{
exitFrame = 0;
}
}
}
#endregion
#region World Map Home
if (mapGridX == 5 && mapGridY == 1 && escMenu == false)
//home input
{
mapArrowUp = false;
mapArrowRight = false;
mapArrowDown = true;
mapArrowLeft = false;
if ((kbState.IsKeyDown(Keys.C) || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toHome = true;
fadeWait = true;
}
if (((kbState.IsKeyDown(Keys.Down) && kbState.IsKeyUp
(Keys.Up) && kbState.IsKeyUp(Keys.Right)) || (gpState.ThumbSticks.Left.Y < -0.5f))
&& kbState.IsKeyUp(Keys.Left) && lastKeyDown == false && fadedIn == true)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 2;
drgnX = 970;
drgnY = 360;
recallMapPosX = 970;
recallMapPosY = 360;
}
}
#endregion
//870, 285
#region World Map 1-1
if (mapGridX == 5 && mapGridY == 2 && escMenu == false)
//stage 1-1 input
{
mapArrowUp = false;
if (on1e2 == true)
{
mapArrowRight = true;
}
else
{
mapArrowRight = false;
}
mapArrowDown = false;
mapArrowLeft = true;
if ((kbState.IsKeyDown(Keys.C) || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toStage1e1 = true;
fadeWait = true;
}
if (((kbState.IsKeyDown(Keys.Left) && kbState.IsKeyUp
(Keys.Down) && kbState.IsKeyUp(Keys.Right) && kbState.IsKeyUp(Keys.Up)) ||
(gpState.ThumbSticks.Left.X < -0.5)) && lastKeyLeft == false && fadedIn == true)
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 1;
drgnX = 870;
drgnY = 285;
recallMapPosX = 870;
recallMapPosY = 285;
}
if (on1e2 == true && ((kbState.IsKeyDown(Keys.Right) &&
kbState.IsKeyUp(Keys.Left) && kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp
(Keys.Down)) || (gpState.ThumbSticks.Left.X > 0.5f)) && lastKeyRight == false &&
fadedIn == true)
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 3;
drgnX = 1140;
drgnY = 380;
recallMapPosX = 1140;
recallMapPosY = 380;
}
}
#endregion
//970, 360
#region World Map 1-2
if (mapGridX == 5 && mapGridY == 3 && escMenu == false)
{
mapArrowUp = false;
if (on1e3 == true)
{
mapArrowRight = true;
}
else
{
mapArrowRight = false;
}
mapArrowDown = false;
mapArrowLeft = true;
if ((kbState.IsKeyDown(Keys.C) || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
if (seenStory1_2 == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toStory = true;
story1_2pre = true;
fadeWait = true;
}
else if (seenStory1_2 == true)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toStage1e2 = true;
fadeWait = true;
}
}
if ((kbState.IsKeyDown(Keys.A) || gpState.IsButtonDown
(Buttons.Y)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toStory = true;
story1_2pre = true;
fadeWait = true;
}
if (((kbState.IsKeyDown(Keys.Left) && kbState.IsKeyUp
(Keys.Down) && kbState.IsKeyUp(Keys.Right) && kbState.IsKeyUp(Keys.Up)) ||
(gpState.ThumbSticks.Left.X < -0.5f)) && lastKeyLeft == false && fadedIn == true)
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 2;
drgnX = 970;
drgnY = 360;
recallMapPosX = 970;
recallMapPosY = 360;
}
if (on1e3 == true && ((kbState.IsKeyDown(Keys.Right) &&
kbState.IsKeyUp(Keys.Left) && kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp
(Keys.Down)) || (gpState.ThumbSticks.Left.X > 0.5f)) && lastKeyRight == false &&
fadedIn == true)
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 4;
drgnX = 1300;
drgnY = 405;
recallMapPosX = 1300;
recallMapPosY = 405;
}
}
#endregion
//1140, 380
#region World Map 1-3
if (mapGridX == 5 && mapGridY == 4 && escMenu == false)
//stage 1-3 input
{
if (on6e1 == true)
{
mapArrowUp = true;
}
else
{
mapArrowUp = false;
}
mapArrowRight = false;
if (on1eB == true)
{
mapArrowDown = true;
}
else
{
mapArrowDown = false;
}
mapArrowLeft = true;
if ((kbState.IsKeyDown(Keys.C) || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toStage1e3 = true;
fadeWait = true;
}
if (((kbState.IsKeyDown(Keys.Left) && kbState.IsKeyUp
(Keys.Down) && kbState.IsKeyUp(Keys.Right) && kbState.IsKeyUp(Keys.Up)) ||
(gpState.ThumbSticks.Left.X < -0.5f)) && lastKeyLeft == false && fadedIn == true)
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 3;
drgnX = 1140;
drgnY = 380;
recallMapPosX = 1140;
recallMapPosY = 380;
}
if (on1eB == true && ((kbState.IsKeyDown(Keys.Down) &&
kbState.IsKeyUp(Keys.Left) && kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp
(Keys.Right)) || (gpState.ThumbSticks.Left.Y < -0.5f)) && lastKeyDown == false &&
fadedIn == true)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 5;
drgnX = 1100;
drgnY = 495;
recallMapPosX = 1100;
recallMapPosY = 495;
}
if (on6e1 == true && ((kbState.IsKeyDown(Keys.Up) &&
kbState.IsKeyUp(Keys.Left) && kbState.IsKeyUp(Keys.Right) && kbState.IsKeyUp
(Keys.Down)) || (gpState.ThumbSticks.Left.Y > 0.5f)) && lastKeyUp == false &&
fadedIn == true)
{
lastKeyUp = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 6;
mapGridY = 1;
drgnX = 1270;
drgnY = 215;
recallMapPosX = 1270;
recallMapPosY = 215;
}
}
#endregion
//1300, 405
#region World Map 1-B
if (mapGridX == 5 && mapGridY == 5 && escMenu == false)
//stage 1-B input
{
if (boss1Clear == true)
{
mapArrowUp = true;
mapArrowDown = true;
mapArrowLeft = true;
}
else
{
mapArrowUp = false;
mapArrowDown = false;
mapArrowLeft = false;
}
mapArrowRight = true;
if ((kbState.IsKeyDown(Keys.C) || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
if (seenStory1_B == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toStory = true;
story1_Bpre = true;
fadeWait = true;
}
else if (seenStory1_B == true)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toStage1eB = true;
fadeWait = true;
}
}
if ((kbState.IsKeyDown(Keys.A) || gpState.IsButtonDown
(Buttons.Y)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toStory = true;
story1_Bpre = true;
fadeWait = true;
}
if (((kbState.IsKeyDown(Keys.Right) && kbState.IsKeyUp
(Keys.Down) && kbState.IsKeyUp(Keys.Left) && kbState.IsKeyUp(Keys.Up)) ||
(gpState.ThumbSticks.Left.X > 0.5f)) && lastKeyRight == false && fadedIn == true)
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 4;
drgnX = 1300;
drgnY = 405;
recallMapPosX = 1300;
recallMapPosY = 405;
}
if (on2e1 == true && ((kbState.IsKeyDown(Keys.Down) &&
kbState.IsKeyUp(Keys.Left) && kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp
(Keys.Right)) || (gpState.ThumbSticks.Left.Y < -0.5f)) && lastKeyDown == false &&
fadedIn == true)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 7;
mapGridY = 8;
drgnX = 990;
drgnY = 635;
recallMapPosX = 990;
recallMapPosY = 635;
}
if (on3e1 == true && ((kbState.IsKeyDown(Keys.Up) &&
kbState.IsKeyUp(Keys.Down) && kbState.IsKeyUp(Keys.Left) && kbState.IsKeyUp
(Keys.Right)) || (gpState.ThumbSticks.Left.Y > 0.5f)) && lastKeyUp == false &&
fadedIn == true)
{
lastKeyUp = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 3;
mapGridY = 5;
drgnX = 770;
drgnY = 355;
recallMapPosX = 770;
recallMapPosY = 355;
}
if (on5e1 == true && ((kbState.IsKeyDown(Keys.Left) &&
kbState.IsKeyUp(Keys.Down) && kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp
(Keys.Right)) || (gpState.ThumbSticks.Left.X < -0.5f)) && lastKeyLeft == false &&
fadedIn == true)
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 5;
mapGridY = 0;
drgnX = 880;
drgnY = 470;
recallMapPosX = 880;
recallMapPosY = 470;
}
}
#endregion
//1100, 495
#region World Map 5-1
if (mapGridX == 5 && mapGridY == 0 && escMenu == false)
//stage 5-1 input
{
mapArrowUp = false;
mapArrowRight = true;
mapArrowDown = false;
if (on5e2 == true)
{
mapArrowLeft = true;
}
else
{
mapArrowLeft = false;
}
if ((kbState.IsKeyDown(Keys.C) || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toStage5e1 = true;
fadeWait = true;
}
if (((kbState.IsKeyDown(Keys.Right) && kbState.IsKeyUp
(Keys.Down) && kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.Left)) ||
(gpState.ThumbSticks.Left.X > 0.5f)) && lastKeyRight == false && fadedIn == true)
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 5;
mapGridY = 5;
drgnX = 1100;
drgnY = 495;
recallMapPosX = 1100;
recallMapPosY = 495;
}
if (on5e2 == true && ((kbState.IsKeyDown(Keys.Left) &&
kbState.IsKeyUp(Keys.Down) && kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp
(Keys.Right)) || (gpState.ThumbSticks.Left.X < -0.5f)) && lastKeyLeft == false &&
fadedIn == true)
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 5;
mapGridY = 6;
drgnX = 730;
drgnY = 445;
recallMapPosX = 730;
recallMapPosY = 445;
}
}
#endregion
//880, 470
}
#endregion
#region custom control
if (controlType == 1)
{
#region World Map Keys Are Up
if (upTrue == false && gpState.ThumbSticks.Left.Y == 0 &&
lastKeyUp == true)
{
lastKeyUp = false;
worldMapCT = 0;
worldMapFrame = 0;
}
if (rightTrue == false && gpState.ThumbSticks.Left.X == 0 &&
lastKeyRight == true)
{
lastKeyRight = false;
worldMapCT = 0;
worldMapFrame = 0;
}
if (downTrue == false && gpState.ThumbSticks.Left.Y == 0 &&
lastKeyDown == true)
{
lastKeyDown = false;
worldMapCT = 0;
worldMapFrame = 0;
}
if (leftTrue == false && gpState.ThumbSticks.Left.X == 0 &&
lastKeyLeft == true)
{
lastKeyLeft = false;
worldMapCT = 0;
worldMapFrame = 0;
}
if (confTrue == false && breathTrue == false &&
gpState.IsButtonUp(Buttons.A) && gpState.IsButtonUp(Buttons.Y) && lastKeyC == true)
{
lastKeyC = false;
}
if (kbState.IsKeyUp(Keys.Escape) && gpState.IsButtonUp
(Buttons.Start) && lastKeyEsc == true)
{
lastKeyEsc = false;
}
#endregion
#region World Map Exit Menu
if (escMenu == true)
{
if ((confTrue == true || gpState.IsButtonDown
(Buttons.A)) && lastKeyC == false)
{
lastKeyC = true;
if (exitFrame == 0)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
fadedIn = false;
musicFade = true;
fadeWait = true;
toTitleScreen = true;
displayTitle = true;
}
if (exitFrame == 1)
{
if (menuNoPlay == false)
{
menuNoPlay = true;
}
escMenu = false;
}
}
if (((rightTrue == true && leftTrue == false) ||
(gpState.ThumbSticks.Left.X > 0.5f)) && lastKeyRight == false)
{
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
lastKeyRight = true;
exitFrame = 1;
worldMapPointerModX = 384;
worldMapPointerModY = 5;
if (exitFrame > 1)
{
exitFrame = 1;
}
}
if (((leftTrue == true && rightTrue == false) ||
(gpState.ThumbSticks.Left.X < -0.5f)) && lastKeyLeft == false)
{
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
lastKeyLeft = true;
exitFrame = 0;
worldMapPointerModX = 0;
worldMapPointerModY = 0;
if (exitFrame < 0)
{
exitFrame = 0;
}
}
}
#endregion
#region World Map Home
if (mapGridX == 5 && mapGridY == 1 && escMenu == false)
//home input
{
mapArrowUp = false;
mapArrowRight = false;
mapArrowDown = true;
mapArrowLeft = false;
if ((confTrue == true || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toHome = true;
fadeWait = true;
}
if (((downTrue == true && upTrue == false && rightTrue
== false) || (gpState.ThumbSticks.Left.Y < -0.5f)) && leftTrue == false &&
lastKeyDown == false && fadedIn == true)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 2;
drgnX = 970;
drgnY = 360;
recallMapPosX = 970;
recallMapPosY = 360;
}
}
#endregion
//870, 285
#region World Map 1-1
if (mapGridX == 5 && mapGridY == 2 && escMenu == false)
//stage 1-1 input
{
mapArrowUp = false;
if (on1e2 == true)
{
mapArrowRight = true;
}
else
{
mapArrowRight = false;
}
mapArrowDown = false;
mapArrowLeft = true;
if ((confTrue == true || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toStage1e1 = true;
fadeWait = true;
}
if (((leftTrue == true && downTrue == false && rightTrue
== false && upTrue == false) || (gpState.ThumbSticks.Left.X < -0.5)) && lastKeyLeft
== false && fadedIn == true)
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 1;
drgnX = 870;
drgnY = 285;
recallMapPosX = 870;
recallMapPosY = 285;
}
if (on1e2 == true && ((rightTrue == true && leftTrue ==
false && upTrue == false && downTrue == false) || (gpState.ThumbSticks.Left.X >
0.5f)) && lastKeyRight == false && fadedIn == true)
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 3;
drgnX = 1140;
drgnY = 380;
recallMapPosX = 1140;
recallMapPosY = 380;
}
}
#endregion
//970, 360
#region World Map 1-2
if (mapGridX == 5 && mapGridY == 3 && escMenu == false)
{
mapArrowUp = false;
if (on1e3 == true)
{
mapArrowRight = true;
}
else
{
mapArrowRight = false;
}
mapArrowDown = false;
mapArrowLeft = true;
if ((confTrue == true || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
if (seenStory1_2 == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toStory = true;
story1_2pre = true;
fadeWait = true;
}
else if (seenStory1_2 == true)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toStage1e2 = true;
fadeWait = true;
}
}
if ((breathTrue == true || gpState.IsButtonDown
(Buttons.Y)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toStory = true;
story1_2pre = true;
fadeWait = true;
}
if (((leftTrue == true && downTrue == false && rightTrue
== false && upTrue == false) || (gpState.ThumbSticks.Left.X < -0.5f)) && lastKeyLeft
== false && fadedIn == true)
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 2;
drgnX = 970;
drgnY = 360;
recallMapPosX = 970;
recallMapPosY = 360;
}
if (on1e3 == true && ((rightTrue == true && leftTrue ==
false && upTrue == false && downTrue == false) || (gpState.ThumbSticks.Left.X >
0.5f)) && lastKeyRight == false && fadedIn == true)
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 4;
drgnX = 1300;
drgnY = 405;
recallMapPosX = 1300;
recallMapPosY = 405;
}
}
#endregion
//1140, 380
#region World Map 1-3
if (mapGridX == 5 && mapGridY == 4 && escMenu == false)
//stage 1-3 input
{
if (on6e1 == true)
{
mapArrowUp = true;
}
else
{
mapArrowUp = false;
}
mapArrowRight = false;
if (on1eB == true)
{
mapArrowDown = true;
}
else
{
mapArrowDown = false;
}
mapArrowLeft = true;
if ((confTrue == true || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toStage1e3 = true;
fadeWait = true;
}
if (((leftTrue == true && downTrue == false && rightTrue
== false && upTrue == false) || (gpState.ThumbSticks.Left.X < -0.5f)) && lastKeyLeft
== false && fadedIn == true)
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 3;
drgnX = 1140;
drgnY = 380;
recallMapPosX = 1140;
recallMapPosY = 380;
}
if (on1eB == true && ((downTrue == true && leftTrue ==
false && upTrue == false && rightTrue == false) || (gpState.ThumbSticks.Left.Y < -
0.5f)) && lastKeyDown == false && fadedIn == true)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 5;
drgnX = 1100;
drgnY = 495;
recallMapPosX = 1100;
recallMapPosY = 495;
}
if (on6e1 == true && ((upTrue == true && leftTrue ==
false && rightTrue == false && downTrue == false) || (gpState.ThumbSticks.Left.Y >
0.5f)) && lastKeyUp == false && fadedIn == true)
{
lastKeyUp = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 6;
mapGridY = 1;
drgnX = 1270;
drgnY = 215;
recallMapPosX = 1270;
recallMapPosY = 215;
}
}
#endregion
//1300, 405
#region World Map 1-B
if (mapGridX == 5 && mapGridY == 5 && escMenu == false)
//stage 1-B input
{
if (boss1Clear == true)
{
mapArrowUp = true;
mapArrowDown = true;
mapArrowLeft = true;
}
else
{
mapArrowUp = false;
mapArrowDown = false;
mapArrowLeft = false;
}
mapArrowRight = true;
if ((confTrue == true || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
if (seenStory1_B == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toStory = true;
story1_Bpre = true;
fadeWait = true;
}
else if (seenStory1_B == true)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toStage1eB = true;
fadeWait = true;
}
}
if ((breathTrue == true || gpState.IsButtonDown
(Buttons.Y)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toStory = true;
story1_Bpre = true;
fadeWait = true;
}
if (((rightTrue == true && downTrue == false && leftTrue
== false && upTrue == false) || (gpState.ThumbSticks.Left.X > 0.5f)) && lastKeyRight
== false && fadedIn == true)
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridY = 4;
drgnX = 1300;
drgnY = 405;
recallMapPosX = 1300;
recallMapPosY = 405;
}
if (on2e1 == true && ((downTrue == true && leftTrue ==
false && upTrue == false && rightTrue == false) || (gpState.ThumbSticks.Left.Y < -
0.5f)) && lastKeyDown == false && fadedIn == true)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 7;
mapGridY = 8;
drgnX = 990;
drgnY = 635;
recallMapPosX = 990;
recallMapPosY = 635;
}
if (on3e1 == true && ((upTrue == true && downTrue ==
false && leftTrue == false && rightTrue == false) || (gpState.ThumbSticks.Left.Y >
0.5f)) && lastKeyUp == false && fadedIn == true)
{
lastKeyUp = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 3;
mapGridY = 5;
drgnX = 770;
drgnY = 355;
recallMapPosX = 770;
recallMapPosY = 355;
}
if (on5e1 == true && ((leftTrue == true && downTrue ==
false && upTrue == false && rightTrue == false) || (gpState.ThumbSticks.Left.X < -
0.5f)) && lastKeyLeft == false && fadedIn == true)
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 5;
mapGridY = 0;
drgnX = 880;
drgnY = 470;
recallMapPosX = 880;
recallMapPosY = 470;
}
}
#endregion
//1100, 495
#region World Map 5-1
if (mapGridX == 5 && mapGridY == 0 && escMenu == false)
//stage 5-1 input
{
mapArrowUp = false;
mapArrowRight = true;
mapArrowDown = false;
if (on5e2 == true)
{
mapArrowLeft = true;
}
else
{
mapArrowLeft = false;
}
if ((confTrue == true || gpState.IsButtonDown
(Buttons.A)) && fadedIn == true && lastKeyC == false)
{
fadedIn = false;
musicFade = true;
lastKeyC = true;
if (menuYesPlay == false)
{
menuYesPlay = true;
}
toActionStage = true;
toStage5e1 = true;
fadeWait = true;
}
if (((rightTrue == true && downTrue == false && upTrue
== false && leftTrue == false) || (gpState.ThumbSticks.Left.X > 0.5f)) &&
lastKeyRight == false && fadedIn == true)
{
lastKeyRight = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 5;
mapGridY = 5;
drgnX = 1100;
drgnY = 495;
recallMapPosX = 1100;
recallMapPosY = 495;
}
if (on5e2 == true && ((leftTrue == true && downTrue ==
false && upTrue == false && rightTrue == false) || (gpState.ThumbSticks.Left.X < -
0.5f)) && lastKeyLeft == false && fadedIn == true)
{
lastKeyLeft = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
mapGridX = 5;
mapGridY = 6;
drgnX = 730;
drgnY = 445;
recallMapPosX = 730;
recallMapPosY = 445;
}
}
#endregion
//880, 470
}
#endregion
}
}
#endregion
#region actionStage == true
if (actionStage == true && storybook == false)
{
if (toActionStage == true)
{
if (fadedIn == false)
{
fadedIn = true;
}
toActionStage = false;
}
#region Handle Rectangle
Clawframe = new Rectangle((clawFrame * 80) + clawFrame, ((clawSize +
clawDir) * 144) + (clawSize + clawDir), 80, 144);
Breathframe = new Rectangle((breathFrame * 108) + breathFrame,
(((breathType + breathTypeSix) + breathDir) * 79) + ((breathType + breathTypeSix) +
breathDir), 108, 79);
BreathHitbox = new Rectangle(drgnX + breathX, drgnY + 6, 214, 79);
ClawHitbox = new Rectangle(drgnX + clawX, drgnY + 5, clawhitboxsize
+ 10, 134);
drgnpipDL = new Rectangle(drgnX + 29, drgnY + 140, 22, 4);
drgnpipDC = new Rectangle(drgnX + 54, drgnY + 140, 12, 4);
drgnpipDR = new Rectangle(drgnX + 94, drgnY + 140, 12, 4);
drgnpipCL = new Rectangle(drgnX + 29, drgnY + 70, 4, 70);
drgnpipCR = new Rectangle(drgnX + 94, drgnY + 70, 4, 70);
drgnpipUL = new Rectangle(drgnX + 29, drgnY + 20, 4, 50);
drgnpipUC = new Rectangle(drgnX + 54, drgnY + 20, 4, 12);
drgnpipUR = new Rectangle(drgnX + 94, drgnY + 20, 4, 50);
drgnhitboxHead = new Rectangle(drgnX + drgnFacingHitbox, drgnY + 15
+ duckingYMod, 57, 69 / ducking);
drgnhitbox = new Rectangle(drgnX + 20, drgnY + 80, 107, 55);
#endregion
#region While Paused
if (kbState.IsKeyUp(Keys.Enter) && gpState.IsButtonUp(Buttons.Start)
&& lastKeyEsc == true)
{
lastKeyEsc = false;
}
if (actionStagePause == true)
{
if (pauseVolume != 0.0f)
{
pauseVolume = 0.0f;
}
if ((kbState.IsKeyDown(Keys.Enter) || gpState.IsButtonDown
(Buttons.Start)) && lastKeyEsc == false)
{
lastKeyEsc = true;
actionStagePause = false;
}
#region pause menu
toggleTutorial++;
if (toggleTutorial >= 75 && toggleTutorial < 150)
{
if (showPause == true)
{
showPause = false;
}
}
if (toggleTutorial >= 150)
{
toggleTutorial = 0;
if (tutorialPos == 0)
{
tutorialPos = 2 - controlType;
}
else
{
tutorialPos = 0;
}
if (pausePos == 0)
{
pausePos = 1;
}
else
{
pausePos = 0;
}
if (showPause == false)
{
showPause = true;
}
}
if (helpOpacity > 0)
{
if (helpCT > 0)
{
helpCT--;
}
else
{
helpOpacity -= 5;
}
}
if (helpOpacity < 0)
{
helpOpacity = 0;
}
#endregion
#region breath controls
if (drgnFire == false)
{
if (kbState.IsKeyUp(Keys.Q) && swlTrue == false &&
gpState.IsButtonUp(Buttons.LeftShoulder) && lastKeyQ == true)
{
lastKeyQ = false;
}
if (kbState.IsKeyUp(Keys.W) && swrTrue == false &&
gpState.IsButtonUp(Buttons.RightShoulder) && lastKeyW == true)
{
lastKeyW = false;
}
}
#region default
if (((kbState.IsKeyDown(Keys.Q) && kbState.IsKeyUp(Keys.A)) ||
(gpState.IsButtonDown(Buttons.LeftShoulder) && gpState.IsButtonUp(Buttons.X))) &&
underwaterBreath == false)
{
if (lastKeyQ == false)
{
lastKeyQ = true;
lastKeyW = true;
breathType--;
if (tutorialOn == true && seenTutorial == true)
{
tutorialOn = false;
}
if (breathType < 0)
{
breathType = 4;
}
if (breathType == 4 && haveGanja == false)
{
breathType = 3;
}
if (breathType == 3 && haveAcid == false)
{
breathType = 2;
}
if (breathType == 2 && haveFrost == false)
{
breathType = 1;
}
if (breathType == 1 && haveBolt == false)
{
breathType = 0;
}
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
}
if (((kbState.IsKeyDown(Keys.W) && kbState.IsKeyUp(Keys.A)) ||
(gpState.IsButtonDown(Buttons.RightShoulder) && gpState.IsButtonUp(Buttons.X))) &&
underwaterBreath == false)
{
if (lastKeyW == false)
{
lastKeyW = true;
lastKeyQ = true;
breathType++;
if (tutorialOn == true && seenTutorial == true)
{
tutorialOn = false;
}
if (breathType >= 5)
{
breathType = 0;
}
if (breathType == 1 && haveBolt == false)
{
breathType = 2;
}
if (breathType == 2 && haveFrost == false)
{
breathType = 3;
}
if (breathType == 3 && haveAcid == false)
{
breathType = 4;
}
if (breathType == 4 && haveGanja == false)
{
breathType = 0;
}
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
}
if (((kbState.IsKeyDown(Keys.Q) && kbState.IsKeyDown(Keys.W) &&
kbState.IsKeyUp(Keys.A)) || (gpState.IsButtonDown(Buttons.LeftShoulder) &&
gpState.IsButtonDown(Buttons.RightShoulder) && gpState.IsButtonUp(Buttons.X))) &&
underwaterBreath == false)
{
lastKeyW = true;
lastKeyQ = true;
breathType = 0;
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
#endregion
#region custom
if (((swlTrue == true && breathTrue == false) ||
(gpState.IsButtonDown(Buttons.LeftShoulder) && gpState.IsButtonUp(Buttons.X))) &&
underwaterBreath == false)
{
if (lastKeyQ == false)
{
lastKeyQ = true;
lastKeyW = true;
breathType--;
if (tutorialOn == true && seenTutorial == true)
{
tutorialOn = false;
}
if (breathType < 0)
{
breathType = 4;
}
if (breathType == 4 && haveGanja == false)
{
breathType = 3;
}
if (breathType == 3 && haveAcid == false)
{
breathType = 2;
}
if (breathType == 2 && haveFrost == false)
{
breathType = 1;
}
if (breathType == 1 && haveBolt == false)
{
breathType = 0;
}
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
}
if (((swrTrue == true && breathTrue == false) ||
(gpState.IsButtonDown(Buttons.RightShoulder) && gpState.IsButtonUp(Buttons.X))) &&
underwaterBreath == false)
{
if (lastKeyW == false)
{
lastKeyW = true;
lastKeyQ = true;
breathType++;
if (tutorialOn == true && seenTutorial == true)
{
tutorialOn = false;
}
if (breathType >= 5)
{
breathType = 0;
}
if (breathType == 1 && haveBolt == false)
{
breathType = 2;
}
if (breathType == 2 && haveFrost == false)
{
breathType = 3;
}
if (breathType == 3 && haveAcid == false)
{
breathType = 4;
}
if (breathType == 4 && haveGanja == false)
{
breathType = 0;
}
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
}
if (((swlTrue == true && swrTrue == true && breathTrue == false)
|| (gpState.IsButtonDown(Buttons.LeftShoulder) && gpState.IsButtonDown
(Buttons.RightShoulder) && gpState.IsButtonUp(Buttons.X))) && underwaterBreath ==
false)
{
lastKeyW = true;
lastKeyQ = true;
breathType = 0;
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
#endregion
#endregion
#region 3-2
if (stage3e2 == true)
{
loopFlameAtk.pauseSFX();
}
#endregion
#region quick exit
if (lastKeyEsc == false && (kbState.IsKeyDown(Keys.Space) ||
gpState.IsButtonDown(Buttons.Back)))
{
if (stage1e1 == true && on1e2 == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage1e2 == true && on1e3 == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage1e3 == true && on1eB == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage1eB == true && boss1Clear == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage2e1 == true && on2e2 == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage2e2 == true && on2e3 == true)
{
seenStory2_2 = true;
stageExit = true;
actionStagePause = false;
}
if (stage2e3 == true && on2eB == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage2e4 == true && on2eB == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage2eB == true && boss2Clear == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage3e1 == true && on3e2 == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage3e2 == true && on3e3 == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage3e3 == true && on3eB == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage3eB == true && boss3Clear == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage4e1 == true && on4e1 == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage4e2 == true && on4e2 == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage4e3 == true && on4e4 == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage4e4 == true && on4eB == true)
{
stageExit = true;
actionStagePause = false;
}
if (on4eB == true && boss4Clear == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage5e2 == true && on5eB == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage5eB == true && boss5Clear == true)
{
stageExit = true;
actionStagePause = false;
}
if (stage6e1 == true && haveGanja == true)
{
seenStory6_1 = true;
stageExit = true;
actionStagePause = false;
}
if (stage6eB == true && have15Penultima == true)
{
stageExit = true;
actionStagePause = false;
}
}
#endregion
}
#endregion
if (actionStagePause == false)
{
if (pauseVolume != 1.0f)
{
pauseVolume = 1.0f;
}
#region DrawGold
if (updateGold == true)
{
updateGold = false;
#region hundred thousand
if (goldNow - 900000 >= 0)
{
hundkNow = 9;
}
else if (goldNow - 800000 >= 0)
{
hundkNow = 8;
}
else if (goldNow - 700000 >= 0)
{
hundkNow = 7;
}
else if (goldNow - 600000 >= 0)
{
hundkNow = 6;
}
else if (goldNow - 500000 >= 0)
{
hundkNow = 5;
}
else if (goldNow - 400000 >= 0)
{
hundkNow = 4;
}
else if (goldNow - 300000 >= 0)
{
hundkNow = 3;
}
else if (goldNow - 200000 >= 0)
{
hundkNow = 2;
}
else if (goldNow - 100000 >= 0)
{
hundkNow = 1;
}
else if (goldNow - 100000 < 0)
{
hundkNow = 0;
}
#endregion
#region ten thousand
if ((goldNow - (hundkNow * 100000)) - 90000 >= 0)
{
tenkNow = 9;
}
else if ((goldNow - (hundkNow * 100000)) - 80000 >= 0)
{
tenkNow = 8;
}
else if ((goldNow - (hundkNow * 100000)) - 70000 >= 0)
{
tenkNow = 7;
}
else if ((goldNow - (hundkNow * 100000)) - 60000 >= 0)
{
tenkNow = 6;
}
else if ((goldNow - (hundkNow * 100000)) - 50000 >= 0)
{
tenkNow = 5;
}
else if ((goldNow - (hundkNow * 100000)) - 40000 >= 0)
{
tenkNow = 4;
}
else if ((goldNow - (hundkNow * 100000)) - 30000 >= 0)
{
tenkNow = 3;
}
else if ((goldNow - (hundkNow * 100000)) - 20000 >= 0)
{
tenkNow = 2;
}
else if ((goldNow - (hundkNow * 100000)) - 10000 >= 0)
{
tenkNow = 1;
}
else if ((goldNow - (hundkNow * 100000)) - 10000 < 0)
{
tenkNow = 0;
}
#endregion
#region thousand
if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000))) -
9000 >= 0)
{
thouNow = 9;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow *
10000))) - 8000 >= 0)
{
thouNow = 8;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow *
10000))) - 7000 >= 0)
{
thouNow = 7;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow *
10000))) - 6000 >= 0)
{
thouNow = 6;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow *
10000))) - 5000 >= 0)
{
thouNow = 5;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow *
10000))) - 4000 >= 0)
{
thouNow = 4;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow *
10000))) - 3000 >= 0)
{
thouNow = 3;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow *
10000))) - 2000 >= 0)
{
thouNow = 2;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow *
10000))) - 1000 >= 0)
{
thouNow = 1;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow *
10000))) - 1000 < 0)
{
thouNow = 0;
}
#endregion
#region hundred
if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000) +
(thouNow * 1000))) - 900 >= 0)
{
hundNow = 9;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000))) - 800 >= 0)
{
hundNow = 8;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000))) - 700 >= 0)
{
hundNow = 7;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000))) - 600 >= 0)
{
hundNow = 6;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000))) - 500 >= 0)
{
hundNow = 5;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000))) - 400 >= 0)
{
hundNow = 4;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000))) - 300 >= 0)
{
hundNow = 3;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000))) - 200 >= 0)
{
hundNow = 2;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000))) - 100 >= 0)
{
hundNow = 1;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000))) - 100 < 0)
{
hundNow = 0;
}
#endregion
#region ten
if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000) +
(thouNow * 1000) + (hundNow * 100))) - 90 >= 0)
{
tenNow = 9;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100))) - 80 >= 0)
{
tenNow = 8;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100))) - 70 >= 0)
{
tenNow = 7;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100))) - 60 >= 0)
{
tenNow = 6;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100))) - 50 >= 0)
{
tenNow = 5;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100))) - 40 >= 0)
{
tenNow = 4;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100))) - 30 >= 0)
{
tenNow = 3;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100))) - 20 >= 0)
{
tenNow = 2;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100))) - 10 >= 0)
{
tenNow = 1;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100))) - 10 < 0)
{
tenNow = 0;
}
#endregion
#region one
if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000) +
(thouNow * 1000) + (hundNow * 100) + (tenNow * 10))) - 9 >= 0)
{
oneNow = 9;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100) + (tenNow * 10))) - 8 >= 0)
{
oneNow = 8;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100) + (tenNow * 10))) - 7 >= 0)
{
oneNow = 7;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100) + (tenNow * 10))) - 6 >= 0)
{
oneNow = 6;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100) + (tenNow * 10))) - 5 >= 0)
{
oneNow = 5;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100) + (tenNow * 10))) - 4 >= 0)
{
oneNow = 4;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100) + (tenNow * 10))) - 3 >= 0)
{
oneNow = 3;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100) + (tenNow * 10))) - 2 >= 0)
{
oneNow = 2;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100) + (tenNow * 10))) - 1 >= 0)
{
oneNow = 1;
}
else if ((goldNow - ((hundkNow * 100000) + (tenkNow * 10000)
+ (thouNow * 1000) + (hundNow * 100) + (tenNow * 10))) - 1 <= 0)
{
oneNow = 0;
}
#endregion
if (goldNow < 0)
{
goldNow = 0;
}
if (goldNow >= 10000)
{
achievements.UpdateAch(-1, 1, -1, -1, -1, -1, -1, -1, -
1, -1, -1, -1, -1, -1, -1);
}
if (stageHome == true)
{
#region hundred thousand
if (goldAvailable - 900000 >= 0)
{
hundkTotal = 9;
}
else if (goldAvailable - 800000 >= 0)
{
hundkTotal = 8;
}
else if (goldAvailable - 700000 >= 0)
{
hundkTotal = 7;
}
else if (goldAvailable - 600000 >= 0)
{
hundkTotal = 6;
}
else if (goldAvailable - 500000 >= 0)
{
hundkTotal = 5;
}
else if (goldAvailable - 400000 >= 0)
{
hundkTotal = 4;
}
else if (goldAvailable - 300000 >= 0)
{
hundkTotal = 3;
}
else if (goldAvailable - 200000 >= 0)
{
hundkTotal = 2;
}
else if (goldAvailable - 100000 >= 0)
{
hundkTotal = 1;
}
else if (goldAvailable - 100000 < 0)
{
hundkTotal = 0;
}
#endregion
#region ten thousand
if ((goldAvailable - (hundkTotal * 100000)) - 90000 >=
0)
{
tenkTotal = 9;
}
else if ((goldAvailable - (hundkTotal * 100000)) - 80000
>= 0)
{
tenkTotal = 8;
}
else if ((goldAvailable - (hundkTotal * 100000)) - 70000
>= 0)
{
tenkTotal = 7;
}
else if ((goldAvailable - (hundkTotal * 100000)) - 60000
>= 0)
{
tenkTotal = 6;
}
else if ((goldAvailable - (hundkTotal * 100000)) - 50000
>= 0)
{
tenkTotal = 5;
}
else if ((goldAvailable - (hundkTotal * 100000)) - 40000
>= 0)
{
tenkTotal = 4;
}
else if ((goldAvailable - (hundkTotal * 100000)) - 30000
>= 0)
{
tenkTotal = 3;
}
else if ((goldAvailable - (hundkTotal * 100000)) - 20000
>= 0)
{
tenkTotal = 2;
}
else if ((goldAvailable - (hundkTotal * 100000)) - 10000
>= 0)
{
tenkTotal = 1;
}
else if ((goldAvailable - (hundkTotal * 100000)) - 10000
< 0)
{
tenkTotal = 0;
}
#endregion
#region thousand
if ((goldAvailable - ((hundkTotal * 100000) + (tenkTotal
* 10000))) - 9000 >= 0)
{
thouTotal = 9;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000))) - 8000 >= 0)
{
thouTotal = 8;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000))) - 7000 >= 0)
{
thouTotal = 7;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000))) - 6000 >= 0)
{
thouTotal = 6;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000))) - 5000 >= 0)
{
thouTotal = 5;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000))) - 4000 >= 0)
{
thouTotal = 4;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000))) - 3000 >= 0)
{
thouTotal = 3;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000))) - 2000 >= 0)
{
thouTotal = 2;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000))) - 1000 >= 0)
{
thouTotal = 1;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000))) - 1000 < 0)
{
thouTotal = 0;
}
#endregion
#region hundred
if ((goldAvailable - ((hundkTotal * 100000) + (tenkTotal
* 10000) + (thouTotal * 1000))) - 900 >= 0)
{
hundTotal = 9;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000))) - 800 >= 0)
{
hundTotal = 8;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000))) - 700 >= 0)
{
hundTotal = 7;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000))) - 600 >= 0)
{
hundTotal = 6;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000))) - 500 >= 0)
{
hundTotal = 5;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000))) - 400 >= 0)
{
hundTotal = 4;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000))) - 300 >= 0)
{
hundTotal = 3;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000))) - 200 >= 0)
{
hundTotal = 2;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000))) - 100 >= 0)
{
hundTotal = 1;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000))) - 100 < 0)
{
hundTotal = 0;
}
#endregion
#region ten
if ((goldAvailable - ((hundkTotal * 100000) + (tenkTotal
* 10000) + (thouTotal * 1000) + (hundTotal * 100))) - 90 >= 0)
{
tenTotal = 9;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100))) - 80 >= 0)
{
tenTotal = 8;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100))) - 70 >= 0)
{
tenTotal = 7;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100))) - 60 >= 0)
{
tenTotal = 6;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100))) - 50 >= 0)
{
tenTotal = 5;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100))) - 40 >= 0)
{
tenTotal = 4;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100))) - 30 >= 0)
{
tenTotal = 3;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100))) - 20 >= 0)
{
tenTotal = 2;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100))) - 10 >= 0)
{
tenTotal = 1;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100))) - 10 < 0)
{
tenTotal = 0;
}
#endregion
#region one
if ((goldAvailable - ((hundkTotal * 100000) + (tenkTotal
* 10000) + (thouTotal * 1000) + (hundTotal * 100) + (tenTotal * 10))) - 9 >= 0)
{
oneTotal = 9;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100) + (tenTotal * 10))) - 8
>= 0)
{
oneTotal = 8;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100) + (tenTotal * 10))) - 7
>= 0)
{
oneTotal = 7;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100) + (tenTotal * 10))) - 6
>= 0)
{
oneTotal = 6;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100) + (tenTotal * 10))) - 5
>= 0)
{
oneTotal = 5;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100) + (tenTotal * 10))) - 4
>= 0)
{
oneTotal = 4;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100) + (tenTotal * 10))) - 3
>= 0)
{
oneTotal = 3;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100) + (tenTotal * 10))) - 2
>= 0)
{
oneTotal = 2;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100) + (tenTotal * 10))) - 1
>= 0)
{
oneTotal = 1;
}
else if ((goldAvailable - ((hundkTotal * 100000) +
(tenkTotal * 10000) + (thouTotal * 1000) + (hundTotal * 100) + (tenTotal * 10))) - 1
<= 0)
{
oneTotal = 0;
}
#endregion
if (goldAvailable < 0)
{
goldAvailable = 0;
}
}
}
#endregion
#region Water
if (drgnUnderwater == true)
{
drgnFlight = false;
drgnFlyNow = 0;
}
if (stage2e1 == true || stage2e2 == true || stage2e3 == true ||
stage2e4 == true || stage4e1 == true || stage4e2 == true)
{
slowWaterCT++;
if (slowWaterCT >= 60)
{
slowWaterCT = 0;
if (slowWaterFrame == 0)
{
slowWaterFrame = 1;
}
else if (slowWaterFrame == 1)
{
slowWaterFrame = 0;
}
}
waveCT++;
if (waveCT >= 6)
{
waveCT = 0;
waveFrame++;
if (waveFrame >= 8)
{
waveFrame = 0;
}
}
}
if (stage2e2 == true)
{
int oceanY = (-1230 + drgnCamY - (drgnCamY / 100));
if (oceanY < 0)
{
oceanY = 0;
}
}
if (needSplashInLoc == true)
{
needSplashInLoc = false;
if (splashPlay == false)
{
splashPlay = true;
}
splashInLocX = drgnX;
if (stage2e1 == true || stage4e3 == true)
{
splashInLocY = drgnY - 40;
}
else
{
splashInLocY = drgnY - 50;
}
splashInCT = 0;
splashInFrame = 0;
splashIn = true;
}
if (splashIn == true)
{
splashInCT++;
if (splashInCT >= 6)
{
splashInCT = 0;
splashInFrame++;
}
if (splashInFrame >= 4)
{
splashIn = false;
splashInFrame = 0;
}
}
if (needSplashOutLoc == true)
{
needSplashOutLoc = false;
if (splashPlay == false)
{
splashPlay = true;
}
splashOutLocX = drgnX;
if (stage2e1 == true || stage4e3 == true)
{
splashOutLocY = drgnY - 15;
}
else
{
splashOutLocY = drgnY - 25;
}
splashOutCT = 0;
splashOutFrame = 0;
splashOut = true;
}
if (splashOut == true)
{
splashOutCT++;
if (splashOutCT >= 6)
{
splashOutCT = 0;
splashOutFrame++;
}
if (splashOutFrame >= 4)
{
splashOut = false;
splashOutFrame = 0;
}
}
if (stage2e1 == true || stage4e3 == true || stage6e1 == true)
{
waterfallCT++;
if (waterfall1Frozen == true)
{
waterfall1Act = 2;
}
if (waterfall2Frozen == true)
{
waterfall2Act = 2;
}
if (waterfallCT >= 6)
{
waterfallCT = 0;
waterfallFrame++;
if (waterfallFrame >= 4)
{
if (waterfall1Frozen == false)
{
if (waterfall1Act == 0)
{
waterfall1Act = 1;
}
else if (waterfall1Act == 1)
{
waterfall1Act = 0;
}
}
if (waterfall2Frozen == false)
{
if (waterfall2Act == 0)
{
waterfall2Act = 1;
}
else if (waterfall2Act == 1)
{
waterfall2Act = 0;
}
}
else if (waterfall2Frozen == true)
{
waterfall2Act = 2;
}
waterfallFrame = 0;
}
}
}
poolCT++;
if (poolCT >= 18)
{
poolFrame++;
if (poolFrame >= 4)
{
poolFrame = 0;
}
poolCT = 0;
}
#endregion
#region Explosions
if (exp1On == true)
{
if (exp1CT == 0 && exp1Frame == 0)
{
if (expAltPlay == false)
{
expAltPlay = true;
}
}
exp1CT++;
if (exp1CT >= 6)
{
exp1CT = 0;
exp1Frame++;
}
if (exp1Frame >= 16)
{
exp1On = false;
exp1Frame = 0;
exp1CT = 0;
if (hovercraftExplosion == true)
{
hovercraftExplosion = false;
}
}
}
if (exp2On == true)
{
if (exp2CT == 0 && exp2Frame == 0)
{
if (expAltPlay == false)
{
expAltPlay = true;
}
}
exp2CT++;
if (exp2CT >= 6)
{
exp2CT = 0;
exp2Frame++;
}
if (exp2Frame >= 16)
{
exp2On = false;
exp2Frame = 0;
exp2CT = 0;
if (stage7eB == true)
{
if (exhaustExplosion == true)
{
exhaustExplosion = false;
}
}
}
}
if (exp3On == true)
{
if (exp3CT == 0 && exp3Frame == 0)
{
if (expAltPlay == false)
{
expAltPlay = true;
}
}
exp3CT++;
if (exp3CT >= 6)
{
exp3CT = 0;
exp3Frame++;
}
if (exp3Frame >= 16)
{
exp3On = false;
exp3Frame = 0;
exp3CT = 0;
if (stage7eB == true)
{
if (staffExplosion == true)
{
staffExplosion = false;
}
}
}
}
if (exp4On == true)
{
if (exp4CT == 0 && exp4Frame == 0)
{
if (expAltPlay == false)
{
expAltPlay = true;
}
}
exp4CT++;
if (exp4CT >= 6)
{
exp4CT = 0;
exp4Frame++;
}
if (exp4Frame >= 16)
{
exp4On = false;
exp4Frame = 0;
exp4CT = 0;
if (stage7eB == true)
{
if (fistExplosion == true)
{
fistExplosion = false;
}
}
}
}
if (exp5On == true)
{
if (exp5CT == 0 && exp5Frame == 0)
{
if (expAltPlay == false)
{
expAltPlay = true;
}
}
exp5CT++;
if (exp5CT >= 6)
{
exp5CT = 0;
exp5Frame++;
}
if (exp5Frame >= 16)
{
exp5On = false;
exp5Frame = 0;
exp5CT = 0;
if (stage7eB == true)
{
if (swordExplosion == true)
{
swordExplosion = false;
}
}
}
}
if (exp6On == true)
{
if (exp6CT == 0 && exp6Frame == 0)
{
if (expAltPlay == false)
{
expAltPlay = true;
}
}
exp6CT++;
if (exp6CT >= 6)
{
exp6CT = 0;
exp6Frame++;
}
if (exp6Frame >= 16)
{
exp6On = false;
exp6Frame = 0;
exp6CT = 0;
if (stage2e2 == true)
{
puzzleExplosion = false;
}
if (stage7eB == true)
{
if (broochExplosion == true)
{
broochExplosion = false;
}
}
}
}
if (expSerial == true)
{
if (exp1On == false && exp5On == true)
{
exp1Wait++;
if (exp1Wait >= 20)
{
if (stage6eB == true || stage7eB == true || stage2eB
== true)
{
exp1X = generateRandom.Next(0, 1153);
exp1Y = generateRandom.Next(0, 657);
}
exp1On = true;
exp1Wait = 0;
}
}
if (exp2On == false && exp1On == true)
{
exp2Wait++;
if (exp2Wait >= 20)
{
if (stage6eB == true || stage7eB == true || stage2eB
== true)
{
exp2X = generateRandom.Next(0, 1153);
exp2Y = generateRandom.Next(0, 657);
}
exp2On = true;
exp2Wait = 0;
}
}
if (exp3On == false && exp2On == true)
{
exp3Wait++;
if (exp3Wait >= 20)
{
if (stage6eB == true || stage7eB == true || stage2eB
== true)
{
exp3X = generateRandom.Next(0, 1153);
exp3Y = generateRandom.Next(0, 657);
}
exp3On = true;
exp3Wait = 0;
}
}
if (exp4On == false && exp3On == true)
{
exp4Wait++;
if (exp4Wait >= 20)
{
if (stage6eB == true || stage7eB == true || stage2eB
== true)
{
exp4X = generateRandom.Next(0, 1153);
exp4Y = generateRandom.Next(0, 657);
}
exp4On = true;
exp4Wait = 0;
}
}
if (exp5On == false && exp4On == true)
{
exp5Wait++;
if (exp5Wait >= 20)
{
if (stage6eB == true || stage7eB == true || stage2eB
== true)
{
exp5X = generateRandom.Next(0, 1153);
exp5Y = generateRandom.Next(0, 657);
}
exp5On = true;
exp5Wait = 0;
}
}
}
#endregion
#region drgnFaceR
if (drgnFaceR == true)
{
drgnFacingHitbox = 50;
}
else
{
drgnFacingHitbox = 20;
}
#endregion
#region HP = 0
if (drgnHPNow <= 0)
{
puzzle1Opacity = 255;
puzzle2Opacity = 255;
puzzle3Opacity = 255;
puzzle4Opacity = 255;
puzzle5Opacity = 255;
puzzle6Opacity = 255;
puzzle7Opacity = 255;
if (stage5e2 == true || (stage4e3 == true && from4e1 ==
true) || stage6eB == true)
{
play5e2Top.stopBGM();
play5e2Bottom.stopBGM();
}
else
{
playStageMusic.stopBGM();
}
if (playDefeat == false)
{
playDefeat = true;
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
musicDefeat.Play((float)(volume * 0.7 * tempVolume), 0,
0);
}
if (drgnOnGround == false)
{
drgnY_CT++;
drgnY = drgnY + drgnYvel;
if (drgnYvel < 5 && drgnY_CT >= 6)
{
drgnYvel++;
drgnY_CT = 0;
}
if (drgnYvel > 0)
{
if (drgnAction != 12)
{
drgnAction = 12;
drgnCT = 0;
drgnFrame = 0;
}
}
else if (drgnYvel <= 0)
{
if (drgnAction != 12)
{
drgnAction = 12;
drgnCT = 0;
drgnFrame = 0;
}
}
else if (drgnOnGround == true)
{
drgnYvel = 0;
drgnY_CT = 0;
}
}
drgnHit = false;
drgnKnockback = false;
defeatCT++;
if (drgnAction != 12)
{
drgnAction = 12;
drgnFrame = 0;
}
if (defeatCT >= 390)
{
if (defeated == true)
{
defeated = false;
if (preserveGP == 0)
{
if (goldNow % 2 != 0)
{
goldNow--;
if (goldNow < 0)
{
goldNow = 0;
}
}
goldNow = goldNow / 2;
}
}
stageExit = true;
acid1 = false;
acid2 = false;
acid3 = false;
acid4 = false;
flame1 = false;
flame2 = false;
flame3 = false;
flame4 = false;
flame5 = false;
spin1 = false;
spin2 = false;
spin3 = false;
spin4 = false;
}
if (defeatCT < 390)
{
defeated = true;
}
}
#endregion
#region Run Event
if (runEvent == true)
{
if (drgnOnGround == false)
{
drgnY_CT++;
drgnY = drgnY + drgnYvel;
if (drgnYvel < 5 && drgnY_CT >= 6)
{
drgnYvel++;
drgnY_CT = 0;
}
if (drgnYvel > 0)
{
if (drgnAction != 5 && drgnAction != 3 && drgnAction
!= 2)
{
drgnAction = 5;
drgnCT = 0;
drgnFrame = 0;
}
}
else if (drgnYvel <= 0)
{
if (drgnAction != 4 && drgnAction != 3 && drgnAction
!= 2)
{
drgnAction = 4;
drgnCT = 0;
drgnFrame = 0;
}
}
else if (drgnOnGround == true)
{
drgnYvel = 0;
drgnY_CT = 0;
}
}
if (stage1e2 == true)
{
if (drgnX < 6000)
{
if (drgnY > 1144)
{
drgnY = 1144;
drgnOnGround = true;
}
}
if (drgnX > 6000)
{
if (drgnY > 1234)
{
drgnY = 1234;
drgnOnGround = true;
}
}
}
}
#endregion
//HP and Fire
#region HP And Fire
if (drgnHPNow < 1)
{
hpPip1 = 0;
}
else if (drgnHPNow >= 1 && drgnHPNow < 7)
{
hpPip1 = 1;
}
else if (drgnHPNow >= 7 && drgnHPNow < 13)
{
hpPip1 = 2;
}
else if (drgnHPNow >= 13 && drgnHPNow < 19)
{
hpPip1 = 3;
}
else if (drgnHPNow >= 19)
{
hpPip1 = 4;
}
if (drgnHPNow < 2)
{
hpPip2 = 0;
}
else if (drgnHPNow >= 2 && drgnHPNow < 8)
{
hpPip2 = 1;
}
else if (drgnHPNow >= 8 && drgnHPNow < 14)
{
hpPip2 = 2;
}
else if (drgnHPNow >= 14 && drgnHPNow < 20)
{
hpPip2 = 3;
}
else if (drgnHPNow >= 20)
{
hpPip2 = 4;
}
if (drgnHPNow < 3)
{
hpPip3 = 0;
}
else if (drgnHPNow >= 3 && drgnHPNow < 9)
{
hpPip3 = 1;
}
else if (drgnHPNow >= 9 && drgnHPNow < 15)
{
hpPip3 = 2;
}
else if (drgnHPNow >= 15 && drgnHPNow < 21)
{
hpPip3 = 3;
}
if (drgnHPNow < 3)
{
hpPip3 = 0;
}
else if (drgnHPNow >= 3 && drgnHPNow < 9)
{
hpPip3 = 1;
}
else if (drgnHPNow >= 9 && drgnHPNow < 15)
{
hpPip3 = 2;
}
else if (drgnHPNow >= 15 && drgnHPNow < 21)
{
hpPip3 = 3;
}
else if (drgnHPNow >= 21)
{
hpPip3 = 4;
}
if (drgnHPNow < 4)
{
hpPip4 = 0;
}
else if (drgnHPNow >= 4 && drgnHPNow < 10)
{
hpPip4 = 1;
}
else if (drgnHPNow >= 10 && drgnHPNow < 16)
{
hpPip4 = 2;
}
else if (drgnHPNow >= 16 && drgnHPNow < 22)
{
hpPip4 = 3;
}
else if (drgnHPNow >= 22)
{
hpPip4 = 4;
}
if (drgnHPNow < 4)
{
hpPip4 = 0;
}
else if (drgnHPNow >= 4 && drgnHPNow < 10)
{
hpPip4 = 1;
}
else if (drgnHPNow >= 10 && drgnHPNow < 16)
{
hpPip4 = 2;
}
else if (drgnHPNow >= 16 && drgnHPNow < 22)
{
hpPip4 = 3;
}
else if (drgnHPNow >= 22)
{
hpPip4 = 4;
}
if (drgnHPNow < 5)
{
hpPip5 = 0;
}
else if (drgnHPNow >= 5 && drgnHPNow < 11)
{
hpPip5 = 1;
}
else if (drgnHPNow >= 11 && drgnHPNow < 17)
{
hpPip5 = 2;
}
else if (drgnHPNow >= 17 && drgnHPNow < 23)
{
hpPip5 = 3;
}
else if (drgnHPNow >= 23)
{
hpPip5 = 4;
}
if (drgnHPNow < 6)
{
hpPip6 = 0;
}
else if (drgnHPNow >= 6 && drgnHPNow < 12)
{
hpPip6 = 1;
}
else if (drgnHPNow >= 12 && drgnHPNow < 18)
{
hpPip6 = 2;
}
else if (drgnHPNow >= 18 && drgnHPNow < 24)
{
hpPip6 = 3;
}
else if (drgnHPNow >= 24)
{
hpPip6 = 4;
if (drgnHPNow > 24)
{
drgnHPNow = 24;
if (drgnHPMax > 24)
{
drgnHPMax = 24;
}
}
}
if (breathNow <= 0)
{
breathPip1 = 1;
}
else
{
breathPip1 = 0;
}
if (breathNow < 60)
{
breathPip2 = 1;
}
else
{
breathPip2 = 0;
}
if (breathNow < 120)
{
breathPip3 = 1;
}
else
{
breathPip3 = 0;
}
if (breathNow < 180)
{
breathPip4 = 1;
}
else
{
breathPip4 = 0;
}
if (breathNow < 240)
{
breathPip4 = 1;
}
else
{
breathPip4 = 0;
}
if (breathNow < 300)
{
breathPip5 = 1;
}
else
{
breathPip5 = 0;
}
if (breathNow < 360)
{
breathPip6 = 1;
}
else
{
breathPip6 = 0;
}
if (breathNow < 420)
{
breathPip7 = 1;
}
else
{
breathPip7 = 0;
}
if (breathNow < 480)
{
breathPip8 = 1;
}
else
{
breathPip8 = 0;
}
if (breathNow < 540)
{
breathPip9 = 1;
}
else
{
breathPip9 = 0;
}
if (breathNow < 600)
{
breathPip10 = 1;
}
else
{
breathPip10 = 0;
}
if (breathNow < 660)
{
breathPip11 = 1;
}
else
{
breathPip11 = 0;
}
if (breathNow < 720)
{
breathPip12 = 1;
}
else
{
breathPip12 = 0;
}
if (breathType == 0)
{
breathY = 2;
}
else if (breathType == 1 || breathType == 4)
{
breathY = 20;
}
else if (breathType == 2)
{
breathY = 12;
}
else if (breathType == 3)
{
breathY = 50;
}
#endregion
//End HP and Fire
#region drgnHit == true
if (drgnHit == true)
{
drgnWaitTimer = 0;
drgnIdle = false;
drgnHitTimer++;
if (drgnHitTimer >= 2)
{
drgnDamageTaken = (damageCheck - (drgnDRTreasure1 +
drgnDRTreasure2 + drgnDRBonus));
if (drgnDamageTaken < 1)
{
drgnDamageTaken = 1;
}
if (drgnDamageTaken > drgnHPNow)
{
drgnDamageTaken = drgnHPNow;
}
drgnHPNow = drgnHPNow - drgnDamageTaken;
drgnHPXP++;
drgnHit = false;
drgnHitTimer = 0;
if (damagePlay == false)
{
damagePlay = true;
}
usingClaw = false;
clawNoMove = false;
drgnFire = false;
drgnFlight = false;
drgnFlyNow = 0;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
}
drgnInvulnerable = true;
drgnKnockback = true;
}
if (drgnSpikeDamage == true)
{
drgnHitTimer++;
if (drgnHitTimer >= 2)
{
drgnDamageTaken = (spikeDamage - (spikeDRTreasure +
spikeDRBonus));
if (drgnDamageTaken < 1)
{
drgnDamageTaken = 1;
}
if (drgnDamageTaken > drgnHPNow)
{
drgnDamageTaken = drgnHPNow;
}
drgnHPNow = drgnHPNow - drgnDamageTaken;
drgnSpikeDamage = false;
drgnHitTimer = 0;
if (damagePlay == false)
{
damagePlay = true;
}
usingClaw = false;
clawNoMove = false;
drgnFire = false;
drgnFlight = false;
drgnFlyNow = 0;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
}
drgnInvulnerable = true;
drgnKnockback = true;
}
#endregion
#region Treasure Handling
treasureShineCT++;
if (treasureShineCT >= 6)
{
treasureShineCT = 0;
treasureShineFrame++;
if (treasureShineFrame >= 16)
{
treasureShineFrame = 0;
}
}
if (treasurePickUp == false)
{
if (treasureWindowDown == true)
{
treasureWindowDown = false;
}
}
if (treasurePickUp == true)
{
if (stage5e2 == true || (stage4e3 == true && from4e1 ==
true) || stage6eB == true)
{
play5e2Top.pauseBGM();
play5e2Bottom.pauseBGM();
}
else
{
playStageMusic.pauseBGM();
}
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
if (treasurePickUpCT < 500 && treasureWindowX == 171)
{
treasurePickUpCT++;
}
if (playTreasure == false)
{
playTreasure = true;
musicTreasure.Play((float)(volume * 0.7 * tempVolume),
0, 0);
}
if (treasureWindowUp == true && treasureWindowX < 171)
{
treasureWindowX = treasureWindowX + 7;
}
if (treasureWindowUp == true && treasureWindowX > 171)
{
treasureWindowX = 171;
}
if (treasureWindowUp == true && treasureWindowFrame < 7 &&
treasureWindowX >= 161)
{
treasureWindowCT++;
if (treasureWindowCT >= 6)
{
treasureWindowCT = 0;
treasureWindowFrame++;
}
}
if (treasurePickUpCT < 240 && treasureWindowFrame == 7)
{
if (treasureWindowUp == true)
{
treasureWindowUp = false;
}
}
else if (treasurePickUpCT >= 300)
{
#region default controls
if (controlType == 0)
{
if ((kbState.IsKeyDown(Keys.C) ||
gpState.IsButtonDown(Buttons.A)) && lastKeyC == false)
{
treasureWindowDown = true;
lastKeyC = true;
}
}
#endregion
#region custom controls
if (controlType == 1)
{
if ((confTrue == true || gpState.IsButtonDown
(Buttons.A)) && lastKeyC == false)
{
treasureWindowDown = true;
lastKeyC = true;
}
}
#endregion
if (treasureWindowDown == true && treasureWindowFrame >
0)
{
treasureWindowCT++;
if (treasureWindowCT >= 6)
{
treasureWindowCT = 0;
treasureWindowFrame--;
}
}
if (treasureWindowDown == true && treasureWindowFrame ==
0)
{
if (treasureWindowX > -150)
{
treasureWindowX = treasureWindowX - 7;
}
if (treasureWindowX <= -150)
{
treasureWindowX = -150;
treasurePickUp = false;
playTreasure = false;
treasurePickUpCT = 0;
if (have01Hatchling == true && pickUp1 == true)
{
haveTreasure1 = 1;
pickUp1 = false;
drgnHPTreasure1 = 1;
drgnHPMax = 6 + drgnHPBonus + drgnHPLV +
drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean + boss3Clean +
boss4Clean + boss5Clean + questHPBonus;
drgnHPNow++;
if (drgnHPNow > drgnHPMax)
{
drgnHPNow = drgnHPMax;
}
}
if (have02Smile == true && pickUp2 == true)
{
haveTreasure2 = 1;
pickUp2 = false;
drgnHPTreasure2 = 1;
drgnHPMax = 6 + drgnHPBonus + drgnHPLV +
drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean + boss3Clean +
boss4Clean + boss5Clean + questHPBonus;
drgnHPNow++;
if (drgnHPNow > drgnHPMax)
{
drgnHPNow = drgnHPMax;
}
achievements.UpdateAch(-1, -1, -1, -1, -1,
-1, -1, -1, haveTreasure2 + haveTreasure4 + haveTreasure8 + haveTreasure11 +
haveTreasure15, -1, -1, -1, -1, -1, -1);
}
if (have03Crest == true && pickUp3 == true)
{
haveTreasure3 = 1;
pickUp3 = false;
drgnDRTreasure1 = 1;
}
if (have04Underpants == true && pickUp4 == true)
{
haveTreasure4 = 1;
pickUp4 = false;
drgnDRTreasure2 = 1;
achievements.UpdateAch(-1, -1, -1, -1, -1,
-1, -1, -1, haveTreasure2 + haveTreasure4 + haveTreasure8 + haveTreasure11 +
haveTreasure15, -1, -1, -1, -1, -1, -1);
}
if (have05Sollerets == true && pickUp5 == true)
{
haveTreasure5 = 1;
pickUp5 = false;
spikeDRTreasure = 2;
achievements.UpdateAch(-1, -1, -1, -1, -1,
-1, -1, -1, -1, haveTreasure5 + haveTreasure21 + haveTreasure22 + haveTreasure23 +
haveTreasure24 + haveTreasure25, -1, -1, -1, -1, -1);
}
if (have06Scepter == true && pickUp6 == true)
{
haveTreasure6 = 1;
pickUp6 = false;
breathDmgTreasure1 = 1;
}
if (have07Momiji == true && pickUp7 == true)
{
haveTreasure7 = 1;
pickUp7 = false;
breathDmgTreasure2 = 1;
}
if (have08Ninjato == true && pickUp8 == true)
{
haveTreasure8 = 1;
pickUp8 = false;
breathMaxTreasure1 = 60;
achievements.UpdateAch(-1, -1, -1, -1, -1,
-1, -1, -1, haveTreasure2 + haveTreasure4 + haveTreasure8 + haveTreasure11 +
haveTreasure15, -1, -1, -1, -1, -1, -1);
}
if (have09Ring == true && pickUp9 == true)
{
haveTreasure9 = 1;
pickUp9 = false;
breathMaxTreasure2 = 60;
}
if (have10Sunset == true && pickUp10 == true)
{
haveTreasure10 = 1;
pickUp10 = false;
breathMaxTreasure3 = 60;
}
if (have11Dreihander == true && pickUp11 ==
true)
{
haveTreasure11 = 1;
pickUp11 = false;
clawDmgTreasure1 = 2;
achievements.UpdateAch(-1, -1, -1, -1, -1,
-1, -1, -1, haveTreasure2 + haveTreasure4 + haveTreasure8 + haveTreasure11 +
haveTreasure15, -1, -1, -1, -1, -1, -1);
}
if (have12Endeavour == true && pickUp12 == true)
{
haveTreasure12 = 1;
pickUp12 = false;
clawDmgTreasure2 = 2;
}
if (have13Doll == true && pickUp13 == true)
{
haveTreasure13 = 1;
pickUp13 = false;
clawSize = 1;
}
if (have14Liqueur == true && pickUp14 == true)
{
haveTreasure14 = 1;
pickUp14 = false;
acidArmorRedTreasure = 1;
}
if (have15Penultima == true && pickUp15 == true)
{
haveTreasure15 = 1;
pickUp15 = false;
breathCycleTreasure = 60;
achievements.UpdateAch(-1, -1, -1, -1, -1,
-1, -1, -1, haveTreasure2 + haveTreasure4 + haveTreasure8 + haveTreasure11 +
haveTreasure15, -1, -1, -1, -1, -1, -1);
}
if (have16Leaf == true && pickUp16 == true)
{
haveTreasure16 = 1;
pickUp16 = false;
drgnFlyTreasure1 = 30;
}
if (have17HTTYD == true && pickUp17 == true)
{
haveTreasure17 = 1;
pickUp17 = false;
drgnFlyTreasure2 = 30;
}
if (have18Gust == true && pickUp18 == true)
{
haveTreasure18 = 1;
pickUp18 = false;
drgnFlyTreasure3 = 30;
}
if (have19Shirt == true && pickUp19 == true)
{
haveTreasure19 = 1;
pickUp19 = false;
drgnFlyTreasure4 = 30;
}
if (have20Deduction == true && pickUp20 == true)
{
haveTreasure20 = 1;
pickUp20 = false;
freezeTreasure = 2;
}
if (have21Topaz == true && pickUp21 == true)
{
haveTreasure21 = 1;
pickUp21 = false;
goldAvailable = goldAvailable + 1000;
goldTotal += 1000;
achievements.UpdateAch(-1, -1, -1, -1, -1,
-1, -1, -1, -1, haveTreasure5 + haveTreasure21 + haveTreasure22 + haveTreasure23 +
haveTreasure24 + haveTreasure25, -1, -1, -1, -1, -1);
}
if (have22Sapphire == true && pickUp22 == true)
{
haveTreasure22 = 1;
pickUp22 = false;
goldAvailable = goldAvailable + 2500;
goldTotal += 2500;
achievements.UpdateAch(-1, -1, -1, -1, -1,
-1, -1, -1, -1, haveTreasure5 + haveTreasure21 + haveTreasure22 + haveTreasure23 +
haveTreasure24 + haveTreasure25, -1, -1, -1, -1, -1);
}
if (have23Garnet == true && pickUp23 == true)
{
haveTreasure23 = 1;
pickUp23 = false;
goldAvailable = goldAvailable + 5000;
goldTotal += 5000;
achievements.UpdateAch(-1, -1, -1, -1, -1,
-1, -1, -1, -1, haveTreasure5 + haveTreasure21 + haveTreasure22 + haveTreasure23 +
haveTreasure24 + haveTreasure25, -1, -1, -1, -1, -1);
}
if (have24Ruby == true && pickUp24 == true)
{
haveTreasure24 = 1;
pickUp24 = false;
goldAvailable = goldAvailable + 10000;
goldTotal += 10000;
achievements.UpdateAch(-1, -1, -1, -1, -1,
-1, -1, -1, -1, haveTreasure5 + haveTreasure21 + haveTreasure22 + haveTreasure23 +
haveTreasure24 + haveTreasure25, -1, -1, -1, -1, -1);
}
if (have25Diamond == true && pickUp25 == true)
{
haveTreasure25 = 1;
pickUp25 = false;
goldAvailable = goldAvailable + 12000;
goldTotal += 12000;
achievements.UpdateAch(-1, -1, -1, -1, -1,
-1, -1, -1, -1, haveTreasure5 + haveTreasure21 + haveTreasure22 + haveTreasure23 +
haveTreasure24 + haveTreasure25, -1, -1, -1, -1, -1);
}
if (haveAcid == true && pickUpAcid == true)
{
haveTreasure26 = 1;
pickUpAcid = false;
}
}
}
}
}
#endregion Treasure Handling
#region Enemy Condition
#region e1
if (e1spawn == true)
{
if (e1breathhit == true)
{
e1hitTimer++;
if (e1hitTimer >= 2)
{
e1breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e1armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e1armor - e1armorRed < 0)
{
e1armor = 0;
e1armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e1FireVul * breathCritBonus) + (e1BoltVul
* breathCritBonus) + (e1AcidVul * breathCritBonus)) - (e1armor - e1armorRed)) <= 0
&& e1plinkOn == false)
{
e1plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e1FireVul * breathCritBonus) +
(e1BoltVul * breathCritBonus) + (e1AcidVul * breathCritBonus)) - (e1armor -
e1armorRed)) > 0)
{
e1invulnerable = true;
e1HP = e1HP - ((breathDmg + breathDmgBonus +
breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e1FireVul * breathCritBonus) +
(e1BoltVul * breathCritBonus) + (e1AcidVul * breathCritBonus)) - (e1armor -
e1armorRed));
breathXP++;
}
}
else if (breathType == 2 && e1frozen == false)
{
if (e1frRes == false)
{
e1frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e1peaceRes == false)
{
e1peaceful = true;
}
}
breathXP++;
e1hitTimer = 0;
if (e1HP <= 0)
{
if (e1coinValue > 0)
{
e1coins = true;
e1coinFrame = 0;
e1coinCT = 0;
}
e1smoke = true;
e1smokeCT = 0;
e1smokeFrame = 0;
e1knockback = false;
}
}
}
if (e1clawhit == true && e1frozen == false && e1peaceful ==
false)
{
e1hitTimer++;
if (e1hitTimer >= 2)
{
e1clawhit = false;
if (e1armor - e1armorRed < 0)
{
e1armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e1armor - e1armorRed) > 0)
{
e1invulnerable = true;
e1HP = e1HP - ((clawDmg + clawDmgBonus + (clawLV
* 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e1armor - e1armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e1armor - e1armorRed) <= 0 && e1plinkOn ==
false)
{
e1plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e1hitTimer = 0;
}
if (e1knockbackRes == false)
{
e1knockback = true;
}
if (e1HP <= 0)
{
if (e1coinValue > 0)
{
e1coins = true;
e1coinFrame = 0;
e1coinCT = 0;
}
e1smoke = true;
e1smokeCT = 0;
e1smokeFrame = 0;
e1knockback = false;
}
}
if (e1frozen == true)
{
e1CT = 0;
e1FreezeColor = 200;
e1FreezeCT++;
if (e1FreezeCT >= 300 * freezeTreasure)
{
e1frozen = false;
e1FreezeCT = 0;
if (touchLe1 == true)
{
touchLe1 = false;
}
if (touchRe1 == true)
{
touchRe1 = false;
}
if (e1stand == true)
{
e1stand = false;
}
}
}
else
{
e1FreezeColor = opacity;
}
}
#endregion
#region e2
if (e2spawn == true)
{
if (e2breathhit == true)
{
e2hitTimer++;
if (e2hitTimer >= 2)
{
e2breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e2armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e2armor - e1armorRed < 0)
{
e2armor = 0;
e2armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e2FireVul * breathCritBonus) + (e2BoltVul
* breathCritBonus) + (e2AcidVul * breathCritBonus)) - (e2armor - e2armorRed)) <= 0
&& e2plinkOn == false)
{
e2plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e2FireVul * breathCritBonus) +
(e2BoltVul * breathCritBonus) + (e2AcidVul * breathCritBonus)) - (e2armor -
e2armorRed)) > 0)
{
e2invulnerable = true;
e2HP = e2HP - ((breathDmg + breathDmgBonus +
breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e2FireVul * breathCritBonus) +
(e2BoltVul * breathCritBonus) + (e2AcidVul * breathCritBonus)) - (e2armor -
e2armorRed));
breathXP++;
}
}
else if (breathType == 2 && e2frozen == false)
{
if (e2frRes == false)
{
e2frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e2peaceRes == false)
{
e2peaceful = true;
}
}
breathXP++;
e2hitTimer = 0;
if (e2HP <= 0)
{
if (e2coinValue > 0)
{
e2coins = true;
e2coinFrame = 0;
e2coinCT = 0;
}
e2smoke = true;
e2smokeCT = 0;
e2smokeFrame = 0;
e2knockback = false;
}
}
}
if (e2clawhit == true && e2frozen == false && e2peaceful ==
false)
{
e2hitTimer++;
if (e2hitTimer >= 2)
{
e2clawhit = false;
if (e2armor - e2armorRed < 0)
{
e2armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e2armor - e2armorRed) > 0)
{
e2invulnerable = true;
e2HP = e2HP - ((clawDmg + clawDmgBonus + (clawLV
* 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e2armor - e2armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e2armor - e2armorRed) <= 0 && e2plinkOn ==
false)
{
e2plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e2hitTimer = 0;
}
if (e2knockbackRes == false)
{
e2knockback = true;
}
if (e2HP <= 0)
{
if (e2coinValue > 0)
{
e2coins = true;
e2coinFrame = 0;
e2coinCT = 0;
}
e2smoke = true;
e2smokeCT = 0;
e2smokeFrame = 0;
e2knockback = false;
}
}
if (e2frozen == true)
{
e2CT = 0;
e2FreezeColor = 200;
e2FreezeCT++;
if (e2FreezeCT >= 300 * freezeTreasure)
{
e2frozen = false;
e2FreezeCT = 0;
if (touchLe2 == true)
{
touchLe2 = false;
}
if (touchRe2 == true)
{
touchRe2 = false;
}
if (e2stand == true)
{
e2stand = false;
}
}
}
else
{
e2FreezeColor = opacity;
}
}
#endregion
#region e3
if (e3spawn == true)
{
if (e3breathhit == true)
{
e3hitTimer++;
if (e3hitTimer >= 2)
{
e3breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e3armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e3armor - e3armorRed < 0)
{
e3armor = 0;
e3armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e3FireVul * breathCritBonus) + (e3BoltVul
* breathCritBonus) + (e3AcidVul * breathCritBonus)) - (e3armor - e3armorRed)) <= 0
&& e3plinkOn == false)
{
e3plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e3FireVul * breathCritBonus) +
(e3BoltVul * breathCritBonus) + (e3AcidVul * breathCritBonus)) - (e3armor -
e3armorRed)) > 0)
{
e3invulnerable = true;
e3HP = e3HP - ((breathDmg + breathDmgBonus +
breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e3FireVul * breathCritBonus) +
(e3BoltVul * breathCritBonus) + (e3AcidVul * breathCritBonus)) - (e3armor -
e3armorRed));
breathXP++;
}
}
else if (breathType == 2 && e3frozen == false)
{
if (e3frRes == false)
{
e3frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e3peaceRes == false)
{
e3peaceful = true;
}
}
breathXP++;
e3hitTimer = 0;
if (e3HP <= 0)
{
if (e3coinValue > 0)
{
e3coins = true;
e3coinFrame = 0;
e3coinCT = 0;
}
e3smoke = true;
e3smokeCT = 0;
e3smokeFrame = 0;
e3knockback = false;
}
}
}
if (e3clawhit == true && e3frozen == false && e3peaceful ==
false)
{
e3hitTimer++;
if (e3hitTimer >= 2)
{
e3clawhit = false;
if (e3armor - e3armorRed < 0)
{
e3armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e3armor - e3armorRed) > 0)
{
e3invulnerable = true;
e3HP = e3HP - ((clawDmg + clawDmgBonus + (clawLV
* 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e3armor - e3armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e3armor - e3armorRed) <= 0 && e3plinkOn ==
false)
{
e3plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e3hitTimer = 0;
}
if (e3knockbackRes == false)
{
e3knockback = true;
}
if (e3HP <= 0)
{
if (e3coinValue > 0)
{
e3coins = true;
e3coinFrame = 0;
e3coinCT = 0;
}
e3smoke = true;
e3smokeCT = 0;
e3smokeFrame = 0;
e3knockback = false;
}
}
if (e3frozen == true)
{
e3CT = 0;
e3FreezeColor = 200;
e3FreezeCT++;
if (e3FreezeCT >= 300 * freezeTreasure)
{
e3frozen = false;
e3FreezeCT = 0;
if (touchLe3 == true)
{
touchLe3 = false;
}
if (touchRe3 == true)
{
touchRe3 = false;
}
if (e3stand == true)
{
e3stand = false;
}
}
}
else
{
e3FreezeColor = opacity;
}
}
#endregion
#region e4
if (e4spawn == true)
{
if (e4breathhit == true)
{
e4hitTimer++;
if (e4hitTimer >= 2)
{
e4breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e4armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e4armor - e4armorRed < 0)
{
e4armor = 0;
e4armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e4FireVul * breathCritBonus) + (e4BoltVul
* breathCritBonus) + (e4AcidVul * breathCritBonus)) - (e4armor - e4armorRed)) <= 0
&& e4plinkOn == false)
{
e4plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e4FireVul * breathCritBonus) +
(e4BoltVul * breathCritBonus) + (e4AcidVul * breathCritBonus)) - (e4armor -
e4armorRed)) > 0)
{
e4invulnerable = true;
e4HP = e4HP - ((breathDmg + breathDmgBonus +
breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e4FireVul * breathCritBonus) +
(e4BoltVul * breathCritBonus) + (e4AcidVul * breathCritBonus)) - (e4armor -
e4armorRed));
breathXP++;
}
}
else if (breathType == 2 && e4frozen == false)
{
if (e4frRes == false)
{
e4frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e4peaceRes == false)
{
e4peaceful = true;
}
}
breathXP++;
e4hitTimer = 0;
if (e4HP <= 0)
{
if (e4coinValue > 0)
{
e4coins = true;
e4coinFrame = 0;
e4coinCT = 0;
}
e4smoke = true;
e4smokeCT = 0;
e4smokeFrame = 0;
e4knockback = false;
}
}
}
if (e4clawhit == true && e4frozen == false && e4peaceful ==
false)
{
e4hitTimer++;
if (e4hitTimer >= 2)
{
e4clawhit = false;
if (e4armor - e4armorRed < 0)
{
e4armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e4armor - e4armorRed) > 0)
{
e4invulnerable = true;
e4HP = e4HP - ((clawDmg + clawDmgBonus + (clawLV
* 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e4armor - e4armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e4armor - e4armorRed) <= 0 && e4plinkOn ==
false)
{
e4plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e4hitTimer = 0;
}
if (e4knockbackRes == false)
{
e4knockback = true;
}
if (e4HP <= 0)
{
if (e4coinValue > 0)
{
e4coins = true;
e4coinFrame = 0;
e4coinCT = 0;
}
e4smoke = true;
e4smokeCT = 0;
e4smokeFrame = 0;
e4knockback = false;
}
}
if (e4frozen == true)
{
e4CT = 0;
e4FreezeColor = 200;
e4FreezeCT++;
if (e4FreezeCT >= 300 * freezeTreasure)
{
e4frozen = false;
e4FreezeCT = 0;
if (touchLe4 == true)
{
touchLe4 = false;
}
if (touchRe4 == true)
{
touchRe4 = false;
}
if (e4stand == true)
{
e4stand = false;
}
}
}
else
{
e4FreezeColor = opacity;
}
}
#endregion
#region e5
if (e5spawn == true)
{
if (e5breathhit == true)
{
e5hitTimer++;
if (e5hitTimer >= 2)
{
e5breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e5armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e5armor - e5armorRed < 0)
{
e5armor = 0;
e5armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e5FireVul * breathCritBonus) + (e5BoltVul
* breathCritBonus) + (e5AcidVul * breathCritBonus)) - (e5armor - e5armorRed)) <= 0
&& e5plinkOn == false)
{
e5plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e5FireVul * breathCritBonus) +
(e5BoltVul * breathCritBonus) + (e5AcidVul * breathCritBonus)) - (e5armor -
e5armorRed)) > 0)
{
e5invulnerable = true;
e5HP = e5HP - ((breathDmg + breathDmgBonus +
breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e5FireVul * breathCritBonus) +
(e5BoltVul * breathCritBonus) + (e5AcidVul * breathCritBonus)) - (e5armor -
e5armorRed));
breathXP++;
}
}
else if (breathType == 2 && e5frozen == false)
{
if (e5frRes == false)
{
e5frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e5peaceRes == false)
{
e5peaceful = true;
}
}
breathXP++;
e5hitTimer = 0;
if (e5HP <= 0)
{
if (e5coinValue > 0)
{
e5coins = true;
e5coinFrame = 0;
e5coinCT = 0;
}
e5smoke = true;
e5smokeCT = 0;
e5smokeFrame = 0;
e5knockback = false;
}
}
}
if (e5clawhit == true && e5frozen == false && e5peaceful ==
false)
{
e5hitTimer++;
if (e5hitTimer >= 2)
{
e5clawhit = false;
if (e5armor - e5armorRed < 0)
{
e5armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e5armor - e5armorRed) > 0)
{
e5invulnerable = true;
e5HP = e5HP - ((clawDmg + clawDmgBonus + (clawLV
* 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e5armor - e5armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e5armor - e5armorRed) <= 0 && e5plinkOn ==
false)
{
e5plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e5hitTimer = 0;
}
if (e5knockbackRes == false)
{
e5knockback = true;
}
if (e5HP <= 0)
{
if (e5coinValue > 0)
{
e5coins = true;
e5coinFrame = 0;
e5coinCT = 0;
}
e5smoke = true;
e5smokeCT = 0;
e5smokeFrame = 0;
e5knockback = false;
}
}
if (e5frozen == true)
{
e5CT = 0;
e5FreezeColor = 200;
e5FreezeCT++;
if (e5FreezeCT >= 300 * freezeTreasure)
{
e5frozen = false;
e5FreezeCT = 0;
if (touchLe5 == true)
{
touchLe5 = false;
}
if (touchRe5 == true)
{
touchRe5 = false;
}
if (e5stand == true)
{
e5stand = false;
}
}
}
else
{
e5FreezeColor = opacity;
}
}
#endregion
#region e6
if (e6spawn == true)
{
if (e6breathhit == true)
{
e6hitTimer++;
if (e6hitTimer >= 2)
{
e6breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e6armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e6armor - e6armorRed < 0)
{
e6armor = 0;
e6armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e6FireVul * breathCritBonus) + (e6BoltVul
* breathCritBonus) + (e6AcidVul * breathCritBonus)) - (e6armor - e6armorRed)) <= 0
&& e6plinkOn == false)
{
e6plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e6FireVul * breathCritBonus) +
(e6BoltVul * breathCritBonus) + (e6AcidVul * breathCritBonus)) - (e6armor -
e6armorRed)) > 0)
{
e6invulnerable = true;
e6HP = e6HP - ((breathDmg + breathDmgBonus +
breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e6FireVul * breathCritBonus) +
(e6BoltVul * breathCritBonus) + (e6AcidVul * breathCritBonus)) - (e6armor -
e6armorRed));
breathXP++;
}
}
else if (breathType == 2 && e6frozen == false)
{
if (e6frRes == false)
{
e6frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e6peaceRes == false)
{
e6peaceful = true;
}
}
breathXP++;
e6hitTimer = 0;
if (e6HP <= 0)
{
if (e6coinValue > 0)
{
e6coins = true;
e6coinFrame = 0;
e6coinCT = 0;
}
e6smoke = true;
e6smokeCT = 0;
e6smokeFrame = 0;
e6knockback = false;
}
}
}
if (e6clawhit == true && e6frozen == false && e6peaceful ==
false)
{
e6hitTimer++;
if (e6hitTimer >= 2)
{
e6clawhit = false;
if (e6armor - e6armorRed < 0)
{
e6armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e6armor - e6armorRed) > 0)
{
e6invulnerable = true;
e6HP = e6HP - ((clawDmg + clawDmgBonus + (clawLV
* 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e6armor - e6armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e6armor - e6armorRed) <= 0 && e6plinkOn ==
false)
{
e6plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e6hitTimer = 0;
}
if (e6knockbackRes == false)
{
e6knockback = true;
}
if (e6HP <= 0)
{
if (e6coinValue > 0)
{
e6coins = true;
e6coinFrame = 0;
e6coinCT = 0;
}
e6smoke = true;
e6smokeCT = 0;
e6smokeFrame = 0;
e6knockback = false;
}
}
if (e6frozen == true)
{
e6CT = 0;
e6FreezeColor = 200;
e6FreezeCT++;
if (e6FreezeCT >= 300 * freezeTreasure)
{
e6frozen = false;
e6FreezeCT = 0;
if (touchLe6 == true)
{
touchLe6 = false;
}
if (touchRe6 == true)
{
touchRe6 = false;
}
if (e6stand == true)
{
e6stand = false;
}
}
}
else
{
e6FreezeColor = opacity;
}
}
#endregion
#region e7
if (e7spawn == true)
{
if (e7breathhit == true)
{
e7hitTimer++;
if (e7hitTimer >= 2)
{
e7breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e7armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e7armor - e7armorRed < 0)
{
e7armor = 0;
e7armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e7FireVul * breathCritBonus) + (e7BoltVul
* breathCritBonus) + (e7AcidVul * breathCritBonus)) - (e7armor - e7armorRed)) <= 0
&& e7plinkOn == false)
{
e7plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e7FireVul * breathCritBonus) +
(e7BoltVul * breathCritBonus) + (e7AcidVul * breathCritBonus)) - (e7armor -
e7armorRed)) > 0)
{
e7invulnerable = true;
e7HP = e7HP - ((breathDmg + breathDmgBonus +
breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e7FireVul * breathCritBonus) +
(e7BoltVul * breathCritBonus) + (e7AcidVul * breathCritBonus)) - (e7armor -
e7armorRed));
breathXP++;
}
}
else if (breathType == 2 && e7frozen == false)
{
if (e7frRes == false)
{
e7frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e7peaceRes == false)
{
e7peaceful = true;
}
}
breathXP++;
e7hitTimer = 0;
if (e7HP <= 0)
{
if (e7coinValue > 0)
{
e7coins = true;
e7coinFrame = 0;
e7coinCT = 0;
}
e7smoke = true;
e7smokeCT = 0;
e7smokeFrame = 0;
e7knockback = false;
}
}
}
if (e7clawhit == true && e7frozen == false && e7peaceful ==
false)
{
e7hitTimer++;
if (e7hitTimer >= 2)
{
e7clawhit = false;
if (e7armor - e7armorRed < 0)
{
e7armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e7armor - e7armorRed) > 0)
{
e7invulnerable = true;
e7HP = e7HP - ((clawDmg + clawDmgBonus + (clawLV
* 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e7armor - e7armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e7armor - e7armorRed) <= 0 && e7plinkOn ==
false)
{
e7plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e7hitTimer = 0;
}
if (e7knockbackRes == false)
{
e7knockback = true;
}
if (e7HP <= 0)
{
if (e7coinValue > 0)
{
e7coins = true;
e7coinFrame = 0;
e7coinCT = 0;
}
e7smoke = true;
e7smokeCT = 0;
e7smokeFrame = 0;
e7knockback = false;
}
}
if (e7frozen == true)
{
e7CT = 0;
e7FreezeColor = 200;
e7FreezeCT++;
if (e7FreezeCT >= 300 * freezeTreasure)
{
e7frozen = false;
e7FreezeCT = 0;
if (touchLe7 == true)
{
touchLe7 = false;
}
if (touchRe7 == true)
{
touchRe7 = false;
}
if (e7stand == true)
{
e7stand = false;
}
}
}
else
{
e7FreezeColor = opacity;
}
}
#endregion e7
#region e8
if (e8spawn == true)
{
if (e8breathhit == true)
{
e8hitTimer++;
if (e8hitTimer >= 2)
{
e8breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e8armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e8armor - e8armorRed < 0)
{
e8armor = 0;
e8armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e8FireVul * breathCritBonus) + (e8BoltVul
* breathCritBonus) + (e8AcidVul * breathCritBonus)) - (e8armor - e8armorRed)) <= 0
&& e8plinkOn == false)
{
e8plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e8FireVul * breathCritBonus) +
(e8BoltVul * breathCritBonus) + (e8AcidVul * breathCritBonus)) - (e8armor -
e8armorRed)) > 0)
{
e8invulnerable = true;
e8HP = e8HP - ((breathDmg + breathDmgBonus +
breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e8FireVul * breathCritBonus) +
(e8BoltVul * breathCritBonus) + (e8AcidVul * breathCritBonus)) - (e8armor -
e8armorRed));
breathXP++;
}
}
else if (breathType == 2 && e8frozen == false)
{
if (e8frRes == false)
{
e8frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e8peaceRes == false)
{
e8peaceful = true;
}
}
breathXP++;
e8hitTimer = 0;
if (e8HP <= 0)
{
if (e8coinValue > 0)
{
e8coins = true;
e8coinFrame = 0;
e8coinCT = 0;
}
e8smoke = true;
e8smokeCT = 0;
e8smokeFrame = 0;
e8knockback = false;
}
}
}
if (e8clawhit == true && e8frozen == false && e8peaceful ==
false)
{
e8hitTimer++;
if (e8hitTimer >= 2)
{
e8clawhit = false;
if (e8armor - e8armorRed < 0)
{
e8armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e8armor - e8armorRed) > 0)
{
e8invulnerable = true;
e8HP = e8HP - ((clawDmg + clawDmgBonus + (clawLV
* 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e8armor - e8armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e8armor - e8armorRed) <= 0 && e8plinkOn ==
false)
{
e8plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e8hitTimer = 0;
}
if (e8knockbackRes == false)
{
e8knockback = true;
}
if (e8HP <= 0)
{
if (e8coinValue > 0)
{
e8coins = true;
e8coinFrame = 0;
e8coinCT = 0;
}
e8smoke = true;
e8smokeCT = 0;
e8smokeFrame = 0;
e8knockback = false;
}
}
if (e8frozen == true)
{
e8CT = 0;
e8FreezeColor = 200;
e8FreezeCT++;
if (e8FreezeCT >= 300 * freezeTreasure)
{
e8frozen = false;
e8FreezeCT = 0;
if (touchLe8 == true)
{
touchLe8 = false;
}
if (touchRe8 == true)
{
touchRe8 = false;
}
if (e8stand == true)
{
e8stand = false;
}
}
}
else
{
e8FreezeColor = opacity;
}
}
#endregion
#region e9
if (e9spawn == true)
{
if (e9breathhit == true)
{
e9hitTimer++;
if (e9hitTimer >= 2)
{
e9breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e9armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e9armor - e9armorRed < 0)
{
e9armor = 0;
e9armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e9FireVul * breathCritBonus) + (e9BoltVul
* breathCritBonus) + (e9AcidVul * breathCritBonus)) - (e9armor - e9armorRed)) <= 0
&& e9plinkOn == false)
{
e9plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e9FireVul * breathCritBonus) +
(e9BoltVul * breathCritBonus) + (e9AcidVul * breathCritBonus)) - (e9armor -
e9armorRed)) > 0)
{
e9invulnerable = true;
e9HP = e9HP - (((breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e9FireVul * breathCritBonus)
+ (e9BoltVul * breathCritBonus) + (e9AcidVul * breathCritBonus)) - (e9armor -
e9armorRed)));
breathXP++;
}
}
else if (breathType == 2 && e9frozen == false)
{
if (e9frRes == false)
{
e9frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e9peaceRes == false)
{
e9peaceful = true;
}
}
breathXP++;
e9hitTimer = 0;
if (e9HP <= 0)
{
if (e9coinValue > 0)
{
e9coins = true;
e9coinFrame = 0;
e9coinCT = 0;
}
e9smoke = true;
e9smokeCT = 0;
e9smokeFrame = 0;
e9knockback = false;
}
}
}
if (e9clawhit == true && e9frozen == false && e9peaceful ==
false)
{
e9hitTimer++;
if (e9hitTimer >= 2)
{
e9clawhit = false;
if (e9armor - e9armorRed < 0)
{
e9armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e9armor - e9armorRed) > 0)
{
e9invulnerable = true;
e9HP = e9HP - ((clawDmg + clawDmgBonus + (clawLV
* 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e9armor - e9armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e9armor - e9armorRed) <= 0 && e9plinkOn ==
false)
{
e9plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e9hitTimer = 0;
}
if (e9knockbackRes == false)
{
e9knockback = true;
}
if (e9HP <= 0)
{
if (e9coinValue > 0)
{
e9coins = true;
e9coinFrame = 0;
e9coinCT = 0;
}
e9smoke = true;
e9smokeCT = 0;
e9smokeFrame = 0;
e9knockback = false;
}
}
if (e9frozen == true)
{
e9CT = 0;
e9FreezeColor = 200;
e9FreezeCT++;
if (e9FreezeCT >= 300 * freezeTreasure)
{
e9frozen = false;
e9FreezeCT = 0;
if (touchLe9 == true)
{
touchLe9 = false;
}
if (touchRe9 == true)
{
touchRe9 = false;
}
if (e9stand == true)
{
e9stand = false;
}
}
}
else
{
e9FreezeColor = opacity;
}
}
#endregion
#region e10
if (e10spawn == true)
{
if (e10breathhit == true)
{
e10hitTimer++;
if (e10hitTimer >= 2)
{
e10breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e10armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e10armor - e10armorRed < 0)
{
e10armor = 0;
e10armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e10FireVul * breathCritBonus) +
(e10BoltVul * breathCritBonus) + (e10AcidVul * breathCritBonus)) - (e10armor -
e10armorRed)) <= 0 && e10plinkOn == false)
{
e10plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e10FireVul * breathCritBonus) +
(e10BoltVul * breathCritBonus) + (e10AcidVul * breathCritBonus)) - (e10armor -
e10armorRed)) > 0)
{
e10invulnerable = true;
e10HP = e10HP - ((breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e10FireVul *
breathCritBonus) + (e10BoltVul * breathCritBonus) + (e10AcidVul * breathCritBonus))
- (e10armor - e10armorRed));
breathXP++;
}
}
else if (breathType == 2 && e10frozen == false)
{
if (e10frRes == false)
{
e10frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e10peaceRes == false)
{
e10peaceful = true;
}
}
breathXP++;
e10hitTimer = 0;
if (e10HP <= 0)
{
if (e10coinValue > 0)
{
e10coins = true;
e10coinFrame = 0;
e10coinCT = 0;
}
e10smoke = true;
e10smokeCT = 0;
e10smokeFrame = 0;
e10knockback = false;
}
}
}
if (e10clawhit == true && e10frozen == false && e10peaceful
== false)
{
e10hitTimer++;
if (e10hitTimer >= 2)
{
e10clawhit = false;
if (e10armor - e10armorRed < 0)
{
e10armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e10armor - e10armorRed) > 0)
{
e10invulnerable = true;
e10HP = e10HP - ((clawDmg + clawDmgBonus +
(clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e10armor - e10armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e10armor - e10armorRed) <= 0 && e10plinkOn
== false)
{
e10plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e10hitTimer = 0;
}
if (e10knockbackRes == false)
{
e10knockback = true;
}
if (e10HP <= 0)
{
if (e10coinValue > 0)
{
e10coins = true;
e10coinFrame = 0;
e10coinCT = 0;
}
e10smoke = true;
e10smokeCT = 0;
e10smokeFrame = 0;
e10knockback = false;
}
}
if (e10frozen == true)
{
e10CT = 0;
e10FreezeColor = 200;
e10FreezeCT++;
if (e10FreezeCT >= 300 * freezeTreasure)
{
e10frozen = false;
e10FreezeCT = 0;
if (touchLe10 == true)
{
touchLe10 = false;
}
if (touchRe10 == true)
{
touchRe10 = false;
}
if (e10stand == true)
{
e10stand = false;
}
}
}
else
{
e10FreezeColor = opacity;
}
}
#endregion
#region e11
if (e11spawn == true)
{
if (e11breathhit == true)
{
e11hitTimer++;
if (e11hitTimer >= 2)
{
e11breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e11armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e11armor - e11armorRed < 0)
{
e11armor = 0;
e11armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e11FireVul * breathCritBonus) +
(e11BoltVul * breathCritBonus) + (e11AcidVul * breathCritBonus)) - (e11armor -
e11armorRed)) <= 0 && e11plinkOn == false)
{
e11plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e11FireVul * breathCritBonus) +
(e11BoltVul * breathCritBonus) + (e11AcidVul * breathCritBonus)) - (e11armor -
e11armorRed)) > 0)
{
e11invulnerable = true;
e11HP = e11HP - ((breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e11FireVul *
breathCritBonus) + (e11BoltVul * breathCritBonus) + (e11AcidVul * breathCritBonus))
- (e11armor - e11armorRed));
breathXP++;
}
}
else if (breathType == 2 && e11frozen == false)
{
if (e11frRes == false)
{
e11frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e11peaceRes == false)
{
e11peaceful = true;
}
}
breathXP++;
e11hitTimer = 0;
if (e11HP <= 0)
{
if (e11coinValue > 0)
{
e11coins = true;
e11coinFrame = 0;
e11coinCT = 0;
}
e11smoke = true;
e11smokeCT = 0;
e11smokeFrame = 0;
e11knockback = false;
}
}
}
if (e11clawhit == true && e11frozen == false && e11peaceful
== false)
{
e11hitTimer++;
if (e11hitTimer >= 2)
{
e11clawhit = false;
if (e11armor - e11armorRed < 0)
{
e11armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e11armor - e11armorRed) > 0)
{
e11invulnerable = true;
e11HP = e11HP - ((clawDmg + clawDmgBonus +
(clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e11armor - e11armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e11armor - e11armorRed) <= 0 && e11plinkOn
== false)
{
e11plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e11hitTimer = 0;
}
if (e11knockbackRes == false)
{
e11knockback = true;
}
if (e11HP <= 0)
{
if (e11coinValue > 0)
{
e11coins = true;
e11coinFrame = 0;
e11coinCT = 0;
}
e11smoke = true;
e11smokeCT = 0;
e11smokeFrame = 0;
e11knockback = false;
}
}
if (e11frozen == true)
{
e11CT = 0;
e11FreezeColor = 200;
e11FreezeCT++;
if (e11FreezeCT >= 300 * freezeTreasure)
{
e11frozen = false;
e11FreezeCT = 0;
if (touchLe1 == true)
{
touchLe1 = false;
}
if (touchRe1 == true)
{
touchRe1 = false;
}
if (e11stand == true)
{
e11stand = false;
}
}
}
else
{
e11FreezeColor = opacity;
}
}
#endregion
#region e12
if (e12spawn == true)
{
if (e12breathhit == true)
{
e12hitTimer++;
if (e12hitTimer >= 2)
{
e12breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e12armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e12armor - e11armorRed < 0)
{
e12armor = 0;
e12armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e12FireVul * breathCritBonus) +
(e12BoltVul * breathCritBonus) + (e12AcidVul * breathCritBonus)) - (e12armor -
e12armorRed)) <= 0 && e12plinkOn == false)
{
e12plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e12FireVul * breathCritBonus) +
(e12BoltVul * breathCritBonus) + (e12AcidVul * breathCritBonus)) - (e12armor -
e12armorRed)) > 0)
{
e12invulnerable = true;
e12HP = e12HP - ((breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e12FireVul *
breathCritBonus) + (e12BoltVul * breathCritBonus) + (e12AcidVul * breathCritBonus))
- (e12armor - e12armorRed));
breathXP++;
}
}
else if (breathType == 2 && e12frozen == false)
{
if (e12frRes == false)
{
e12frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e12peaceRes == false)
{
e12peaceful = true;
}
}
breathXP++;
e12hitTimer = 0;
if (e12HP <= 0)
{
if (e12coinValue > 0)
{
e12coins = true;
e12coinFrame = 0;
e12coinCT = 0;
}
e12smoke = true;
e12smokeCT = 0;
e12smokeFrame = 0;
e12knockback = false;
}
}
}
if (e12clawhit == true && e12frozen == false && e12peaceful
== false)
{
e12hitTimer++;
if (e12hitTimer >= 2)
{
e12clawhit = false;
if (e12armor - e12armorRed < 0)
{
e12armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e12armor - e12armorRed) > 0)
{
e12invulnerable = true;
e12HP = e12HP - ((clawDmg + clawDmgBonus +
(clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e12armor - e12armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e12armor - e12armorRed) <= 0 && e12plinkOn
== false)
{
e12plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e12hitTimer = 0;
}
if (e12knockbackRes == false)
{
e12knockback = true;
}
if (e12HP <= 0)
{
if (e12coinValue > 0)
{
e12coins = true;
e12coinFrame = 0;
e12coinCT = 0;
}
e12smoke = true;
e12smokeCT = 0;
e12smokeFrame = 0;
e12knockback = false;
}
}
if (e12frozen == true)
{
e12CT = 0;
e12FreezeColor = 200;
e12FreezeCT++;
if (e12FreezeCT >= 300 * freezeTreasure)
{
e12frozen = false;
e12FreezeCT = 0;
if (touchLe2 == true)
{
touchLe2 = false;
}
if (touchRe2 == true)
{
touchRe2 = false;
}
if (e12stand == true)
{
e12stand = false;
}
}
}
else
{
e12FreezeColor = opacity;
}
}
#endregion
#region e13
if (e13spawn == true)
{
if (e13breathhit == true)
{
e13hitTimer++;
if (e13hitTimer >= 2)
{
e13breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e13armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e13armor - e13armorRed < 0)
{
e13armor = 0;
e13armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e13FireVul * breathCritBonus) +
(e13BoltVul * breathCritBonus) + (e13AcidVul * breathCritBonus)) - (e13armor -
e13armorRed)) <= 0 && e13plinkOn == false)
{
e13plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e13FireVul * breathCritBonus) +
(e13BoltVul * breathCritBonus) + (e13AcidVul * breathCritBonus)) - (e13armor -
e13armorRed)) > 0)
{
e13invulnerable = true;
e13HP = e13HP - ((breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e13FireVul *
breathCritBonus) + (e13BoltVul * breathCritBonus) + (e13AcidVul * breathCritBonus))
- (e13armor - e13armorRed));
breathXP++;
}
}
else if (breathType == 2 && e13frozen == false)
{
if (e13frRes == false)
{
e13frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e13peaceRes == false)
{
e13peaceful = true;
}
}
breathXP++;
e13hitTimer = 0;
if (e13HP <= 0)
{
if (e13coinValue > 0)
{
e13coins = true;
e13coinFrame = 0;
e13coinCT = 0;
}
e13smoke = true;
e13smokeCT = 0;
e13smokeFrame = 0;
e13knockback = false;
}
}
}
if (e13clawhit == true && e13frozen == false && e13peaceful
== false)
{
e13hitTimer++;
if (e13hitTimer >= 2)
{
e13clawhit = false;
if (e13armor - e13armorRed < 0)
{
e13armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e13armor - e13armorRed) > 0)
{
e13invulnerable = true;
e13HP = e13HP - ((clawDmg + clawDmgBonus +
(clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e13armor - e13armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e13armor - e13armorRed) <= 0 && e13plinkOn
== false)
{
e13plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e13hitTimer = 0;
}
if (e13knockbackRes == false)
{
e13knockback = true;
}
if (e13HP <= 0)
{
if (e13coinValue > 0)
{
e13coins = true;
e13coinFrame = 0;
e13coinCT = 0;
}
e13smoke = true;
e13smokeCT = 0;
e13smokeFrame = 0;
e13knockback = false;
}
}
if (e13frozen == true)
{
e13CT = 0;
e13FreezeColor = 200;
e13FreezeCT++;
if (e13FreezeCT >= 300 * freezeTreasure)
{
e13frozen = false;
e13FreezeCT = 0;
if (touchLe3 == true)
{
touchLe3 = false;
}
if (touchRe3 == true)
{
touchRe3 = false;
}
if (e13stand == true)
{
e13stand = false;
}
}
}
else
{
e13FreezeColor = opacity;
}
}
#endregion
#region e14
if (e14spawn == true)
{
if (e14breathhit == true)
{
e14hitTimer++;
if (e14hitTimer >= 2)
{
e14breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e14armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e14armor - e14armorRed < 0)
{
e14armor = 0;
e14armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e14FireVul * breathCritBonus) +
(e14BoltVul * breathCritBonus) + (e14AcidVul * breathCritBonus)) - (e14armor -
e14armorRed)) <= 0 && e14plinkOn == false)
{
e14plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e14FireVul * breathCritBonus) +
(e14BoltVul * breathCritBonus) + (e14AcidVul * breathCritBonus)) - (e14armor -
e14armorRed)) > 0)
{
e14invulnerable = true;
e14HP = e14HP - ((breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e14FireVul *
breathCritBonus) + (e14BoltVul * breathCritBonus) + (e14AcidVul * breathCritBonus))
- (e14armor - e14armorRed));
breathXP++;
}
}
else if (breathType == 2 && e14frozen == false)
{
if (e14frRes == false)
{
e14frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e14peaceRes == false)
{
e14peaceful = true;
}
}
breathXP++;
e14hitTimer = 0;
if (e14HP <= 0)
{
if (e14coinValue > 0)
{
e14coins = true;
e14coinFrame = 0;
e14coinCT = 0;
}
e14smoke = true;
e14smokeCT = 0;
e14smokeFrame = 0;
e14knockback = false;
}
}
}
if (e14clawhit == true && e14frozen == false && e14peaceful
== false)
{
e14hitTimer++;
if (e14hitTimer >= 2)
{
e14clawhit = false;
if (e14armor - e14armorRed < 0)
{
e14armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e14armor - e14armorRed) > 0)
{
e14invulnerable = true;
e14HP = e14HP - ((clawDmg + clawDmgBonus +
(clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e14armor - e14armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e14armor - e14armorRed) <= 0 && e14plinkOn
== false)
{
e14plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e14hitTimer = 0;
}
if (e14knockbackRes == false)
{
e14knockback = true;
}
if (e14HP <= 0)
{
if (e14coinValue > 0)
{
e14coins = true;
e14coinFrame = 0;
e14coinCT = 0;
}
e14smoke = true;
e14smokeCT = 0;
e14smokeFrame = 0;
e14knockback = false;
}
}
if (e14frozen == true)
{
e14CT = 0;
e14FreezeColor = 200;
e14FreezeCT++;
if (e14FreezeCT >= 300 * freezeTreasure)
{
e14frozen = false;
e14FreezeCT = 0;
if (touchLe4 == true)
{
touchLe4 = false;
}
if (touchRe4 == true)
{
touchRe4 = false;
}
if (e14stand == true)
{
e14stand = false;
}
}
}
else
{
e14FreezeColor = opacity;
}
}
#endregion
#region e15
if (e15spawn == true)
{
if (e15breathhit == true)
{
e15hitTimer++;
if (e15hitTimer >= 2)
{
e15breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e15armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e15armor - e15armorRed < 0)
{
e15armor = 0;
e15armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e15FireVul * breathCritBonus) +
(e15BoltVul * breathCritBonus) + (e15AcidVul * breathCritBonus)) - (e15armor -
e15armorRed)) <= 0 && e15plinkOn == false)
{
e15plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e15FireVul * breathCritBonus) +
(e15BoltVul * breathCritBonus) + (e15AcidVul * breathCritBonus)) - (e15armor -
e15armorRed)) > 0)
{
e15invulnerable = true;
e15HP = e15HP - ((breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e15FireVul *
breathCritBonus) + (e15BoltVul * breathCritBonus) + (e15AcidVul * breathCritBonus))
- (e15armor - e15armorRed));
breathXP++;
}
}
else if (breathType == 2 && e15frozen == false)
{
if (e15frRes == false)
{
e15frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e15peaceRes == false)
{
e15peaceful = true;
}
}
breathXP++;
e15hitTimer = 0;
if (e15HP <= 0)
{
if (e15coinValue > 0)
{
e15coins = true;
e15coinFrame = 0;
e15coinCT = 0;
}
e15smoke = true;
e15smokeCT = 0;
e15smokeFrame = 0;
e15knockback = false;
}
}
}
if (e15clawhit == true && e15frozen == false && e15peaceful
== false)
{
e15hitTimer++;
if (e15hitTimer >= 2)
{
e15clawhit = false;
if (e15armor - e15armorRed < 0)
{
e15armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e15armor - e15armorRed) > 0)
{
e15invulnerable = true;
e15HP = e15HP - ((clawDmg + clawDmgBonus +
(clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e15armor - e15armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e15armor - e15armorRed) <= 0 && e15plinkOn
== false)
{
e15plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e15hitTimer = 0;
}
if (e15knockbackRes == false)
{
e15knockback = true;
}
if (e15HP <= 0)
{
if (e15coinValue > 0)
{
e15coins = true;
e15coinFrame = 0;
e15coinCT = 0;
}
e15smoke = true;
e15smokeCT = 0;
e15smokeFrame = 0;
e15knockback = false;
}
}
if (e15frozen == true)
{
e15CT = 0;
e15FreezeColor = 200;
e15FreezeCT++;
if (e15FreezeCT >= 300 * freezeTreasure)
{
e15frozen = false;
e15FreezeCT = 0;
if (touchLe5 == true)
{
touchLe5 = false;
}
if (touchRe5 == true)
{
touchRe5 = false;
}
if (e15stand == true)
{
e15stand = false;
}
}
}
else
{
e15FreezeColor = opacity;
}
}
#endregion
#region e16
if (e16spawn == true)
{
if (e16breathhit == true)
{
e16hitTimer++;
if (e16hitTimer >= 2)
{
e16breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e16armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e16armor - e16armorRed < 0)
{
e16armor = 0;
e16armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e16FireVul * breathCritBonus) +
(e16BoltVul * breathCritBonus) + (e16AcidVul * breathCritBonus)) - (e16armor -
e16armorRed)) <= 0 && e16plinkOn == false)
{
e16plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e16FireVul * breathCritBonus) +
(e16BoltVul * breathCritBonus) + (e16AcidVul * breathCritBonus)) - (e16armor -
e16armorRed)) > 0)
{
e16invulnerable = true;
e16HP = e16HP - ((breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e16FireVul *
breathCritBonus) + (e16BoltVul * breathCritBonus) + (e16AcidVul * breathCritBonus))
- (e16armor - e16armorRed));
breathXP++;
}
}
else if (breathType == 2 && e16frozen == false)
{
if (e16frRes == false)
{
e16frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e16peaceRes == false)
{
e16peaceful = true;
}
}
breathXP++;
e16hitTimer = 0;
if (e16HP <= 0)
{
if (e16coinValue > 0)
{
e16coins = true;
e16coinFrame = 0;
e16coinCT = 0;
}
e16smoke = true;
e16smokeCT = 0;
e16smokeFrame = 0;
e16knockback = false;
}
}
}
if (e16clawhit == true && e16frozen == false && e16peaceful
== false)
{
e16hitTimer++;
if (e16hitTimer >= 2)
{
e16clawhit = false;
if (e16armor - e16armorRed < 0)
{
e16armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e16armor - e16armorRed) > 0)
{
e16invulnerable = true;
e16HP = e16HP - ((clawDmg + clawDmgBonus +
(clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e16armor - e16armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e16armor - e16armorRed) <= 0 && e16plinkOn
== false)
{
e16plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e16hitTimer = 0;
}
if (e16knockbackRes == false)
{
e16knockback = true;
}
if (e16HP <= 0)
{
if (e16coinValue > 0)
{
e16coins = true;
e16coinFrame = 0;
e16coinCT = 0;
}
e16smoke = true;
e16smokeCT = 0;
e16smokeFrame = 0;
e16knockback = false;
}
}
if (e16frozen == true)
{
e16CT = 0;
e16FreezeColor = 200;
e16FreezeCT++;
if (e16FreezeCT >= 300 * freezeTreasure)
{
e16frozen = false;
e16FreezeCT = 0;
if (touchLe6 == true)
{
touchLe6 = false;
}
if (touchRe6 == true)
{
touchRe6 = false;
}
if (e16stand == true)
{
e16stand = false;
}
}
}
else
{
e16FreezeColor = opacity;
}
}
#endregion
#region e17
if (e17spawn == true)
{
if (e17breathhit == true)
{
e17hitTimer++;
if (e17hitTimer >= 2)
{
e17breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e17armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e17armor - e17armorRed < 0)
{
e17armor = 0;
e17armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e17FireVul * breathCritBonus) +
(e17BoltVul * breathCritBonus) + (e17AcidVul * breathCritBonus)) - (e17armor -
e17armorRed)) <= 0 && e17plinkOn == false)
{
e17plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e17FireVul * breathCritBonus) +
(e17BoltVul * breathCritBonus) + (e17AcidVul * breathCritBonus)) - (e17armor -
e17armorRed)) > 0)
{
e17invulnerable = true;
e17HP = e17HP - ((breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e17FireVul *
breathCritBonus) + (e17BoltVul * breathCritBonus) + (e17AcidVul * breathCritBonus))
- (e17armor - e17armorRed));
breathXP++;
}
}
else if (breathType == 2 && e17frozen == false)
{
if (e17frRes == false)
{
e17frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e17peaceRes == false)
{
e17peaceful = true;
}
}
breathXP++;
e17hitTimer = 0;
if (e17HP <= 0)
{
if (e17coinValue > 0)
{
e17coins = true;
e17coinFrame = 0;
e17coinCT = 0;
}
e17smoke = true;
e17smokeCT = 0;
e17smokeFrame = 0;
e17knockback = false;
}
}
}
if (e17clawhit == true && e17frozen == false && e17peaceful
== false)
{
e17hitTimer++;
if (e17hitTimer >= 2)
{
e17clawhit = false;
if (e17armor - e17armorRed < 0)
{
e17armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e17armor - e17armorRed) > 0)
{
e17invulnerable = true;
e17HP = e17HP - ((clawDmg + clawDmgBonus +
(clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e17armor - e17armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e17armor - e17armorRed) <= 0 && e17plinkOn
== false)
{
e17plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e17hitTimer = 0;
}
if (e17knockbackRes == false)
{
e17knockback = true;
}
if (e17HP <= 0)
{
if (e17coinValue > 0)
{
e17coins = true;
e17coinFrame = 0;
e17coinCT = 0;
}
e17smoke = true;
e17smokeCT = 0;
e17smokeFrame = 0;
e17knockback = false;
}
}
if (e17frozen == true)
{
e17CT = 0;
e17FreezeColor = 200;
e17FreezeCT++;
if (e17FreezeCT >= 300 * freezeTreasure)
{
e17frozen = false;
e17FreezeCT = 0;
if (touchLe7 == true)
{
touchLe7 = false;
}
if (touchRe7 == true)
{
touchRe7 = false;
}
if (e17stand == true)
{
e17stand = false;
}
}
}
else
{
e17FreezeColor = opacity;
}
}
#endregion e17
#region e18
if (e18spawn == true)
{
if (e18breathhit == true)
{
e18hitTimer++;
if (e18hitTimer >= 2)
{
e18breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e18armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e18armor - e18armorRed < 0)
{
e18armor = 0;
e18armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e18FireVul * breathCritBonus) +
(e18BoltVul * breathCritBonus) + (e18AcidVul * breathCritBonus)) - (e18armor -
e18armorRed)) <= 0 && e18plinkOn == false)
{
e18plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e18FireVul * breathCritBonus) +
(e18BoltVul * breathCritBonus) + (e18AcidVul * breathCritBonus)) - (e18armor -
e18armorRed)) > 0)
{
e18invulnerable = true;
e18HP = e18HP - ((breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e18FireVul *
breathCritBonus) + (e18BoltVul * breathCritBonus) + (e18AcidVul * breathCritBonus))
- (e18armor - e18armorRed));
breathXP++;
}
}
else if (breathType == 2 && e18frozen == false)
{
if (e18frRes == false)
{
e18frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e18peaceRes == false)
{
e18peaceful = true;
}
}
breathXP++;
e18hitTimer = 0;
if (e18HP <= 0)
{
if (e18coinValue > 0)
{
e18coins = true;
e18coinFrame = 0;
e18coinCT = 0;
}
e18smoke = true;
e18smokeCT = 0;
e18smokeFrame = 0;
e18knockback = false;
}
}
}
if (e18clawhit == true && e18frozen == false && e18peaceful
== false)
{
e18hitTimer++;
if (e18hitTimer >= 2)
{
e18clawhit = false;
if (e18armor - e18armorRed < 0)
{
e18armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e18armor - e18armorRed) > 0)
{
e18invulnerable = true;
e18HP = e18HP - ((clawDmg + clawDmgBonus +
(clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e18armor - e18armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e18armor - e18armorRed) <= 0 && e18plinkOn
== false)
{
e18plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e18hitTimer = 0;
}
if (e18knockbackRes == false)
{
e18knockback = true;
}
if (e18HP <= 0)
{
if (e18coinValue > 0)
{
e18coins = true;
e18coinFrame = 0;
e18coinCT = 0;
}
e18smoke = true;
e18smokeCT = 0;
e18smokeFrame = 0;
e18knockback = false;
}
}
if (e18frozen == true)
{
e18CT = 0;
e18FreezeColor = 200;
e18FreezeCT++;
if (e18FreezeCT >= 300 * freezeTreasure)
{
e18frozen = false;
e18FreezeCT = 0;
if (touchLe8 == true)
{
touchLe8 = false;
}
if (touchRe8 == true)
{
touchRe8 = false;
}
if (e18stand == true)
{
e18stand = false;
}
}
}
else
{
e18FreezeColor = opacity;
}
}
#endregion
#region e19
if (e19spawn == true)
{
if (e19breathhit == true)
{
e19hitTimer++;
if (e19hitTimer >= 2)
{
e19breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e19armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e19armor - e19armorRed < 0)
{
e19armor = 0;
e19armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e19FireVul * breathCritBonus) +
(e19BoltVul * breathCritBonus) + (e19AcidVul * breathCritBonus)) - (e19armor -
e19armorRed)) <= 0 && e19plinkOn == false)
{
e19plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e19FireVul * breathCritBonus) +
(e19BoltVul * breathCritBonus) + (e19AcidVul * breathCritBonus)) - (e19armor -
e19armorRed)) > 0)
{
e19invulnerable = true;
e19HP = e19HP - (((breathDmg +
breathDmgBonus + breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e19FireVul *
breathCritBonus) + (e19BoltVul * breathCritBonus) + (e19AcidVul * breathCritBonus))
- (e19armor - e19armorRed)));
breathXP++;
}
}
else if (breathType == 2 && e19frozen == false)
{
if (e19frRes == false)
{
e19frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e19peaceRes == false)
{
e19peaceful = true;
}
}
breathXP++;
e19hitTimer = 0;
if (e19HP <= 0)
{
if (e19coinValue > 0)
{
e19coins = true;
e19coinFrame = 0;
e19coinCT = 0;
}
e19smoke = true;
e19smokeCT = 0;
e19smokeFrame = 0;
e19knockback = false;
}
}
}
if (e19clawhit == true && e19frozen == false && e19peaceful
== false)
{
e19hitTimer++;
if (e19hitTimer >= 2)
{
e19clawhit = false;
if (e19armor - e19armorRed < 0)
{
e19armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e19armor - e19armorRed) > 0)
{
e19invulnerable = true;
e19HP = e19HP - ((clawDmg + clawDmgBonus +
(clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e19armor - e19armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e19armor - e19armorRed) <= 0 && e19plinkOn
== false)
{
e19plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e19hitTimer = 0;
}
if (e19knockbackRes == false)
{
e19knockback = true;
}
if (e19HP <= 0)
{
if (e19coinValue > 0)
{
e19coins = true;
e19coinFrame = 0;
e19coinCT = 0;
}
e19smoke = true;
e19smokeCT = 0;
e19smokeFrame = 0;
e19knockback = false;
}
}
if (e19frozen == true)
{
e19CT = 0;
e19FreezeColor = 200;
e19FreezeCT++;
if (e19FreezeCT >= 300 * freezeTreasure)
{
e19frozen = false;
e19FreezeCT = 0;
if (touchLe9 == true)
{
touchLe9 = false;
}
if (touchRe9 == true)
{
touchRe9 = false;
}
if (e19stand == true)
{
e19stand = false;
}
}
}
else
{
e19FreezeColor = opacity;
}
}
#endregion
#region e20
if (e20spawn == true)
{
if (e20breathhit == true)
{
e20hitTimer++;
if (e20hitTimer >= 2)
{
e20breathhit = false;
if (breathType != 2 && breathType != 4)
{
if (breathType == 3)
{
e20armorRed = 1 + acidArmorRedBonus +
acidArmorRedTreasure;
}
if (e20armor - e20armorRed < 0)
{
e20armor = 0;
e20armorRed = 0;
}
if (((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (e20FireVul * breathCritBonus) +
(e20BoltVul * breathCritBonus) + (e20AcidVul * breathCritBonus)) - (e20armor -
e20armorRed)) <= 0 && e20plinkOn == false)
{
e20plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
else if (((breathDmg + breathDmgBonus + breathLV
+ breathDmgTreasure1 + breathDmgTreasure2 + (e20FireVul * breathCritBonus) +
(e20BoltVul * breathCritBonus) + (e20AcidVul * breathCritBonus)) - (e20armor -
e20armorRed)) > 0)
{
e20invulnerable = true;
e20HP = e20HP - ((breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (e20FireVul *
breathCritBonus) + (e20BoltVul * breathCritBonus) + (e20AcidVul * breathCritBonus))
- (e20armor - e20armorRed));
breathXP++;
}
}
else if (breathType == 2 && e20frozen == false)
{
if (e20frRes == false)
{
e20frozen = true;
if (freezePlay == false)
{
freezePlay = true;
}
}
}
else if (breathType == 4)
{
if (e20peaceRes == false)
{
e20peaceful = true;
}
}
breathXP++;
e20hitTimer = 0;
if (e20HP <= 0)
{
if (e20coinValue > 0)
{
e20coins = true;
e20coinFrame = 0;
e20coinCT = 0;
}
e20smoke = true;
e20smokeCT = 0;
e20smokeFrame = 0;
e20knockback = false;
}
}
}
if (e20clawhit == true && e20frozen == false && e20peaceful
== false)
{
e20hitTimer++;
if (e20hitTimer >= 2)
{
e20clawhit = false;
if (e20armor - e20armorRed < 0)
{
e20armor = 0;
}
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e20armor - e20armorRed) > 0)
{
e20invulnerable = true;
e20HP = e20HP - ((clawDmg + clawDmgBonus +
(clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2) - (e20armor - e20armorRed));
clawXP++;
}
else if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) - (e20armor - e20armorRed) <= 0 && e20plinkOn
== false)
{
e20plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
e20hitTimer = 0;
}
if (e20knockbackRes == false)
{
e20knockback = true;
}
if (e20HP <= 0)
{
if (e20coinValue > 0)
{
e20coins = true;
e20coinFrame = 0;
e20coinCT = 0;
}
e20smoke = true;
e20smokeCT = 0;
e20smokeFrame = 0;
e20knockback = false;
}
}
if (e20frozen == true)
{
e20CT = 0;
e20FreezeColor = 200;
e20FreezeCT++;
if (e20FreezeCT >= 300 * freezeTreasure)
{
e20frozen = false;
e20FreezeCT = 0;
if (touchLe10 == true)
{
touchLe10 = false;
}
if (touchRe10 == true)
{
touchRe10 = false;
}
if (e20stand == true)
{
e20stand = false;
}
}
}
else
{
e20FreezeColor = opacity;
}
}
#endregion
#endregion
#region Action Stage Scroll
if (stageHome == false && stage5e1 == false)
{
if (drgnCamY <= cameraMinY && drgnYvel <= 0)
{
drgnCamVel = 0;
}
if (drgnCamY <= cameraMinY + 20)
{
if (drgnCamVel > 1)
{
drgnCamVel++;
}
}
if (drgnCamY > cameraMinY)
{
if (drgnCamY == drgnY + 72 - 360)
{
drgnCamVel = 0;
}
if (drgnCamY > drgnY + 72 - 360 && drgnCamY <= drgnY +
77 - 360)
{
drgnCamVel = -1;
}
else if (drgnCamY > drgnY + 77 - 360 && drgnCamY <=
drgnY + 82 - 360)
{
drgnCamVel = -2;
}
else if (drgnCamY > drgnY + 82 - 360 && drgnCamY <=
drgnY + 87 - 360)
{
drgnCamVel = -3;
}
else if (drgnCamY > drgnY + 87 - 360 && drgnCamY <=
drgnY + 92 - 360)
{
drgnCamVel = -4;
}
else if (drgnCamY > drgnY + 92 - 360 && drgnCamY <=
drgnY + 97 - 360)
{
drgnCamVel = -5;
}
else if (drgnCamY > drgnY + 97 - 360 && drgnCamY <=
drgnY + 102 - 360)
{
drgnCamVel = -6;
}
else if (drgnCamY > drgnY + 102 - 360 && drgnCamY <=
drgnY + 107 - 360)
{
drgnCamVel = -7;
}
else if (drgnCamY > drgnY + 107 - 360 && drgnCamY <=
drgnY + 112 - 360)
{
drgnCamVel = -8;
}
}
if (drgnCamY < cameraMaxY)
{
if (drgnCamY < drgnY + 72 - 360 && drgnCamY >= drgnY +
67 - 360)
{
drgnCamVel = 1;
}
else if (drgnCamY < drgnY + 67 - 360 && drgnCamY >=
drgnY + 62 - 360)
{
drgnCamVel = 2;
}
else if (drgnCamY < drgnY + 62 - 360 && drgnCamY >=
drgnY + 57 - 360)
{
drgnCamVel = 3;
}
else if (drgnCamY < drgnY + 57 - 360 && drgnCamY >=
drgnY + 52 - 360)
{
drgnCamVel = 4;
}
else if (drgnCamY < drgnY + 52 - 360 && drgnCamY >=
drgnY + 47 - 360)
{
drgnCamVel = 5;
}
else if (drgnCamY < drgnY + 47 - 360 && drgnCamY >=
drgnY + 42 - 360)
{
drgnCamVel = 6;
}
else if (drgnCamY < drgnY + 42 - 360 && drgnCamY >=
drgnY + 37 - 360)
{
drgnCamVel = 7;
}
else if (drgnCamY < drgnY + 37 - 360 && drgnCamY >=
drgnY + 32 - 360)
{
drgnCamVel = 8;
}
else if (drgnCamY < drgnY + 32 - 360 && drgnCamY >=
drgnY + 27 - 360)
{
drgnCamVel = 9;
}
else if (drgnCamY < drgnY + 27 - 360 && drgnCamY >=
drgnY + 22 - 360)
{
drgnCamVel = 10;
}
else if (drgnCamY < drgnY + 22 - 360 && drgnCamY >=
drgnY + 17 - 360)
{
drgnCamVel = 11;
}
else if (drgnCamY < drgnY + 17 - 360)
{
drgnCamVel = 12;
}
}
if (drgnCamY >= cameraMaxY - 20)
{
if (drgnCamVel > 1)
{
drgnCamVel--;
}
}
if (drgnCamY >= cameraMaxY && drgnYvel >= 0)
{
drgnCamVel = 0;
}
drgnCamY += drgnCamVel;
}
if (drgnX + 63 - 640 <= 0)
{
drgnCamX = 0;
}
else if (drgnX + 63 - 640 > 0)
{
if ((drgnX + 63 - 640) < cameraMaxX)
{
drgnCamX = drgnX + 63 - 640;
}
else if (drgnX + 63 - 640 >= cameraMaxX)
{
drgnCamX = cameraMaxX;
}
}
if (stage7eB == true && boss7Phase2 == true)
{
if (drgnX + 63 - 640 <= 320)
{
drgnCamX = 320;
}
}
#endregion
#region Campfire CT
smokeCT++;
fireCT++;
if (fireCT >= 6)
{
fireFrame++;
if (fireFrame >= 15)
{
fireFrame = 0;
}
fireCT = 0;
}
if (smokeCT >= 12)
{
smokeFrame++;
if (smokeFrame >= 3)
{
smokeFrame = 0;
}
smokeCT = 0;
}
#endregion
#region Action Stage Keys Up
if (levelUpMenu == false)
{
if (kbState.IsKeyUp(Keys.C) && confTrue == false &&
gpState.IsButtonUp(Buttons.Back) && lastKeyC == true)
{
lastKeyC = false;
}
if (kbState.IsKeyUp(Keys.X) && jumpTrue == false &&
gpState.IsButtonUp(Buttons.A) && lastKeyX == true)
{
lastKeyX = false;
}
}
else if (levelUpMenu == true)
{
if (kbState.IsKeyUp(Keys.X) && jumpTrue == false &&
gpState.IsButtonUp(Buttons.B) && lastKeyX == true)
{
lastKeyX = false;
}
if (kbState.IsKeyUp(Keys.C) && confTrue == false &&
gpState.IsButtonUp(Buttons.A) && gpState.IsButtonUp(Buttons.Back) && lastKeyC ==
true)
{
lastKeyC = false;
}
}
if (kbState.IsKeyUp(Keys.X) && jumpTrue == false &&
gpState.IsButtonUp(Buttons.A) && xWhileJumping == true)
{
xWhileJumping = false;
}
if (kbState.IsKeyUp(Keys.Q) && swlTrue == false &&
gpState.IsButtonUp(Buttons.LeftShoulder) && lastKeyQ == true)
{
lastKeyQ = false;
}
if (kbState.IsKeyUp(Keys.W) && swrTrue == false &&
gpState.IsButtonUp(Buttons.RightShoulder) && lastKeyW == true)
{
lastKeyW = false;
}
if (kbState.IsKeyUp(Keys.Up) && upTrue == false &&
gpState.ThumbSticks.Left.Y < 0.8f && lastKeyUp == true)
{
lastKeyUp = false;
}
if (kbState.IsKeyUp(Keys.Down) && downTrue == false &&
gpState.ThumbSticks.Left.Y > -0.8f && lastKeyDown == true)
{
lastKeyDown = false;
}
if (kbState.IsKeyUp(Keys.Up) && upTrue == false &&
gpState.ThumbSticks.Left.Y < 0.4f && lastDirUp == true)
{
lastDirUp = false;
pressUp = false;
}
#endregion
#region End Of Stage
if (endOfStage == true)
{
acid1 = false;
acid2 = false;
acid3 = false;
acid4 = false;
flame1 = false;
flame2 = false;
spin1 = false;
spin2 = false;
spin3 = false;
spin4 = false;
if (drgnAction == 5)
{
if (drgnFrame >= 14)
{
drgnFrame = 4;
}
}
if (playExit == false)
{
if (stage5e2 == true || (stage4e3 == true && from4e1 ==
true) || stage6eB == true)
{
play5e2Top.stopBGM();
play5e2Bottom.stopBGM();
}
else
{
playStageMusic.stopBGM();
}
playExit = true;
musicExit.Play((float)(volume * 0.7 * tempVolume), 0,
0);
}
drgnKnockback = false;
drgnWaitTimer = 0;
drgnIdle = false;
drgnCT++;
if (drgnOnGround == false)
{
drgnY_CT++;
drgnY = drgnY + drgnYvel;
if (drgnYvel < 5 && drgnY_CT >= 6)
{
drgnYvel++;
drgnY_CT = 0;
}
if (drgnYvel > 0)
{
if (drgnAction != 5 && drgnAction != 3 && drgnAction
!= 2)
{
drgnAction = 5;
drgnCT = 0;
drgnFrame = 0;
}
}
else if (drgnYvel <= 0)
{
if (drgnAction != 4 && drgnAction != 3 && drgnAction
!= 2)
{
drgnAction = 4;
drgnCT = 0;
drgnFrame = 0;
}
}
else if (drgnOnGround == true)
{
drgnYvel = 0;
drgnY_CT = 0;
}
}
if (drgnCT >= 6)
{
drgnFrame++;
if (stage2e4 == true)
{
if (drgnAction != 9 && drgnOnGround == true)
{
drgnAction = 9;
}
}
else
{
if (drgnAction != 10 && drgnOnGround == true)
{
drgnAction = 10;
}
}
if (drgnFrame >= 16)
{
drgnFrame = 0;
}
drgnCT = 0;
}
stageEndCT++;
if (stageEndCT >= 360)
{
stageExit = true;
}
if (stage1e1 == true)
{
if (drgnY > 1195)
{
drgnY = 1195;
drgnOnGround = true;
}
}
if (stage1e2 == true)
{
if (drgnY > 1492)
{
drgnY = 1492;
drgnOnGround = true;
}
}
if (stage1e3 == true)
{
if (drgnY > 4523)
{
drgnY = 4523;
drgnOnGround = true;
}
}
if (stage2e1 == true)
{
if (drgnY > 2063)
{
drgnY = 2063;
drgnOnGround = true;
}
}
if (stage2e2 == true)
{
if (drgnY > 1074)
{
drgnY = 1074;
drgnOnGround = true;
}
}
if (stage2e3 == true)
{
if (drgnY > 1651)
{
drgnY = 1651;
drgnOnGround = true;
}
}
if (stage2e4 == true)
{
if (stage2e4Left == true)
{
if (drgnY > 382)
{
drgnY = 382;
drgnOnGround = true;
}
}
if (stage2e4Right == true)
{
if (drgnY > 685)
{
drgnY = 685;
drgnOnGround = true;
}
}
}
if (stage3e1 == true)
{
if (drgnY > 1175)
{
drgnY = 1175;
drgnOnGround = true;
}
}
if (stage3e2 == true)
{
if (drgnY > 1701)
{
drgnY = 1701;
drgnOnGround = true;
}
}
if (stage3e3 == true)
{
if (drgnX > 3000)
{
if (drgnY > 2049)
{
drgnY = 2049;
drgnOnGround = true;
}
}
if (drgnX < 3000)
{
if (drgnY > 5273)
{
drgnY = 5273;
drgnOnGround = true;
}
}
}
if (stage4e1 == true)
{
if (drgnY > 3552)
{
drgnY = 3552;
drgnOnGround = true;
}
}
if (stage4e2 == true)
{
if (drgnY > 2075)
{
drgnY = 2075;
drgnOnGround = true;
}
}
if (stage4e3 == true)
{
if (drgnY > 2009)
{
drgnY = 2009;
drgnOnGround = true;
}
}
if (stage4e4 == true)
{
if (drgnY > 6454)
{
drgnY = 6454;
drgnOnGround = true;
}
}
if (stage5e2 == true)
{
if (drgnY > 1475)
{
drgnY = 1475;
drgnOnGround = true;
}
}
if (stage6e1 == true)
{
if (drgnY > 832)
{
drgnY = 832;
drgnOnGround = true;
}
}
if (stage6eB == true)
{
if (drgnY > 1531)
{
drgnY = 1531;
drgnOnGround = true;
}
}
}
if (stageExit == true)
{
if (stage5e2 == true || (stage4e3 == true && from4e1 ==
true) || stage6eB == true)
{
play5e2Top.updateBGM(volume, tempVolume, pauseVolume);
}
else
{
playStageMusic.updateBGM(volume, tempVolume,
pauseVolume);
}
if (stage2e2 == false && stage6e1 == false)
{
toWorldMap = true;
savingGame = true;
}
else
{
if (stage2e2 == true)
{
if (seenStory2_2 == false && endOfStage == true)
{
toStory = true;
story2_2post = true;
}
else
{
toWorldMap = true;
savingGame = true;
}
}
if (stage6e1 == true)
{
if (seenStory6_1 == false && endOfStage == true)
{
toStory = true;
story6_1post = true;
}
else
{
toWorldMap = true;
savingGame = true;
}
}
}
fadeWait = true;
fadedIn = false;
}
#endregion
#region Play Music
if (endOfStage == false && stageExit == false && defeated ==
false && treasurePickUp == false && opacity >= 32)
{
if (stageMusic == false)
{
stageMusic = true;
worldMapMusic = false;
musicFade = false;
tempVolume = 1.0f;
}
if (tempVolume > 0.0f && (stage5e2 == true || (stage4e3 ==
true && from4e1 == true)))
{
play5e2Top.playBGM(tempVolumeA, tempVolume,
pauseVolume);
play5e2Bottom.playBGM(tempVolumeB, tempVolume,
pauseVolume);
}
else if (stage6eB == false)
{
playStageMusic.playBGM(volume, tempVolume, pauseVolume);
}
if (stage6eB == true)
{
if (boss6Opacity < 255)
{
play5e2Bottom.playBGM(tempVolumeA, tempVolume,
pauseVolume);
}
if (boss6Opacity >= 255)
{
play5e2Top.playBGM(tempVolumeB, tempVolume,
pauseVolume);
}
}
}
#endregion
#region Play Breath
if (drgnFire == false)
{
if (breathFrame != 0)
{
breathFrame = 0;
}
if (breathNow < 30)
{
breathNow = 0;
}
}
if (usingClaw == false)
{
if (clawFrame != 0)
{
clawFrame = 0;
}
}
if (drgnFire == true && toActionStage == false && endOfStage ==
false && stageExit == false)
{
if (breathType == 0 && underwaterBreath == false)
{
playFireSFX.playSFX(sfxVolume, tempVolume, pauseVolume);
}
if (breathType == 1 && underwaterBreath == false)
{
playThunderSFX.playSFX(sfxVolume, tempVolume,
pauseVolume);
}
if (breathType == 2 && underwaterBreath == false)
{
playIceSFX.playSFX(sfxVolume, tempVolume, pauseVolume);
}
if (breathType == 3 && underwaterBreath == false)
{
playAcidSFX.playSFX(sfxVolume, tempVolume, pauseVolume);
}
if (breathType == 4 && underwaterBreath == false)
{
playMagicSFX.playSFX(sfxVolume, tempVolume,
pauseVolume);
}
if (underwaterBreath == true)
{
playWaterSFX.playSFX(sfxVolume, tempVolume,
pauseVolume);
}
}
#endregion
#region warp
if (stage1e1 == true || stage1e3 == true)
{
warpCT++;
if (warpCT >= 6)
{
warpCT = 0;
warpFrame++;
}
if (warpFrame >= 5)
{
warpFrame = 0;
}
}
#endregion
#region Continually Animate
#region Flyss
if (stage2e2 == true)
{
flyssCT++;
if (flyssCT >= 6)
{
flyssCT = 0;
flyssFrame++;
}
if (flyssFrame >= 16)
{
flyssFrame = 0;
flyssWait++;
if (flyssAct == 1)
{
flyssAct = 2;
}
else if (flyssAct == 2)
{
flyssAct = 0;
}
}
if (flyssWait >= 15)
{
flyssWait = 0;
if (flyssAct != 1)
{
flyssAct = 1;
flyssFrame = 0;
flyssCT = 0;
}
}
}
#endregion
#region NPC
#region 1-2
if (stage1e2 == true)
{
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
if (npc1Act == 1)
{
npc1VarAct++;
if (npc1VarAct >= 2)
{
npc1VarAct = 0;
npc1Act = 0;
}
}
}
}
#endregion
#region 1-3
if (stage1e3 == true)
{
#region npc 1
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
npc1VarAct++;
if (npc1Act == 0)
{
if (npc1VarAct >= 3)
{
npc1VarAct = 0;
npc1Act = 1;
}
}
else if (npc1Act == 1)
{
npc1Act = 0;
}
}
#endregion
#region npc 2
npc2CT++;
if (npc2CT >= 6)
{
npc2CT = 0;
npc2Frame++;
}
if (npc2Frame >= 16)
{
npc2Frame = 0;
npc2VarAct++;
if (npc2Act == 0)
{
if (npc2VarAct >= 4)
{
npc2VarAct = 0;
npc2Act = 1;
}
}
else if (npc2Act == 1)
{
npc2Act = 0;
}
}
#endregion
#region npc 3
npc3CT++;
if (npc3CT >= 6)
{
npc3CT = 0;
npc3Frame++;
}
if (npc3Frame >= 16)
{
npc3Frame = 0;
npc3VarAct++;
if (npc3Act == 0)
{
if (npc3VarAct >= 6)
{
npc3VarAct = 0;
npc3Act = 1;
}
}
else if (npc3Act == 1)
{
npc3Act = 0;
}
}
#endregion
}
#endregion
#region 2-1
if (stage2e1 == true)
{
#region npc 1
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
if (npc1Act == 2)
{
npc1Act = 3;
}
}
if (npc1Act < 2)
{
if (drgnX >= 3820)
{
npc1Facing = 4;
}
else
{
npc1Facing = 0;
}
if (drgnX >= 3400 && drgnX <= 4200)
{
npc1Act = 1;
}
}
#endregion
#region npc 2
npc2CT++;
if (npc2CT >= 6)
{
npc2CT = 0;
npc2Frame++;
}
if (npc2Frame >= 16)
{
npc2Frame = 0;
}
if (drgnX >= 10300 && drgnX <= 10839 && drgnY < 2030)
{
if (drgnX > 10600)
{
npc2Act = 2;
}
else
{
npc2Act = 1;
}
}
else
{
npc2Act = 0;
}
#endregion
#region npc 3
if (niaOn == true)
{
npc3CT++;
if (npc3CT >= 6)
{
npc3CT = 0;
npc3Frame++;
}
if (npc3Frame >= 16)
{
npc3Frame = 0;
}
if (squireOn == false)
{
if (npc3Act != 1)
{
npc3Act = 1;
}
}
else
{
if (npc3Act != 0)
{
npc3Act = 0;
}
}
}
#endregion
#region npc 4
if (squireOn == true)
{
npc4Act = 1;
npc4CT++;
if (npc4CT >= 3)
{
npc4CT = 0;
npc4Frame++;
}
if (npc4Frame >= 16)
{
npc4Frame = 0;
}
}
#endregion
}
#endregion
#region 2-2
if (stage2e2 == true)
{
#region npc 1
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
}
if (attackedFish == true)
{
if (npc1Act != 1)
{
npc1Act = 1;
}
if (npc1FaceR == true)
{
if (e18X < 7000)
{
e18X += 6;
}
}
else if (npc1FaceR == false)
{
if (e18X > -200)
{
e18X -= 6;
}
}
}
else
{
if (npc1Act != 0)
{
npc1Act = 0;
}
if (npc1FaceR == false)
{
e18X--;
if (e18X <= 2180)
{
npc1FaceR = true;
}
}
else if (npc1FaceR == true)
{
e18X++;
if (e18X >= 3531)
{
npc1FaceR = false;
}
}
}
#endregion
#region npc 2
npc2CT++;
if (npc2CT >= 6)
{
npc2CT = 0;
npc2Frame++;
}
if (npc2Frame >= 16)
{
npc2Frame = 0;
}
if (attackedFish == true)
{
if (npc2Act != 1)
{
npc2Act = 1;
}
if (npc2FaceR == true)
{
if (e19X < 7000)
{
e19X += 6;
}
}
else if (npc2FaceR == false)
{
if (e19X > -200)
{
e19X -= 6;
}
}
}
else if (attackedFish == false)
{
if (npc2Act != 0)
{
npc2Act = 0;
}
if (npc2FaceR == false)
{
e19X--;
if (e19X <= 651)
{
npc2FaceR = true;
}
}
else if (npc2FaceR == true)
{
e19X++;
if (e19X >= 1118)
{
npc2FaceR = false;
}
}
}
#endregion
#region npc 3
npc3CT++;
if (npc3CT >= 6)
{
npc3CT = 0;
npc3Frame++;
}
if (npc3Frame >= 16)
{
npc3Frame = 0;
}
if (attackedFish == true)
{
if (npc3FaceR == true)
{
if (e20X < 7000)
{
e20X += 6;
}
}
if (npc3FaceR == false)
{
if (e20X > -200)
{
e20X -= 6;
}
}
}
else if (attackedFish == false)
{
if (npc3FaceR == false)
{
e20X--;
if (e20X <= 1412)
{
npc3FaceR = true;
}
}
if (npc3FaceR == true)
{
e20X++;
if (e20X >= 2033)
{
npc3FaceR = false;
}
}
}
#endregion
#region npc 4
npc4CT++;
if (npc4CT >= 12)
{
npc4CT = 0;
npc4Frame++;
}
if (npc4Frame >= 4)
{
npc4Frame = 0;
}
#endregion
#region light
#region light1
if (light1On == false)
{
light1Wait++;
if (light1Wait >= 300)
{
light1Wait = 0;
light1CT = 0;
light1Frame = 0;
light1X = generateRandom.Next(-32, 1312) + drgnCamX;
light1Act = generateRandom.Next(0, 2);
light1On = true;
}
}
if (light1On == true)
{
light1CT++;
if (light1CT >= 24)
{
light1CT = 0;
light1Frame++;
}
if (light1Frame >= 4)
{
light1Frame = 0;
light1On = false;
}
}
#endregion
#region light2
if (light2On == false)
{
light2Wait++;
if (light2Wait >= 300)
{
light2Wait = 0;
light2CT = 0;
light2Frame = 0;
light2X = generateRandom.Next(-32, 1312) + drgnCamX;
light2Act = generateRandom.Next(0, 2);
light2On = true;
}
}
if (light2On == true)
{
light2CT++;
if (light2CT >= 24)
{
light2CT = 0;
light2Frame++;
}
if (light2Frame >= 4)
{
light1Frame = 0;
light2On = false;
}
}
#endregion
#region light3
if (light3On == false)
{
light3Wait++;
if (light3Wait >= 300)
{
light3Wait = 0;
light3CT = 0;
light3Frame = 0;
light3X = generateRandom.Next(-32, 1312) + drgnCamX;
light3Act = generateRandom.Next(0, 2);
light3On = true;
}
}
if (light3On == true)
{
light3CT++;
if (light3CT >= 24)
{
light3CT = 0;
light3Frame++;
}
if (light3Frame >= 4)
{
light3Frame = 0;
light3On = false;
}
}
#endregion
#region light4
if (light4On == false)
{
light4Wait++;
if (light4Wait >= 300)
{
light4Wait = 0;
light4CT = 0;
light4Frame = 0;
light4X = generateRandom.Next(-35, 1312) + drgnCamX;
light4Act = generateRandom.Next(0, 2);
light4On = true;
}
}
if (light4On == true)
{
light4CT++;
if (light4CT >= 24)
{
light4CT = 0;
light4Frame++;
}
if (light4Frame >= 4)
{
light4Frame = 0;
light4On = false;
}
}
#endregion
#endregion
}
#endregion
#region 2-3
if (stage2e3 == true)
{
if (niaOn == true)
{
#region npc 1
if (niaOn == true)
{
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
}
if (bowOn == false)
{
if (npc1Act != 1)
{
npc1Act = 1;
}
}
else
{
if (npc1Act != 0)
{
npc1Act = 0;
}
}
}
#endregion
}
if (bowOn == true)
{
#region npc 2
npc2CT++;
if (npc2CT >= 6)
{
npc2CT = 0;
npc2Frame++;
}
if (npc2Frame >= 16)
{
npc2Frame = 0;
npc2VarAct++;
if (npc2Act == 0)
{
if (npc2VarAct >= 3)
{
npc2VarAct = 0;
npc2Act = 1;
}
}
else if (npc2Act == 1)
{
npc2Act = 0;
}
}
#endregion
}
}
#endregion
#region 2-4
if (stage2e4 == true)
{
#region npc 1
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
npc1VarAct++;
if (npc1Act == 0)
{
if (npc1VarAct >= 5)
{
npc1VarAct = 0;
npc1Act = 1;
}
}
else if (npc1Act == 1)
{
npc1Act = 0;
}
}
#endregion
#region npc 2
npc2CT++;
if (npc2CT >= 6)
{
npc2CT = 0;
npc2Frame++;
}
if (npc2Frame >= 16)
{
npc2Frame = 0;
npc2VarAct++;
if (npc2Act == 0)
{
if (npc2VarAct >= 3)
{
npc2VarAct = 0;
npc2Act = 1;
}
}
else if (npc2Act == 1)
{
npc2Act = 0;
}
}
#endregion
#region npc 3
npc3CT++;
if (npc3CT >= 6)
{
npc3CT = 0;
npc3Frame++;
}
if (npc3Frame >= 16)
{
npc3Frame = 0;
if (npc3Act == 0)
{
npc3Act = 1;
}
else if (npc3Act == 1)
{
npc3Act = 2;
}
else if (npc3Act == 2)
{
npc3Act = 3;
}
else if (npc3Act == 3)
{
npc3Act = 0;
}
}
#endregion
#region npc 4
npc4CT++;
if (npc4CT >= 6)
{
npc4CT = 0;
npc4Frame++;
}
if (npc4Frame >= 16)
{
npc4Frame = 0;
if (npc4Act == 2)
{
if (drgnX <= 800)
{
npc4Act = 1;
}
else
{
npc4Act = 0;
}
}
}
if (drgnX <= 800 && drgnY <= 1403)
{
if (npc4Act < 2)
{
npc4Act = 1;
}
}
else
{
if (npc4Act < 2)
{
npc4Act = 0;
}
}
if (npc4Act < 2)
{
npc4VarAct = 0;
}
if (npc4Act == 2)
{
npc4VarAct = 1;
}
#endregion
#region npc5
npc5CT++;
if (npc5CT >= 6)
{
npc5CT = 0;
npc5Frame++;
}
if (npc5Frame >= 4)
{
npc5Frame = 0;
}
#endregion
#region npc 6
npc6CT++;
if (npc6CT >= 6)
{
npc6CT = 0;
npc6Frame++;
}
if (npc6Frame >= 16)
{
npc6Frame = 0;
if (npc6Act != 1 && stage2e4Right == false && drgnY <=
1367)
{
npc6VarAct++;
}
if (npc6Act == 0)
{
if (npc6VarAct >= 2)
{
npc6VarAct = 0;
npc6Act = 1;
}
}
}
if (npc6Act == 1)
{
if (e20X > -200)
{
e20X--;
}
}
#endregion
}
#endregion
#region 3-1
if (stage3e1 == true)
{
#region npc1
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
npc1VarAct++;
if (npc1Act == 0)
{
if (npc1VarAct >= 3)
{
npc1VarAct = 0;
npc1Act = 1;
}
}
else if (npc1Act != 0)
{
npc1Act = 0;
}
}
#endregion
}
#endregion
#region 3-B
if (stage3eB == true)
{
if (baldwinY <= -41)
{
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 4)
{
npc1Frame = 0;
if (npc1Act == 0)
{
npc1Act = 1;
}
else if (npc1Act == 1)
{
npc1Act = 2;
}
else if (npc1Act == 2)
{
npc1Act = 3;
}
else if (npc1Act == 3)
{
npc1Act = 4;
}
else if (npc1Act == 4)
{
npc1Act = 1;
}
}
}
else
{
if (npc1VarAct != 0)
{
npc1VarAct = 0;
}
if (npc1Act != 0)
{
npc1Act = 0;
}
}
if (alexY <= -41)
{
npc2CT++;
if (npc2CT >= 6)
{
npc2CT = 0;
npc2Frame++;
}
if (npc2Frame >= 4)
{
npc2Frame = 0;
if (npc2Act == 0)
{
npc2Act = 1;
}
else if (npc2Act == 1)
{
npc2Act = 2;
}
else if (npc2Act == 2)
{
npc2Act = 3;
}
else if (npc2Act == 3)
{
npc2Act = 4;
}
else if (npc2Act == 4)
{
npc2Act = 1;
}
}
}
else
{
if (npc2VarAct != 0)
{
npc2VarAct = 0;
}
if (npc2Act != 0)
{
npc2Act = 0;
}
}
}
#endregion
#region 4-1
if (stage4e1 == true)
{
#region npc1
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
npc1VarAct++;
if (npc1Act == 0)
{
if (npc1VarAct >= 4)
{
npc1VarAct = 0;
npc1Act = generateRandom.Next(1, 2);
}
}
else if (npc1Act != 0)
{
npc1Act = 0;
}
}
#endregion
}
#endregion
#region 4-2
if (stage4e2 == true)
{
#region npc1
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
npc1VarAct++;
if (npc1Act == 0)
{
if (npc1VarAct >= 4)
{
npc1VarAct = 0;
npc1Act = 1;
}
}
else if (npc1Act == 1)
{
npc1Act = 0;
}
}
#endregion
#region npc2
npc2CT++;
if (npc2CT >= 6)
{
npc2CT = 0;
npc2Frame++;
}
if (npc2Frame >= 16)
{
npc2Frame = 0;
npc2VarAct++;
if (npc2Act == 0)
{
if (npc2VarAct >= 3)
{
npc2VarAct = 0;
npc2Act = 1;
}
}
else if (npc2Act == 1)
{
npc2Act = 0;
}
}
#endregion
}
#endregion
#region 4-3
if (stage4e3 == true)
{
#region npc1
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
}
if (heavyOn == false)
{
if (npc1Act != 1)
{
npc1Act = 1;
}
}
else
{
if (npc1Act != 0)
{
npc1Act = 0;
}
}
#endregion
#region npc2
npc2CT++;
if (npc2CT >= 6)
{
npc2CT = 0;
npc2Frame++;
}
if (npc2Frame >= 16)
{
npc2Frame = 0;
npc2VarAct++;
if (npc2Act == 0)
{
if (npc2VarAct >= 3)
{
npc2VarAct = 0;
npc2Act = 1;
}
}
else if (npc2Act == 1)
{
npc2Act = 0;
}
}
#endregion
#region npc3
npc3CT++;
if (npc3CT >= 6)
{
npc3CT = 0;
npc3Frame++;
}
if (npc3Frame >= 16)
{
npc3Frame = 0;
if (npc3Act == 1)
{
npc3Act = 0;
}
}
#endregion
}
#endregion
#region 4-4
if (stage4e4 == true)
{
#region npc1
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
if (npc1Act == 1)
{
npc1Act = 2;
}
}
if (drgnX >= 1800 && drgnY >= 14230)
{
if (npc1Act == 0)
{
npc1CT = 0;
npc1Frame = 0;
npc1Act = 1;
}
}
#endregion
#region npc2
npc2CT++;
if (npc2CT >= 6)
{
npc2CT = 0;
npc2Frame++;
}
if (npc2Frame >= 16)
{
npc2Frame = 0;
npc2VarAct++;
if (npc2Act == 0)
{
if (npc2VarAct >= 4)
{
npc2Act = 1;
npc2VarAct = 0;
}
}
else if (npc2Act == 1)
{
if (npc2VarAct >= 4)
{
npc2Act = 0;
npc2VarAct = 0;
}
}
}
#endregion
#region npc3
npc3CT++;
if (npc3CT >= 6)
{
npc3CT = 0;
npc3Frame++;
}
if (npc3Frame >= 16)
{
npc3Frame = 0;
if (npc3Act == 1)
{
npc3Act = 0;
}
}
#endregion
#region npc4
npc4CT++;
if (npc4CT >= 6)
{
npc4CT = 0;
npc4Frame++;
}
if (npc4Frame >= 16)
{
npc4Frame = 0;
}
if (drgnY <= 9978 && drgnY >= 9698)
{
if (drgnX >= 1832)
{
if (drgnX >= 2104)
{
if (npc4Act != 1)
{
npc4Act = 1;
}
}
else
{
if (npc4Act != 2)
{
npc4Act = 2;
}
}
}
else
{
if (npc4Act != 0)
{
npc4Act = 0;
}
}
}
#endregion
#region npc5
npc5CT++;
if (npc5CT >= 6)
{
npc5CT = 0;
npc5Frame++;
}
if (npc5Frame >= 16)
{
npc5Frame = 0;
if (npc5Act == 0)
{
npc5VarAct++;
}
if (npc5Act == 0)
{
if (npc5VarAct >= 4)
{
npc5VarAct = 0;
npc5Act = 1;
}
}
else if (npc5Act == 1)
{
npc5Act = 0;
}
}
if (drgnX >= 800 && drgnX <= 1241 && drgnY >= 7562)
{
if (npc5Act != 2)
{
npc5CT = 0;
npc5Frame = 0;
npc5Act = 2;
}
}
else
{
if (npc5Act == 2)
{
npc5CT = 0;
npc5Frame = 0;
npc5Act = 1;
npc5VarAct = 0;
}
}
#endregion
#region npc6
npc6CT++;
if (npc6CT >= 6)
{
npc6CT = 0;
npc6Frame++;
}
if (npc6Frame >= 16)
{
npc6Frame = 0;
if (npc6Act == 0)
{
npc6VarAct++;
}
if (npc6Act == 0)
{
if (npc6VarAct >= 4)
{
npc6VarAct = 0;
npc6Act = 1;
}
}
else if (npc6Act != 0)
{
npc6Act = 0;
}
}
#endregion
}
#endregion
#region 5-1
if (stage5e1 == true)
{
#region npc1
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
if (npc1Act == 0)
{
npc1Act = 1;
}
else if (npc1Act == 1)
{
npc1Act = 2;
}
}
#endregion
}
#endregion
#region 5-2
if (stage5e2 == true)
{
#region npc1
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
}
if (npc1Frame >= 16)
{
npc1Frame = 0;
if (npc1Act == 0)
{
npc1VarAct++;
if (npc1VarAct >= 5)
{
npc1VarAct = 0;
npc1Act = 1;
}
}
else if (npc1Act != 0)
{
npc1Act = 0;
}
}
#endregion
#region npc2
npc2CT++;
if (npc2CT >= 6)
{
npc2CT = 0;
npc2Frame++;
}
if (npc2Frame >= 16)
{
npc2Frame = 0;
if (npc2Act == 0)
{
npc2VarAct++;
if (npc2VarAct >= 4)
{
npc2VarAct = 0;
npc2Act = 1;
}
}
else if (npc2Act != 0)
{
npc2Act = 0;
npc2VarAct = 0;
}
}
if (npc2Act > 1)
{
if (drgnX >= 6895)
{
if (npc2Act != 2)
{
npc2Act = 2;
}
}
else
{
if (npc2Act != 3)
{
npc2Act = 3;
}
}
}
#endregion
#region npc3
npc3CT++;
if (npc3CT >= 6)
{
npc3CT = 0;
npc3Frame++;
}
if (npc3Frame >= 16)
{
npc3Frame = 0;
if (npc3Act == 0)
{
npc3VarAct++;
if (npc3VarAct >= 2)
{
npc3VarAct = 0;
npc3Act = 1;
}
}
else if (npc3Act == 1)
{
npc3VarAct++;
if (npc3VarAct >= 2)
{
npc3VarAct = 0;
npc3Act = 2;
}
}
else if (npc3Act == 2)
{
npc3VarAct++;
if (npc3VarAct >= 4)
{
npc3VarAct = 0;
npc3Act = 0;
}
}
else if (npc3Act == 3)
{
npc3VarAct = 0;
npc3Act = 0;
}
}
if (npc3Act == 3 && npc3Frame == 7 && npc3CT == 0)
{
if (exp1On == false)
{
exp1X = drgnX;
exp1Y = drgnY;
exp1On = true;
damageCheck = 1;
drgnHit = true;
}
}
#endregion
#region npc4
npc4CT++;
if (npc4CT >= 6)
{
npc4CT = 0;
npc4Frame++;
}
if (npc4Frame >= 16)
{
npc4Frame = 0;
if (npc4Act == 0)
{
npc4VarAct++;
if (npc4VarAct >= 3)
{
npc4VarAct = 0;
npc4Act = 1;
}
}
else if (npc4Act == 1)
{
npc4VarAct++;
if (npc4VarAct >= 1)
{
npc4VarAct = 0;
npc4Act = 2;
}
}
else if (npc4Act == 2)
{
npc4VarAct++;
if (npc4VarAct >= 2)
{
npc4VarAct = 0;
npc4Act = 3;
}
}
else if (npc4Act == 3)
{
npc4VarAct++;
if (npc4VarAct >= 2)
{
npc4VarAct = 0;
npc4Act = 0;
}
}
else if (npc4Act == 4)
{
npc4VarAct = 0;
npc4Act = 0;
}
}
#endregion
}
#endregion
#endregion
#region help
if (helpOpacity > 0)
{
if (helpCT > 0)
{
helpCT--;
}
else
{
helpOpacity -= 5;
}
}
if (helpOpacity < 0)
{
helpOpacity = 0;
}
#endregion
#endregion
#region floor
#region home
if (stageHome == true)
{
#region Floor
if (drgnYvel >= 0 && drgnFlight == false)
{
if ((drgnpipDL.Intersects(floor1) ||
drgnpipDC.Intersects(floor1) || drgnpipDR.Intersects(floor1)) && home1F == true)
{
if (drgnY != 525)
{
drgnY = 525;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if ((drgnpipDL.Intersects(floor3) ||
drgnpipDC.Intersects(floor3) || drgnpipDR.Intersects(floor3)) && home1F == true)
{
if (drgnY != 430)
{
drgnY = 430;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if ((drgnpipDL.Intersects(floor2) ||
drgnpipDC.Intersects(floor2) || drgnpipDR.Intersects(floor2)) && home2F == true)
{
if (drgnY != 560)
{
drgnY = 560;
}
drgnYvel = 0;
drgnOnGround = true;
}
else
{
drgnOnGround = false;
}
}
#endregion
#region Wall Hitboxes
if (home1F == true)
{
if (drgnpipDL.Intersects(wall1) || drgnpipCL.Intersects
(wall1) || drgnpipUL.Intersects(wall1) || drgnpipDL.Intersects(wall2) ||
drgnpipCL.Intersects(wall2) || drgnpipUL.Intersects(wall2))
{
touchWallL = true;
}
else
{
touchWallL = false;
}
if (drgnpipDR.Intersects(wall2) || drgnpipCR.Intersects
(wall2) || drgnpipUR.Intersects(wall2))
{
touchWallR = true;
}
else
{
touchWallR = false;
}
}
if (home2F == true)
{
if (drgnpipDL.Intersects(wall4) || drgnpipCL.Intersects
(wall4) || drgnpipUL.Intersects(wall4))
{
touchWallL = true;
}
else
{
touchWallL = false;
}
if (drgnpipDR.Intersects(wall3) || drgnpipCR.Intersects
(wall3) || drgnpipUR.Intersects(wall3))
{
touchWallR = true;
}
else
{
touchWallR = false;
}
}
#endregion
#region Roof Hitboxes
if (drgnpipUL.Intersects(roof1) || drgnpipUC.Intersects
(roof1) || drgnpipUR.Intersects(roof1))
{
if (drgnYvel < 0)
{
drgnYvel = 1;
}
}
#endregion
}
#endregion
#region 1e1
if (stage1e1 == true)
{
#region floor
if (drgnYvel >= 0 && drgnFlight == false)
{
if (drgnpipDL.Intersects(floor1) ||
drgnpipDC.Intersects(floor1) || drgnpipDR.Intersects(floor1))
{
if (drgnY != 774)
{
drgnY = 774;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor2) ||
drgnpipDC.Intersects(floor2) || drgnpipDR.Intersects(floor2))
{
drgnOnGround = true;
if (drgnY != 968)
{
drgnY = 968;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor3) ||
drgnpipDC.Intersects(floor3) || drgnpipDR.Intersects(floor3))
{
if (drgnY != 1098)
{
drgnY = 1098;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor4) ||
drgnpipDC.Intersects(floor4) || drgnpipDR.Intersects(floor4))
{
if (drgnY != 966)
{
drgnY = 966;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor5) ||
drgnpipDC.Intersects(floor5) || drgnpipDR.Intersects(floor5))
{
if (drgnY != 1096)
{
drgnY = 1096;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor6) ||
drgnpipDC.Intersects(floor6) || drgnpipDR.Intersects(floor6))
{
if (drgnY != 1634)
{
drgnY = 1634;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor7) ||
drgnpipDC.Intersects(floor7) || drgnpipDR.Intersects(floor7))
{
if (drgnY != 1195)
{
drgnY = 1195;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (e1stand == true || e2stand == true || e3stand
== true || e4stand == true || e5stand == true || e6stand == true || e7stand == true
|| e8stand == true || e9stand == true || e10stand == true || e11stand == true ||
e12stand == true || e13stand == true || e14stand == true || e15stand == true ||
e16stand == true || e17stand == true || e18stand == true || e19stand == true ||
e20stand == true)
{
drgnOnGround = true;
}
else
{
drgnOnGround = false;
}
}
#endregion
#region Wall Hitboxes
if (drgnpipDL.Intersects(wall1) || drgnpipCL.Intersects
(wall1) || drgnpipUL.Intersects(wall1) || drgnpipDL.Intersects(wall2) ||
drgnpipCL.Intersects(wall2) || drgnpipUL.Intersects(wall2) || drgnpipDL.Intersects
(wall4) || drgnpipCL.Intersects(wall4) || drgnpipUL.Intersects(wall4) ||
drgnpipDL.Intersects(wall5) || drgnpipCL.Intersects(wall5) || drgnpipUL.Intersects
(wall5) || drgnpipDL.Intersects(wall6) || drgnpipCL.Intersects(wall6) ||
drgnpipUL.Intersects(wall6) || drgnpipDL.Intersects(wall7) || drgnpipCL.Intersects
(wall7) || drgnpipUL.Intersects(wall7) || drgnhitboxHead.Intersects(wall9))
{
touchWallL = true;
}
else
{
touchWallL = false;
}
if (drgnpipDR.Intersects(wall3) || drgnpipCR.Intersects
(wall3) || drgnpipUR.Intersects(wall3) || drgnpipDR.Intersects(wall8) ||
drgnpipCR.Intersects(wall8) || drgnpipUR.Intersects(wall8) ||
drgnhitboxHead.Intersects(wall10))
{
touchWallR = true;
}
else
{
touchWallR = false;
}
#endregion
#region Roof Hitboxes
if ((drgnpipUL.Intersects(roof1) || drgnpipUC.Intersects
(roof1) || drgnpipUR.Intersects(roof1)) && drgnYvel < 0)
{
drgnYvel = 1;
}
#endregion
}
#endregion
#region 1e2
if (stage1e2 == true)
{
#region Floor Hitboxes
if (drgnYvel >= 0 && drgnFlight == false)
{
if (drgnpipDL.Intersects(floor1) ||
drgnpipDC.Intersects(floor1) || drgnpipDR.Intersects(floor1))
{
if (drgnY != 1644)
{
drgnY = 1644;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor2) ||
drgnpipDC.Intersects(floor2) || drgnpipDR.Intersects(floor2))
{
if (drgnY != 1539)
{
drgnY = 1539;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor3) ||
drgnpipDC.Intersects(floor3) || drgnpipDR.Intersects(floor3))
{
if (drgnY != 1444)
{
drgnY = 1444;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor4) ||
drgnpipDC.Intersects(floor4) || drgnpipDR.Intersects(floor4))
{
if (drgnY != 1483)
{
drgnY = 1483;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor5) ||
drgnpipDC.Intersects(floor5) || drgnpipDR.Intersects(floor5))
{
if (drgnY != 1626)
{
drgnY = 1626;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor6) ||
drgnpipDC.Intersects(floor6) || drgnpipDR.Intersects(floor6))
{
if (drgnY != 1474)
{
drgnY = 1474;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor7) ||
drgnpipDC.Intersects(floor7) || drgnpipDR.Intersects(floor7))
{
if (drgnY != 1303)
{
drgnY = 1303;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor8) ||
drgnpipDC.Intersects(floor8) || drgnpipDR.Intersects(floor8))
{
if (drgnY != 1144)
{
drgnY = 1144;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor9) ||
drgnpipDC.Intersects(floor9) || drgnpipDR.Intersects(floor9))
{
if (drgnY != 1049)
{
drgnY = 1049;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor10) ||
drgnpipDC.Intersects(floor10) || drgnpipDR.Intersects(floor10))
{
if (drgnY != 959)
{
drgnY = 959;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor11) ||
drgnpipDC.Intersects(floor11) || drgnpipDR.Intersects(floor11))
{
if (drgnY != 979)
{
drgnY = 979;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor12) ||
drgnpipDC.Intersects(floor12) || drgnpipDR.Intersects(floor12))
{
if (drgnY != 1122)
{
drgnY = 1122;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor13) ||
drgnpipDC.Intersects(floor13) || drgnpipDR.Intersects(floor13))
{
if (drgnY != 1030)
{
drgnY = 1030;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor14) ||
drgnpipDC.Intersects(floor14) || drgnpipDR.Intersects(floor14))
{
if (drgnY != 984)
{
drgnY = 984;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor15) ||
drgnpipDC.Intersects(floor15) || drgnpipDR.Intersects(floor15))
{
if (drgnY != 1126)
{
drgnY = 1126;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor16) ||
drgnpipDC.Intersects(floor16) || drgnpipDR.Intersects(floor16))
{
if (drgnY != 1234)
{
drgnY = 1234;
}
drgnYvel = 0;
drgnOnGround = true;
if (e6Y <= 990 && dragonDash == true)
{
dragonDash = false;
}
}
else if (drgnpipDL.Intersects(floor17) ||
drgnpipDC.Intersects(floor17) || drgnpipDR.Intersects(floor17))
{
if (drgnY != 1388)
{
drgnY = 1388;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor18) ||
drgnpipDC.Intersects(floor18) || drgnpipDR.Intersects(floor18))
{
if (drgnY != 1529)
{
drgnY = 1529;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor19) ||
drgnpipDC.Intersects(floor19) || drgnpipDR.Intersects(floor19))
{
if (drgnY != 1492)
{
drgnY = 1492;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor20) ||
drgnpipDC.Intersects(floor20) || drgnpipDR.Intersects(floor20))
{
if (drgnY != 1420)
{
drgnY = 1420;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor21) ||
drgnpipDC.Intersects(floor21) || drgnpipDR.Intersects(floor21))
{
if (drgnY != 1345)
{
drgnY = 1345;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor22) ||
drgnpipDC.Intersects(floor22) || drgnpipDR.Intersects(floor22))
{
if (drgnY != 1231)
{
drgnY = 1231;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (e1stand == true || e2stand == true || e3stand
== true || e4stand == true || e5stand == true || e6stand == true || e7stand == true
|| e8stand == true || e9stand == true || e10stand == true || e11stand == true ||
e12stand == true || e13stand == true || e14stand == true || e15stand == true ||
e16stand == true || e17stand == true || e18stand == true || e19stand == true ||
e20stand == true)
{
drgnOnGround = true;
}
else
{
drgnOnGround = false;
}
}
#endregion
#region Wall Hitboxes
if (drgnpipDL.Intersects(wall3) || drgnpipCL.Intersects
(wall3) || drgnpipUL.Intersects(wall3) || drgnpipDL.Intersects(wall4) ||
drgnpipCL.Intersects(wall4) || drgnpipUL.Intersects(wall4) || drgnpipDL.Intersects
(wall10) || drgnpipCL.Intersects(wall10) || drgnpipUL.Intersects(wall10) ||
drgnpipDL.Intersects(wall11) || drgnpipCL.Intersects(wall11) ||
drgnpipUL.Intersects(wall11) || drgnpipDL.Intersects(wall14) ||
drgnpipCL.Intersects(wall14) || drgnpipUL.Intersects(wall14) ||
drgnpipDL.Intersects(wall15) || drgnpipCL.Intersects(wall15) ||
drgnpipUL.Intersects(wall15) || drgnpipDL.Intersects(wall17) ||
drgnpipCL.Intersects(wall17) || drgnpipUL.Intersects(wall17) ||
drgnpipDL.Intersects(wall18) || drgnpipCL.Intersects(wall18) ||
drgnpipUL.Intersects(wall18) || drgnpipDL.Intersects(wall19) ||
drgnpipCL.Intersects(wall19) || drgnpipUL.Intersects(wall19) ||
drgnhitboxHead.Intersects(wall21))
{
touchWallL = true;
}
else
{
touchWallL = false;
}
if (drgnpipDR.Intersects(wall1) || drgnpipCR.Intersects
(wall1) || drgnpipUR.Intersects(wall1) || drgnpipDR.Intersects(wall2) ||
drgnpipCR.Intersects(wall2) || drgnpipUR.Intersects(wall2) || drgnpipDR.Intersects
(wall5) || drgnpipCR.Intersects(wall5) || drgnpipUR.Intersects(wall5) ||
drgnpipDR.Intersects(wall6) || drgnpipCR.Intersects(wall6) || drgnpipUR.Intersects
(wall6) || drgnpipDR.Intersects(wall7) || drgnpipCR.Intersects(wall7) ||
drgnpipUR.Intersects(wall7) || drgnpipDR.Intersects(wall8) || drgnpipCR.Intersects
(wall8) || drgnpipUR.Intersects(wall8) || drgnpipDR.Intersects(wall9) ||
drgnpipCR.Intersects(wall9) || drgnpipUR.Intersects(wall9) || drgnpipDR.Intersects
(wall12) || drgnpipCR.Intersects(wall12) || drgnpipUR.Intersects(wall12) ||
drgnpipDR.Intersects(wall13) || drgnpipCR.Intersects(wall13) ||
drgnpipUR.Intersects(wall13) || drgnpipDR.Intersects(wall16) ||
drgnpipCR.Intersects(wall16) || drgnpipUR.Intersects(wall16) ||
drgnpipDR.Intersects(wall20) || drgnpipCR.Intersects(wall20) ||
drgnpipUR.Intersects(wall20))
{
touchWallR = true;
}
else
{
touchWallR = false;
}
#endregion
}
#endregion
#region 1e3
if (stage1e3 == true)
{
#region floor
#region Floor Hitboxes
if (drgnYvel >= 0 && drgnFlight == false)
{
if (drgnpipDL.Intersects(floor1) ||
drgnpipDC.Intersects(floor1) || drgnpipDR.Intersects(floor1))
{
if (drgnY != 1098)
{
drgnY = 1098;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor2) ||
drgnpipDC.Intersects(floor2) || drgnpipDR.Intersects(floor2))
{
if (drgnY != 1553)
{
drgnY = 1553;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor3) ||
drgnpipDC.Intersects(floor3) || drgnpipDR.Intersects(floor3))
{
if (drgnY != 1997)
{
drgnY = 1997;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor4) ||
drgnpipDC.Intersects(floor4) || drgnpipDR.Intersects(floor4))
{
if (drgnY != 1870)
{
drgnY = 1870;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor5) ||
drgnpipDC.Intersects(floor5) || drgnpipDR.Intersects(floor5))
{
if (drgnY != 1024)
{
drgnY = 1024;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor6) ||
drgnpipDC.Intersects(floor6) || drgnpipDR.Intersects(floor6))
{
if (drgnY != 899)
{
drgnY = 899;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor7) ||
drgnpipDC.Intersects(floor7) || drgnpipDR.Intersects(floor7))
{
if (drgnY != 2068)
{
drgnY = 2068;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor8) ||
drgnpipDC.Intersects(floor8) || drgnpipDR.Intersects(floor8))
{
if (drgnY != 2100)
{
drgnY = 2100;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor9) ||
drgnpipDC.Intersects(floor9) || drgnpipDR.Intersects(floor9))
{
if (drgnY != 2907)
{
drgnY = 2907;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor10) ||
drgnpipDC.Intersects(floor10) || drgnpipDR.Intersects(floor10))
{
if (drgnY != 2016)
{
drgnY = 2016;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor11) ||
drgnpipDC.Intersects(floor11) || drgnpipDR.Intersects(floor11))
{
if (drgnY != 2149)
{
drgnY = 2149;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor12) ||
drgnpipDC.Intersects(floor12) || drgnpipDR.Intersects(floor12))
{
if (drgnY != 2018)
{
drgnY = 2018;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor13) ||
drgnpipDC.Intersects(floor13) || drgnpipDR.Intersects(floor13))
{
if (drgnY != 2635)
{
drgnY = 2635;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor14) ||
drgnpipDC.Intersects(floor14) || drgnpipDR.Intersects(floor14))
{
if (drgnY != 3282)
{
drgnY = 3282;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor15) ||
drgnpipDC.Intersects(floor15) || drgnpipDR.Intersects(floor15))
{
if (drgnY != 3938)
{
drgnY = 3938;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor16) ||
drgnpipDC.Intersects(floor16) || drgnpipDR.Intersects(floor16))
{
if (drgnY != 4523)
{
drgnY = 4523;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor17) ||
drgnpipDC.Intersects(floor17) || drgnpipDR.Intersects(floor17))
{
if (drgnY != 1693)
{
drgnY = 1693;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor18) ||
drgnpipDC.Intersects(floor18) || drgnpipDR.Intersects(floor18))
{
if (drgnY != 1511)
{
drgnY = 1511;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor19) ||
drgnpipDC.Intersects(floor19) || drgnpipDR.Intersects(floor19))
{
if (drgnY != 1347)
{
drgnY = 1347;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor20) ||
drgnpipDC.Intersects(floor20) || drgnpipDR.Intersects(floor20))
{
if (drgnY != 1331)
{
drgnY = 1331;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor21) ||
drgnpipDC.Intersects(floor21) || drgnpipDR.Intersects(floor21))
{
if (drgnY != 1226)
{
drgnY = 1226;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor22) ||
drgnpipDC.Intersects(floor22) || drgnpipDR.Intersects(floor22))
{
if (drgnY != 1095)
{
drgnY = 1095;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor23) ||
drgnpipDC.Intersects(floor23) || drgnpipDR.Intersects(floor23))
{
if (drgnY != 985)
{
drgnY = 985;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor24) ||
drgnpipDC.Intersects(floor24) || drgnpipDR.Intersects(floor24))
{
if (drgnY != 866)
{
drgnY = 866;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor25) ||
drgnpipDC.Intersects(floor25) || drgnpipDR.Intersects(floor25))
{
if (drgnY != 743)
{
drgnY = 743;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor26) ||
drgnpipDC.Intersects(floor26) || drgnpipDR.Intersects(floor26))
{
if (drgnY != 1091)
{
drgnY = 1091;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor27) ||
drgnpipDC.Intersects(floor27) || drgnpipDR.Intersects(floor27))
{
if (drgnY != 969)
{
drgnY = 969;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor28) ||
drgnpipDC.Intersects(floor28) || drgnpipDR.Intersects(floor28))
{
if (drgnY != 852)
{
drgnY = 852;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor29) ||
drgnpipDC.Intersects(floor29) || drgnpipDR.Intersects(floor29))
{
if (drgnY != 588)
{
drgnY = 588;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor30) ||
drgnpipDC.Intersects(floor30) || drgnpipDR.Intersects(floor30))
{
if (drgnY != 465)
{
drgnY = 465;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor31) ||
drgnpipDC.Intersects(floor31) || drgnpipDR.Intersects(floor31))
{
if (drgnY != 419)
{
drgnY = 419;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (drgnpipDL.Intersects(floor32) ||
drgnpipDC.Intersects(floor32) || drgnpipDR.Intersects(floor32))
{
if (drgnY != 381)
{
drgnY = 381;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if ((drgnpipDL.Intersects(floor33) ||
drgnpipDC.Intersects(floor33) || drgnpipDR.Intersects(floor33)) && truckSpawn ==
true)
{
if (drgnY != 2773)
{
drgnY = 2773;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if ((drgnpipDL.Intersects(floor34) ||
drgnpipDC.Intersects(floor34) || drgnpipDR.Intersects(floor34)) && truckSpawn ==
true)
{
if (drgnY != 2693)
{
drgnY = 2693;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if (e1stand == true || e2stand == true || e3stand
== true || e4stand == true || e5stand == true || e6stand == true || e7stand == true
|| e8stand == true || e9stand == true || e10stand == true || e11stand == true ||
e12stand == true || e13stand == true || e14stand == true || e15stand == true ||
e16stand == true || e17stand == true || e18stand == true || e19stand == true ||
e20stand == true)
{
drgnOnGround = true;
}
else
{
drgnOnGround = false;
}
}
#endregion
#endregion
#region Wall Hitboxes
if (drgnpipDL.Intersects(wall1) || drgnpipCL.Intersects
(wall1) || drgnpipUL.Intersects(wall1) || drgnpipDL.Intersects(wall3) ||
drgnpipCL.Intersects(wall3) || drgnpipUL.Intersects(wall3) || drgnpipDL.Intersects
(wall6) || drgnpipCL.Intersects(wall6) || drgnpipUL.Intersects(wall6) ||
drgnpipDL.Intersects(wall10) || drgnpipCL.Intersects(wall10) ||
drgnpipUL.Intersects(wall10) || drgnpipDL.Intersects(wall11) ||
drgnpipCL.Intersects(wall11) || drgnpipUL.Intersects(wall11) ||
drgnpipDL.Intersects(wall12) || drgnpipCL.Intersects(wall12) ||
drgnpipUL.Intersects(wall12) || drgnpipDL.Intersects(wall13) ||
drgnpipCL.Intersects(wall13) || drgnpipUL.Intersects(wall13) ||
drgnpipDL.Intersects(wall14) || drgnpipCL.Intersects(wall14) ||
drgnpipUL.Intersects(wall14) || drgnpipDL.Intersects(wall15) ||
drgnpipCL.Intersects(wall15) || drgnpipUL.Intersects(wall15) ||
drgnhitboxHead.Intersects(wall18) || ((drgnpipDL.Intersects(wall22) ||
drgnpipCL.Intersects(wall22) || drgnpipUL.Intersects(wall22)) && truckSpawn ==
true))
{
touchWallL = true;
}
else
{
touchWallL = false;
}
if (drgnpipDR.Intersects(wall2) || drgnpipCR.Intersects
(wall2) || drgnpipUR.Intersects(wall2) || drgnpipDR.Intersects(wall4) ||
drgnpipCR.Intersects(wall4) || drgnpipUR.Intersects(wall4) || drgnpipDR.Intersects
(wall5) || drgnpipCR.Intersects(wall5) || drgnpipUR.Intersects(wall5) ||
drgnpipDR.Intersects(wall7) || drgnpipCR.Intersects(wall7) || drgnpipUR.Intersects
(wall7) || drgnpipDR.Intersects(wall8) || drgnpipCR.Intersects(wall8) ||
drgnpipUR.Intersects(wall8) || drgnpipDR.Intersects(wall9) || drgnpipCR.Intersects
(wall9) || drgnpipUR.Intersects(wall9) || drgnpipDR.Intersects(wall16) ||
drgnpipCR.Intersects(wall16) || drgnpipUR.Intersects(wall16) ||
drgnpipDR.Intersects(wall17) || drgnpipCR.Intersects(wall17) ||
drgnpipUR.Intersects(wall17) || drgnhitboxHead.Intersects(wall19) ||
((drgnpipDR.Intersects(wall20) || drgnpipCR.Intersects(wall20) ||
drgnpipUR.Intersects(wall20) || drgnpipDR.Intersects(wall21) ||
drgnpipCR.Intersects(wall21) || drgnpipUR.Intersects(wall21)) && truckSpawn ==
true))
{
touchWallR = true;
}
else
{
touchWallR = false;
}
#endregion
}
#endregion
#region 1eB
if (stage1eB == true)
{
#region Floor Hitboxes
if (drgnYvel >= 0 && drgnFlight == false)
{
if (drgnpipDL.Intersects(floor1) ||
drgnpipDC.Intersects(floor1) || drgnpipDR.Intersects(floor1))
{
if (drgnY != 560)
{
drgnY = 560;
}
drgnYvel = 0;
drgnOnGround = true;
}
else
{
drgnOnGround = false;
}
}
#endregion
#region Wall Hitboxes
if (drgnhitboxHead.Intersects(wall1))
{
touchWallL = true;
}
else
{
touchWallL = false;
}
if (drgnhitboxHead.Intersects(wall2))
{
touchWallR = true;
}
else
{
touchWallR = false;
}
#endregion
}
#endregion
#region 5e1
if (stage5e1 == true)
{
#region Floor Hitboxes
if (drgnYvel >= 0 && drgnFlight == false)
{
if (drgnpipDL.Intersects(floor1) ||
drgnpipDC.Intersects(floor1) || drgnpipDR.Intersects(floor1))
{
if (drgnY != 480)
{
drgnY = 480;
}
drgnYvel = 0;
drgnOnGround = true;
}
else
{
drgnOnGround = false;
}
}
#endregion
#region Wall Hitboxes
if ((drgnhitbox.Intersects(wall1) && boss4Clear == false) ||
(drgnhitbox.Intersects(wall2) && boss3Clear == false) || (drgnhitbox.Intersects
(wall3) && boss2Clear == false))
{
touchWallL = true;
}
else
{
touchWallL = false;
}
if (touchWallR == true)
{
touchWallR = false;
}
#endregion
}
#endregion
#region 7eB
if (stage7eB == true)
{
#region floor hitboxes
if (drgnYvel >= 0)
{
if (drgnpipDL.Intersects(floor1) ||
drgnpipDC.Intersects(floor1) || drgnpipDR.Intersects(floor1))
{
if (drgnY != 574)
{
drgnY = 574;
}
drgnYvel = 0;
drgnOnGround = true;
}
else if ((drgnpipDL.Intersects(floor2) ||
drgnpipDC.Intersects(floor2) || drgnpipDR.Intersects(floor2)) && boss7Phase2 ==
true)
{
if (drgnY != 460)
{
drgnY = 460;
}
drgnYvel = 0;
drgnOnGround = true;
}
else
{
drgnOnGround = false;
}
}
#endregion
#region Wall Hitboxes
if (drgnpipDL.Intersects(wall1) || (drgnpipDL.Intersects
(wall4) && boss7Phase2 == true))
{
touchWallL = true;
}
else
{
touchWallL = false;
}
if (drgnpipDR.Intersects(wall2) || (drgnpipDR.Intersects
(wall3) && boss7Phase1 == true) || (drgnpipDR.Intersects(wall5) && boss7Phase2 ==
true))
{
touchWallR = true;
}
else
{
touchWallR = false;
}
#endregion
}
#endregion
#endregion
if (opacity == 255 && endOfStage == false && treasurePickUp ==
false)
{
#region All Enemy CT Counter
//e1 CT
#region e1 CT
if (e1projectile == true)
{
e1projCT++;
if (e1projCT >= 6)
{
e1projA_frame++;
if (e1projA_frame >= 16)
{
e1projA_frame = 0;
}
e1projCT = 0;
}
}
if (e1plinkOn == true)
{
e1plinkCT++;
e1plinkCycle++;
if (e1plinkCT >= 6)
{
e1plinkCT = 0;
e1plinkFr++;
}
if (e1plinkCycle >= 60)
{
e1plinkOn = false;
e1plinkCycle = 0;
e1plinkFr = 0;
}
}
if (e1smoke == true)
{
if (e1smokeCT == 0 && e1smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e1smokeCT++;
if (e1smokeCT >= 6)
{
e1smokeCT = 0;
e1smokeFrame++;
if (e1smokeFrame >= 12)
{
e1smoke = false;
e1smokeCT = 0;
e1smokeFrame = 0;
}
}
}
if (e1knockback == true)
{
e1knockbackTimer++;
if (e1knockbackTimer >= 60)
{
e1knockback = false;
e1knockbackTimer = 0;
}
}
if (e1spawn == true && ((drgnX - e1X) >= -1280 && (e1X -
drgnX) >= -1408))
{
if (e1frozen == false)
{
e1CT++;
}
if (e1CT >= 6)
{
if (stage5eB == true)
{
if (e1frame > 5 && e1Escape == true && e1act ==
5)
{
e1EscapeFrame++;
if (e1EscapeFrame >= 8)
{
e1Escape = false;
e1spawn = false;
}
}
if (e1Dodge == true)
{
e1ScarecrowFrame++;
if (e1ScarecrowFrame >= 12)
{
e1ScarecrowFrame = 0;
e1Dodge = false;
}
}
}
e1frame++;
e1CT = 0;
if (e1invulnerable == true)
{
e1invTimer++;
if (e1invTimer >= 10)
{
e1invulnerable = false;
e1invTimer = 0;
}
if (stage2e4 == true)
{
if (e1act == 7)
{
e1invBlink = 255;
}
else
{
if (e1invTimer % 2 == 0)
{
e1invBlink = 0;
}
else
{
e1invBlink = 255;
}
}
}
else
{
if (e1invTimer % 2 == 0)
{
e1invBlink = 0;
}
else
{
e1invBlink = 255;
}
}
}
else
{
if (e1invBlink < 255)
{
e1invBlink = 255;
}
}
}
if (e1coins == true)
{
e1coinCT++;
if (e1coinCT >= 6)
{
e1coinFrame++;
e1coinCT = 0;
if (e1coinFrame >= 4)
{
e1coinFrame = 0;
}
}
}
if (e1coinTouch == true)
{
e1coins = false;
e1coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e1sparkleOn = true;
e1coinCT = 0;
e1coinFrame = 0;
goldNow = goldNow + e1coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e1sparkleOn == true)
{
e1sparkleCT++;
e1sparkleCycle++;
if (e1sparkleCT >= 3)
{
e1sparkleFr++;
e1sparkleCT = 0;
}
if (e1sparkleCycle >= 48)
{
e1sparkleOn = false;
e1sparkleCT = 0;
e1sparkleFr = 0;
e1sparkleCycle = 0;
}
}
if (e1HP <= 0 && e1coins == false && e1smoke == false &&
e1sparkleOn == false)
{
if (stage5eB == false)
{
e1spawn = false;
}
}
}
#endregion
//end e1 CT
//e2 CT
#region e2 CT
if (e2projectile == true)
{
e2projCT++;
if (e2projCT >= 6)
{
e2projA_frame++;
if (e2projA_frame >= 16)
{
e2projA_frame = 0;
}
e2projCT = 0;
}
}
if (e2plinkOn == true)
{
e2plinkCT++;
e2plinkCycle++;
if (e2plinkCT >= 6)
{
e2plinkCT = 0;
e2plinkFr++;
}
if (e2plinkCycle >= 60)
{
e2plinkOn = false;
e2plinkCycle = 0;
e2plinkFr = 0;
}
}
if (e2spawn == true)
{
if (e2knockback == true && ((drgnX - e2X) >= -1280 &&
(e2X - drgnX) >= -1408))
{
e2knockbackTimer++;
if (e2knockbackTimer >= 60)
{
e2knockback = false;
e2knockbackTimer = 0;
}
}
if (e2frozen == false)
{
e2CT++;
}
if (e2CT >= 6)
{
if (stage5eB == true)
{
if (e2frame > 5 && e2Escape == true && e2act ==
7)
{
e2EscapeFrame++;
if (e2EscapeFrame >= 8)
{
e2Escape = false;
e2spawn = false;
}
}
if (e2Dodge == true)
{
e2ScarecrowFrame++;
if (e2ScarecrowFrame >= 12)
{
e2ScarecrowFrame = 0;
e2Dodge = false;
}
}
}
e2frame++;
e2CT = 0;
if (e2invulnerable == true)
{
e2invTimer++;
if (e2invTimer >= 10)
{
e2invulnerable = false;
e2invTimer = 0;
}
if (e2invTimer % 2 == 0)
{
e2invBlink = 0;
}
else
{
e2invBlink = 255;
}
}
else
{
if (e2invBlink < 255)
{
e2invBlink = 255;
}
}
}
if (e2coins == true)
{
e2coinCT++;
if (e2coinCT >= 6)
{
e2coinFrame++;
e2coinCT = 0;
if (e2coinFrame >= 4)
{
e2coinFrame = 0;
}
}
}
if (e2coinTouch == true)
{
e2coins = false;
e2sparkleOn = true;
e2coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e2coinCT = 0;
e2coinFrame = 0;
goldNow = goldNow + e2coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e2smoke == true)
{
if (e2smokeCT == 0 && e2smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e2smokeCT++;
if (e2smokeCT >= 6)
{
e2smokeCT = 0;
e2smokeFrame++;
if (e2smokeFrame >= 12)
{
e2smoke = false;
e2smokeCT = 0;
e2smokeFrame = 0;
}
}
}
if (e2sparkleOn == true)
{
e2sparkleCT++;
e2sparkleCycle++;
if (e2sparkleCT >= 3)
{
e2sparkleFr++;
e2sparkleCT = 0;
}
if (e2sparkleCycle >= 48)
{
e2sparkleOn = false;
e2sparkleCT = 0;
e2sparkleFr = 0;
e2sparkleCycle = 0;
}
}
if (e2HP <= 0 && e2coins == false && e2smoke == false &&
e2sparkleOn == false)
{
if (stage5eB == false)
{
e2spawn = false;
}
}
}
#endregion
//end e2 CT
//e3 CT
#region e3 CT
if (e3projectile == true)
{
e3projCT++;
if (e3projCT >= 6)
{
e3projA_frame++;
if (e3projA_frame >= 16)
{
e3projA_frame = 0;
}
e3projCT = 0;
}
}
if (e3plinkOn == true)
{
e3plinkCT++;
e3plinkCycle++;
if (e3plinkCT >= 6)
{
e3plinkCT = 0;
e3plinkFr++;
}
if (e3plinkCycle >= 60)
{
e3plinkOn = false;
e3plinkCycle = 0;
e3plinkFr = 0;
}
}
if (e3smoke == true)
{
if (e3smokeCT == 0 && e3smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e3smokeCT++;
if (e3smokeCT >= 6)
{
e3smokeCT = 0;
e3smokeFrame++;
if (e3smokeFrame >= 12)
{
e3smoke = false;
e3smokeCT = 0;
e3smokeFrame = 0;
}
}
}
if (e3spawn == true && ((drgnX - e3X) >= -1280 && (e3X -
drgnX) >= -1408))
{
if (e3knockback == true)
{
e3knockbackTimer++;
if (e3knockbackTimer >= 60)
{
e3knockback = false;
e3knockbackTimer = 0;
}
}
if (e3frozen == false)
{
e3CT++;
}
if (e3CT >= 6)
{
if (stage5eB == true)
{
if (e3frame > 5 && e3Escape == true && e3act ==
5)
{
e3EscapeFrame++;
if (e3EscapeFrame >= 8)
{
e3Escape = false;
e3spawn = false;
}
}
if (e3Dodge == true)
{
e3ScarecrowFrame++;
if (e3ScarecrowFrame >= 12)
{
e3ScarecrowFrame = 0;
e3Dodge = false;
}
}
}
e3frame++;
e3CT = 0;
if (e3invulnerable == true)
{
e3invTimer++;
if (e3invTimer >= 10)
{
e3invulnerable = false;
e3invTimer = 0;
}
if (stage3e2 == true)
{
if (e3act == 7)
{
e3invBlink = 255;
}
else
{
if (e3invTimer % 2 == 0)
{
e3invBlink = 0;
}
else
{
e3invBlink = 255;
}
}
}
else
{
if (e3invTimer % 2 == 0)
{
e3invBlink = 0;
}
else
{
e3invBlink = 255;
}
}
}
else
{
if (e3invBlink < 255)
{
e3invBlink = 255;
}
}
}
if (e3coins == true)
{
e3coinCT++;
if (e3coinCT >= 6)
{
e3coinFrame++;
e3coinCT = 0;
if (e3coinFrame >= 4)
{
e3coinFrame = 0;
}
}
}
if (e3coinTouch == true)
{
e3coins = false;
e3sparkleOn = true;
e3coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e3coinCT = 0;
e3coinFrame = 0;
goldNow = goldNow + e3coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e3sparkleOn == true)
{
e3sparkleCT++;
e3sparkleCycle++;
if (e3sparkleCT >= 3)
{
e3sparkleFr++;
e3sparkleCT = 0;
}
if (e3sparkleCycle >= 48)
{
e3sparkleOn = false;
e3sparkleCT = 0;
e3sparkleFr = 0;
e3sparkleCycle = 0;
}
}
if (e3HP <= 0 && e3coins == false && e3smoke == false &&
e3sparkleOn == false)
{
if (stage5eB == false)
{
e3spawn = false;
}
}
}
#endregion
//end e3 CT
//e4 CT
#region e4 CT
if (e4projectile == true)
{
e4projCT++;
if (e4projCT >= 6)
{
e4projA_frame++;
if (e4projA_frame >= 16)
{
e4projA_frame = 0;
}
e4projCT = 0;
}
}
if (e4plinkOn == true)
{
e4plinkCT++;
e4plinkCycle++;
if (e4plinkCT >= 6)
{
e4plinkCT = 0;
e4plinkFr++;
}
if (e4plinkCycle >= 60)
{
e4plinkOn = false;
e4plinkCycle = 0;
e4plinkFr = 0;
}
}
if (e4spawn == true && ((drgnX - e4X) >= -1280 && (e4X -
drgnX) >= -1408))
{
if (e4knockback == true)
{
e4knockbackTimer++;
if (e4knockbackTimer >= 60)
{
e4knockback = false;
e4knockbackTimer = 0;
}
}
if (e4frozen == false)
{
e4CT++;
}
if (e4CT >= 6)
{
if (stage5eB == true)
{
if (e4frame > 5 && e4Escape == true && e4act ==
5)
{
e4EscapeFrame++;
if (e4EscapeFrame >= 6)
{
e4Escape = false;
e4spawn = false;
}
}
if (e4Dodge == true)
{
e4ScarecrowFrame++;
if (e4ScarecrowFrame >= 12)
{
e4ScarecrowFrame = 0;
e4Dodge = false;
}
}
}
e4frame++;
e4CT = 0;
if (e4invulnerable == true)
{
e4invTimer++;
if (e4invTimer >= 10)
{
e4invulnerable = false;
e4invTimer = 0;
}
if (e4invTimer % 2 == 0)
{
e4invBlink = 0;
}
else
{
e4invBlink = 255;
}
}
else
{
if (e4invBlink < 255)
{
e4invBlink = 255;
}
}
}
if (e4coins == true)
{
e4coinCT++;
if (e4coinCT >= 6)
{
e4coinFrame++;
e4coinCT = 0;
if (e4coinFrame >= 4)
{
e4coinFrame = 0;
}
}
}
if (e4coinTouch == true)
{
e4coins = false;
e4sparkleOn = true;
e4coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e4coinCT = 0;
e4coinFrame = 0;
goldNow = goldNow + e4coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e4smoke == true)
{
if (e4smokeCT == 0 && e4smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e4smokeCT++;
if (e4smokeCT >= 6)
{
e4smokeCT = 0;
e4smokeFrame++;
if (e4smokeFrame >= 12)
{
e4smoke = false;
e4smokeCT = 0;
e4smokeFrame = 0;
}
}
}
if (e4sparkleOn == true)
{
e4sparkleCT++;
e4sparkleCycle++;
if (e4sparkleCT >= 3)
{
e4sparkleFr++;
e4sparkleCT = 0;
}
if (e4sparkleCycle >= 48)
{
e4sparkleOn = false;
e4sparkleCT = 0;
e4sparkleFr = 0;
e4sparkleCycle = 0;
}
}
if (e4HP <= 0 && e4coins == false && e4smoke == false &&
e4sparkleOn == false)
{
if (stage5eB == false)
{
e4spawn = false;
}
}
}
#endregion
//end e4 CT
//e5 CT
#region e5 CT
if (e5projectile == true)
{
e5projCT++;
if (e5projCT >= 6)
{
e5projA_frame++;
if (e5projA_frame >= 16)
{
e5projA_frame = 0;
}
e5projCT = 0;
}
}
if (e5plinkOn == true)
{
e5plinkCT++;
e5plinkCycle++;
if (e5plinkCT >= 6)
{
e5plinkCT = 0;
e5plinkFr++;
}
if (e5plinkCycle >= 60)
{
e5plinkOn = false;
e5plinkCycle = 0;
e5plinkFr = 0;
}
}
if (e5spawn == true && ((drgnX - e5X) >= -1280 && (e5X -
drgnX) >= -1408))
{
if (e5knockback == true)
{
e5knockbackTimer++;
if (e5knockbackTimer >= 60)
{
e5knockback = false;
e5knockbackTimer = 0;
}
}
if (e5frozen == false)
{
e5CT++;
}
if (e5CT >= 6)
{
e5frame++;
e5CT = 0;
if (e5invulnerable == true)
{
e5invTimer++;
if (e5invTimer >= 10)
{
e5invulnerable = false;
e5invTimer = 0;
}
if (e5invTimer % 2 == 0)
{
e5invBlink = 0;
}
else
{
e5invBlink = 255;
}
}
else
{
if (e5invBlink < 255)
{
e5invBlink = 255;
}
}
}
if (e5coins == true)
{
e5coinCT++;
if (e5coinCT >= 6)
{
e5coinFrame++;
e5coinCT = 0;
if (e5coinFrame >= 4)
{
e5coinFrame = 0;
}
}
}
if (e5coinTouch == true)
{
e5coins = false;
e5sparkleOn = true;
e5coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e5coinCT = 0;
e5coinFrame = 0;
goldNow = goldNow + e5coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e5smoke == true)
{
if (e5smokeCT == 0 && e5smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e5smokeCT++;
if (e5smokeCT >= 6)
{
e5smokeCT = 0;
e5smokeFrame++;
if (e5smokeFrame >= 12)
{
e5smoke = false;
e5smokeCT = 0;
e5smokeFrame = 0;
}
}
}
if (e5sparkleOn == true)
{
e5sparkleCT++;
e5sparkleCycle++;
if (e5sparkleCT >= 3)
{
e5sparkleFr++;
e5sparkleCT = 0;
}
if (e5sparkleCycle >= 48)
{
e5sparkleOn = false;
e5sparkleCT = 0;
e5sparkleFr = 0;
e5sparkleCycle = 0;
}
}
if (e5HP <= 0 && e5coins == false && e5smoke == false &&
e5sparkleOn == false)
{
e5spawn = false;
}
}
#endregion
//end e5 CT
//e6 CT
#region e6 CT
if (e6projectile == true)
{
e6projCT++;
if (e6projCT >= 6)
{
e6projA_frame++;
if (e6projA_frame >= 16)
{
e6projA_frame = 0;
}
e6projCT = 0;
}
}
if (e6plinkOn == true)
{
e6plinkCT++;
e6plinkCycle++;
if (e6plinkCT >= 6)
{
e6plinkFr++;
e6plinkCT = 0;
}
if (e6plinkCycle >= 60)
{
e6plinkOn = false;
e6plinkCycle = 0;
e6plinkFr = 0;
}
}
if (e6spawn == true && ((drgnX - e6X) >= -1280 && (e6X -
drgnX) >= -1408))
{
if (e6knockback == true)
{
e6knockbackTimer++;
if (e6knockbackTimer >= 60)
{
e6knockback = false;
e6knockbackTimer = 0;
}
}
if (e6frozen == false)
{
e6CT++;
}
if (e6CT >= 6)
{
e6frame++;
e6CT = 0;
if (e6invulnerable == true)
{
e6invTimer++;
if (e6invTimer >= 10)
{
e6invulnerable = false;
e6invTimer = 0;
}
if (e6invTimer % 2 == 0)
{
e6invBlink = 0;
}
else
{
e6invBlink = 255;
}
}
else
{
if (e6invBlink < 255)
{
e6invBlink = 255;
}
}
}
if (e6coins == true)
{
e6coinCT++;
if (e6coinCT >= 6)
{
e6coinFrame++;
e6coinCT = 0;
if (e6coinFrame >= 4)
{
e6coinFrame = 0;
}
}
}
if (e6coinTouch == true)
{
e6coins = false;
e6sparkleOn = true;
e6coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e6coinCT = 0;
e6coinFrame = 0;
goldNow = goldNow + e6coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e6smoke == true)
{
if (e6smokeCT == 0 && e6smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e6smokeCT++;
if (e6smokeCT >= 6)
{
e6smokeCT = 0;
e6smokeFrame++;
if (e6smokeFrame >= 12)
{
e6smoke = false;
e6smokeCT = 0;
e6smokeFrame = 0;
}
}
}
if (e6sparkleOn == true)
{
e6sparkleCT++;
e6sparkleCycle++;
if (e6sparkleCT >= 3)
{
e6sparkleFr++;
e6sparkleCT = 0;
}
if (e6sparkleCycle >= 48)
{
e6sparkleOn = false;
e6sparkleCT = 0;
e6sparkleFr = 0;
e6sparkleCycle = 0;
}
}
if (e6HP <= 0 && e6coins == false && e6smoke == false &&
e6sparkleOn == false)
{
e6spawn = false;
}
}
#endregion
//end e6 CT
//e7 CT
#region e7 CT
if (e7projectile == true)
{
e7projCT++;
if (e7projCT >= 6)
{
e7projA_frame++;
if (e7projA_frame >= 16)
{
e7projA_frame = 0;
}
e7projCT = 0;
}
}
if (e7plinkOn == true)
{
e7plinkCT++;
e7plinkCycle++;
if (e7plinkCT >= 6)
{
e7plinkCT = 0;
e7plinkFr++;
}
if (e7plinkCycle >= 60)
{
e7plinkOn = false;
e7plinkCycle = 0;
e7plinkFr = 0;
}
}
if (stage4e3 == false)
{
if (e7spawn == true && ((drgnX - e7X) >= -1280 && (e7X -
drgnX) >= -1408))
{
if (e7knockback == true)
{
e7knockbackTimer++;
if (e7knockbackTimer >= 60)
{
e7knockback = false;
e7knockbackTimer = 0;
}
}
if (e7frozen == false)
{
e7CT++;
}
if (e7CT >= 6)
{
e7frame++;
e7CT = 0;
if (e7invulnerable == true)
{
e7invTimer++;
if (e7invTimer >= 10)
{
e7invulnerable = false;
e7invTimer = 0;
}
if (e7invTimer % 2 == 0)
{
e7invBlink = 0;
}
else
{
e7invBlink = 255;
}
}
else
{
if (e7invBlink < 255)
{
e7invBlink = 255;
}
}
}
if (e7coins == true)
{
e7coinCT++;
if (e7coinCT >= 6)
{
e7coinFrame++;
e7coinCT = 0;
if (e7coinFrame >= 4)
{
e7coinFrame = 0;
}
}
}
if (e7coinTouch == true)
{
e7coins = false;
e7sparkleOn = true;
e7coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e7coinCT = 0;
e7coinFrame = 0;
goldNow = goldNow + e7coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e7smoke == true)
{
if (e7smokeCT == 0 && e7smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e7smokeCT++;
if (e7smokeCT >= 6)
{
e7smokeCT = 0;
e7smokeFrame++;
if (e7smokeFrame >= 12)
{
e7smoke = false;
e7smokeCT = 0;
e7smokeFrame = 0;
}
}
}
if (e7sparkleOn == true)
{
e7sparkleCT++;
e7sparkleCycle++;
if (e7sparkleCT >= 3)
{
e7sparkleFr++;
e7sparkleCT = 0;
}
if (e7sparkleCycle >= 48)
{
e7sparkleOn = false;
e7sparkleCT = 0;
e7sparkleFr = 0;
e7sparkleCycle = 0;
}
}
if (e7HP <= 0 && e7coins == false && e7smoke ==
false && e7sparkleOn == false)
{
e7spawn = false;
}
}
}
if (stage4e3 == true)
{
if (from4e1 == true)
{
if (e7spawn == true)
{
if (e7knockback == true)
{
e7knockbackTimer++;
if (e7knockbackTimer >= 60)
{
e7knockback = false;
e7knockbackTimer = 0;
}
}
e7CT++;
if (e7CT >= 6)
{
e7frame++;
e7CT = 0;
if (e7invulnerable == true)
{
e7invTimer++;
if (e7invTimer >= 10)
{
e7invulnerable = false;
e7invTimer = 0;
}
if (e7invTimer % 2 == 0)
{
e7invBlink = 0;
}
else
{
e7invBlink = 255;
}
}
else
{
if (e7invBlink < 255)
{
e7invBlink = 255;
}
}
}
if (e7coins == true)
{
e7coinCT++;
if (e7coinCT >= 6)
{
e7coinFrame++;
e7coinCT = 0;
if (e7coinFrame >= 4)
{
e7coinFrame = 0;
}
}
}
if (e7coinTouch == true)
{
e7coins = false;
e7sparkleOn = true;
e7coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e7coinCT = 0;
e7coinFrame = 0;
goldNow = goldNow + e7coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e7smoke == true)
{
if (e7smokeCT == 0 && e7smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e7smokeCT++;
if (e7smokeCT >= 6)
{
e7smokeCT = 0;
e7smokeFrame++;
if (e7smokeFrame >= 12)
{
e7smoke = false;
e7smokeCT = 0;
e7smokeFrame = 0;
}
}
}
if (e7sparkleOn == true)
{
e7sparkleCT++;
e7sparkleCycle++;
if (e7sparkleCT >= 3)
{
e7sparkleFr++;
e7sparkleCT = 0;
}
if (e7sparkleCycle >= 48)
{
e7sparkleOn = false;
e7sparkleCT = 0;
e7sparkleFr = 0;
e7sparkleCycle = 0;
}
}
if (e7HP <= 0 && e7coins == false && e7smoke ==
false && e7sparkleOn == false)
{
e7spawn = false;
}
}
}
if (from4e2 == true)
{
if (e7spawn == true && ((drgnX - e7X) >= -1280 &&
(e7X - drgnX) >= -1408))
{
if (e7knockback == true)
{
e7knockbackTimer++;
if (e7knockbackTimer >= 60)
{
e7knockback = false;
e7knockbackTimer = 0;
}
}
e7CT++;
if (e7CT >= 6)
{
e7frame++;
e7CT = 0;
if (e7invulnerable == true)
{
e7invTimer++;
if (e7invTimer >= 10)
{
e7invulnerable = false;
e7invTimer = 0;
}
if (e7invTimer % 2 == 0)
{
e7invBlink = 0;
}
else
{
e7invBlink = 255;
}
}
else
{
if (e7invBlink < 255)
{
e7invBlink = 255;
}
}
}
if (e7coins == true)
{
e7coinCT++;
if (e7coinCT >= 6)
{
e7coinFrame++;
e7coinCT = 0;
if (e7coinFrame >= 4)
{
e7coinFrame = 0;
}
}
}
if (e7coinTouch == true)
{
e7coins = false;
e7sparkleOn = true;
e7coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e7coinCT = 0;
e7coinFrame = 0;
goldNow = goldNow + e7coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e7smoke == true)
{
if (e7smokeCT == 0 && e7smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e7smokeCT++;
if (e7smokeCT >= 6)
{
e7smokeCT = 0;
e7smokeFrame++;
if (e7smokeFrame >= 12)
{
e7smoke = false;
e7smokeCT = 0;
e7smokeFrame = 0;
}
}
}
if (e7sparkleOn == true)
{
e7sparkleCT++;
e7sparkleCycle++;
if (e7sparkleCT >= 3)
{
e7sparkleFr++;
e7sparkleCT = 0;
}
if (e7sparkleCycle >= 48)
{
e7sparkleOn = false;
e7sparkleCT = 0;
e7sparkleFr = 0;
e7sparkleCycle = 0;
}
}
if (e7HP <= 0 && e7coins == false && e7smoke ==
false && e7sparkleOn == false)
{
e7spawn = false;
}
}
}
}
#endregion
//end e7 CT
//e8 CT
#region e8 CT
if (e8projectile == true)
{
e8projCT++;
if (e8projCT >= 6)
{
e8projA_frame++;
if (e8projA_frame >= 16)
{
e8projA_frame = 0;
}
e8projCT = 0;
}
}
if (stage4e3 == false)
{
if (e8spawn == true && ((drgnX - e8X) >= -1280 && (e8X -
drgnX) >= -1408))
{
if (e8knockback == true)
{
e8knockbackTimer++;
if (e8knockbackTimer >= 60)
{
e8knockback = false;
e8knockbackTimer = 0;
}
}
if (e8frozen == false)
{
e8CT++;
}
if (e8CT >= 6)
{
e8frame++;
e8CT = 0;
if (e8invulnerable == true)
{
e8invTimer++;
if (e8invTimer >= 10)
{
e8invulnerable = false;
e8invTimer = 0;
}
if (e8invTimer % 2 == 0)
{
e8invBlink = 0;
}
else
{
e8invBlink = 255;
}
}
else
{
if (e8invBlink < 255)
{
e8invBlink = 255;
}
}
}
if (e8coins == true)
{
e8coinCT++;
if (e8coinCT >= 6)
{
e8coinFrame++;
e8coinCT = 0;
if (e8coinFrame >= 4)
{
e8coinFrame = 0;
}
}
}
if (e8coinTouch == true)
{
e8coins = false;
e8sparkleOn = true;
e8coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e8coinCT = 0;
e8coinFrame = 0;
goldNow = goldNow + e8coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e8smoke == true)
{
if (e8smokeCT == 0 && e8smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e8smokeCT++;
if (e8smokeCT >= 6)
{
e8smokeCT = 0;
e8smokeFrame++;
if (e8smokeFrame >= 12)
{
e8smoke = false;
e8smokeCT = 0;
e8smokeFrame = 0;
}
}
}
if (e8sparkleOn == true)
{
e8sparkleCT++;
e8sparkleCycle++;
if (e8sparkleCT >= 3)
{
e8sparkleFr++;
e8sparkleCT = 0;
}
if (e8sparkleCycle >= 48)
{
e8sparkleOn = false;
e8sparkleCT = 0;
e8sparkleFr = 0;
e8sparkleCycle = 0;
}
}
if (e8plinkOn == true)
{
e8plinkCT++;
e8plinkCycle++;
if (e8plinkCT >= 6)
{
e8plinkCT = 0;
e8plinkFr++;
}
if (e8plinkCycle >= 60)
{
e8plinkOn = false;
e8plinkCycle = 0;
e8plinkFr = 0;
}
}
if (e8HP <= 0 && e8coins == false && e8smoke ==
false && e8sparkleOn == false)
{
e8spawn = false;
}
}
}
if (stage4e3 == true)
{
if (from4e1 == true)
{
if (e8spawn == true)
{
if (e8knockback == true)
{
e8knockbackTimer++;
if (e8knockbackTimer >= 60)
{
e8knockback = false;
e8knockbackTimer = 0;
}
}
e8CT++;
if (e8CT >= 6)
{
e8frame++;
e8CT = 0;
if (e8invulnerable == true)
{
e8invTimer++;
if (e8invTimer >= 10)
{
e8invulnerable = false;
e8invTimer = 0;
}
if (e8invTimer % 2 == 0)
{
e8invBlink = 0;
}
else
{
e8invBlink = 255;
}
}
else
{
if (e8invBlink < 255)
{
e8invBlink = 255;
}
}
}
if (e8coins == true)
{
e8coinCT++;
if (e8coinCT >= 6)
{
e8coinFrame++;
e8coinCT = 0;
if (e8coinFrame >= 4)
{
e8coinFrame = 0;
}
}
}
if (e8coinTouch == true)
{
e8coins = false;
e8sparkleOn = true;
e8coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e8coinCT = 0;
e8coinFrame = 0;
goldNow = goldNow + e8coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e8smoke == true)
{
if (e8smokeCT == 0 && e8smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e8smokeCT++;
if (e8smokeCT >= 6)
{
e8smokeCT = 0;
e8smokeFrame++;
if (e8smokeFrame >= 12)
{
e8smoke = false;
e8smokeCT = 0;
e8smokeFrame = 0;
}
}
}
if (e8sparkleOn == true)
{
e8sparkleCT++;
e8sparkleCycle++;
if (e8sparkleCT >= 3)
{
e8sparkleFr++;
e8sparkleCT = 0;
}
if (e8sparkleCycle >= 48)
{
e8sparkleOn = false;
e8sparkleCT = 0;
e8sparkleFr = 0;
e8sparkleCycle = 0;
}
}
if (e8plinkOn == true)
{
e8plinkCT++;
e8plinkCycle++;
if (e8plinkCT >= 6)
{
e8plinkCT = 0;
e8plinkFr++;
}
if (e8plinkCycle >= 60)
{
e8plinkOn = false;
e8plinkCycle = 0;
e8plinkFr = 0;
}
}
if (e8HP <= 0 && e8coins == false && e8smoke ==
false && e8sparkleOn == false)
{
e8spawn = false;
}
}
}
if (from4e2 == true)
{
if (e8spawn == true && ((drgnX - e8X) >= -1280 &&
(e8X - drgnX) >= -1408))
{
if (e8knockback == true)
{
e8knockbackTimer++;
if (e8knockbackTimer >= 60)
{
e8knockback = false;
e8knockbackTimer = 0;
}
}
e8CT++;
if (e8CT >= 6)
{
e8frame++;
e8CT = 0;
if (e8invulnerable == true)
{
e8invTimer++;
if (e8invTimer >= 10)
{
e8invulnerable = false;
e8invTimer = 0;
}
if (e8invTimer % 2 == 0)
{
e8invBlink = 0;
}
else
{
e8invBlink = 255;
}
}
else
{
if (e8invBlink < 255)
{
e8invBlink = 255;
}
}
}
if (e8coins == true)
{
e8coinCT++;
if (e8coinCT >= 6)
{
e8coinFrame++;
e8coinCT = 0;
if (e8coinFrame >= 4)
{
e8coinFrame = 0;
}
}
}
if (e8coinTouch == true)
{
e8coins = false;
e8sparkleOn = true;
e8coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e8coinCT = 0;
e8coinFrame = 0;
goldNow = goldNow + e8coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e8smoke == true)
{
if (e8smokeCT == 0 && e8smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e8smokeCT++;
if (e8smokeCT >= 6)
{
e8smokeCT = 0;
e8smokeFrame++;
if (e8smokeFrame >= 12)
{
e8smoke = false;
e8smokeCT = 0;
e8smokeFrame = 0;
}
}
}
if (e8sparkleOn == true)
{
e8sparkleCT++;
e8sparkleCycle++;
if (e8sparkleCT >= 3)
{
e8sparkleFr++;
e8sparkleCT = 0;
}
if (e8sparkleCycle >= 48)
{
e8sparkleOn = false;
e8sparkleCT = 0;
e8sparkleFr = 0;
e8sparkleCycle = 0;
}
}
if (e8plinkOn == true)
{
e8plinkCT++;
e8plinkCycle++;
if (e8plinkCT >= 6)
{
e8plinkCT = 0;
e8plinkFr++;
}
if (e8plinkCycle >= 60)
{
e8plinkOn = false;
e8plinkCycle = 0;
e8plinkFr = 0;
}
}
if (e8HP <= 0 && e8coins == false && e8smoke ==
false && e8sparkleOn == false)
{
e8spawn = false;
}
}
}
}
#endregion
//end e8 CT
//e9 CT
#region e9 CT
if (e9projectile == true)
{
e9projCT++;
if (e9projCT >= 6)
{
e9projA_frame++;
if (e9projA_frame >= 16)
{
e9projA_frame = 0;
}
e9projCT = 0;
}
}
if (stage4e3 == false)
{
if (e9spawn == true && ((drgnX - e9X) >= -1280 && (e9X -
drgnX) >= -1408))
{
if (e9knockback == true)
{
e9knockbackTimer++;
if (e9knockbackTimer >= 60)
{
e9knockback = false;
e9knockbackTimer = 0;
}
}
if (e9frozen == false)
{
e9CT++;
}
if (e9CT >= 6)
{
e9frame++;
e9CT = 0;
if (e9invulnerable == true)
{
e9invTimer++;
if (e9invTimer >= 10)
{
e9invulnerable = false;
e9invTimer = 0;
}
if (e9invTimer % 2 == 0)
{
e9invBlink = 0;
}
else
{
e9invBlink = 255;
}
}
else
{
if (e9invBlink < 255)
{
e9invBlink = 255;
}
}
}
if (e9coins == true)
{
e9coinCT++;
if (e9coinCT >= 6)
{
e9coinFrame++;
e9coinCT = 0;
if (e9coinFrame >= 4)
{
e9coinFrame = 0;
}
}
}
if (e9coinTouch == true)
{
e9coins = false;
e9sparkleOn = true;
e9coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e9coinCT = 0;
e9coinFrame = 0;
goldNow = goldNow + e9coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e9smoke == true)
{
if (e9smokeCT == 0 && e9smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e9smokeCT++;
if (e9smokeCT >= 6)
{
e9smokeCT = 0;
e9smokeFrame++;
if (e9smokeFrame >= 12)
{
e9smoke = false;
e9smokeCT = 0;
e9smokeFrame = 0;
}
}
}
if (e9sparkleOn == true)
{
e9sparkleCT++;
e9sparkleCycle++;
if (e9sparkleCT >= 3)
{
e9sparkleFr++;
e9sparkleCT = 0;
}
if (e9sparkleCycle >= 48)
{
e9sparkleOn = false;
e9sparkleCT = 0;
e9sparkleFr = 0;
e9sparkleCycle = 0;
}
}
if (e9plinkOn == true)
{
e9plinkCT++;
e9plinkCycle++;
if (e9plinkCT >= 6)
{
e9plinkCT = 0;
e9plinkFr++;
}
if (e9plinkCycle >= 60)
{
e9plinkOn = false;
e9plinkCycle = 0;
e9plinkFr = 0;
}
}
if (e9HP <= 0 && e9coins == false && e9smoke ==
false && e9sparkleOn == false)
{
e9spawn = false;
}
}
}
if (stage4e3 == true)
{
if (from4e1 == true)
{
if (e9spawn == true)
{
if (e9knockback == true)
{
e9knockbackTimer++;
if (e9knockbackTimer >= 60)
{
e9knockback = false;
e9knockbackTimer = 0;
}
}
e9CT++;
if (e9CT >= 6)
{
e9frame++;
e9CT = 0;
if (e9invulnerable == true)
{
e9invTimer++;
if (e9invTimer >= 10)
{
e9invulnerable = false;
e9invTimer = 0;
}
if (e9invTimer % 2 == 0)
{
e9invBlink = 0;
}
else
{
e9invBlink = 255;
}
}
else
{
if (e9invBlink < 255)
{
e9invBlink = 255;
}
}
}
if (e9coins == true)
{
e9coinCT++;
if (e9coinCT >= 6)
{
e9coinFrame++;
e9coinCT = 0;
if (e9coinFrame >= 4)
{
e9coinFrame = 0;
}
}
}
if (e9coinTouch == true)
{
e9coins = false;
e9sparkleOn = true;
e9coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e9coinCT = 0;
e9coinFrame = 0;
goldNow = goldNow + e9coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e9smoke == true)
{
if (e9smokeCT == 0 && e9smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e9smokeCT++;
if (e9smokeCT >= 6)
{
e9smokeCT = 0;
e9smokeFrame++;
if (e9smokeFrame >= 12)
{
e9smoke = false;
e9smokeCT = 0;
e9smokeFrame = 0;
}
}
}
if (e9sparkleOn == true)
{
e9sparkleCT++;
e9sparkleCycle++;
if (e9sparkleCT >= 3)
{
e9sparkleFr++;
e9sparkleCT = 0;
}
if (e9sparkleCycle >= 48)
{
e9sparkleOn = false;
e9sparkleCT = 0;
e9sparkleFr = 0;
e9sparkleCycle = 0;
}
}
if (e9plinkOn == true)
{
e9plinkCT++;
e9plinkCycle++;
if (e9plinkCT >= 6)
{
e9plinkCT = 0;
e9plinkFr++;
}
if (e9plinkCycle >= 60)
{
e9plinkOn = false;
e9plinkCycle = 0;
e9plinkFr = 0;
}
}
if (e9HP <= 0 && e9coins == false && e9smoke ==
false && e9sparkleOn == false)
{
e9spawn = false;
}
}
}
if (from4e2 == true)
{
if (e9spawn == true && ((drgnX - e9X) >= -1280 &&
(e9X - drgnX) >= -1408))
{
if (e9knockback == true)
{
e9knockbackTimer++;
if (e9knockbackTimer >= 60)
{
e9knockback = false;
e9knockbackTimer = 0;
}
}
e9CT++;
if (e9CT >= 6)
{
e9frame++;
e9CT = 0;
if (e9invulnerable == true)
{
e9invTimer++;
if (e9invTimer >= 10)
{
e9invulnerable = false;
e9invTimer = 0;
}
if (e9invTimer % 2 == 0)
{
e9invBlink = 0;
}
else
{
e9invBlink = 255;
}
}
else
{
if (e9invBlink < 255)
{
e9invBlink = 255;
}
}
}
if (e9coins == true)
{
e9coinCT++;
if (e9coinCT >= 6)
{
e9coinFrame++;
e9coinCT = 0;
if (e9coinFrame >= 4)
{
e9coinFrame = 0;
}
}
}
if (e9coinTouch == true)
{
e9coins = false;
e9sparkleOn = true;
e9coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e9coinCT = 0;
e9coinFrame = 0;
goldNow = goldNow + e9coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e9smoke == true)
{
if (e9smokeCT == 0 && e9smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e9smokeCT++;
if (e9smokeCT >= 6)
{
e9smokeCT = 0;
e9smokeFrame++;
if (e9smokeFrame >= 12)
{
e9smoke = false;
e9smokeCT = 0;
e9smokeFrame = 0;
}
}
}
if (e9sparkleOn == true)
{
e9sparkleCT++;
e9sparkleCycle++;
if (e9sparkleCT >= 3)
{
e9sparkleFr++;
e9sparkleCT = 0;
}
if (e9sparkleCycle >= 48)
{
e9sparkleOn = false;
e9sparkleCT = 0;
e9sparkleFr = 0;
e9sparkleCycle = 0;
}
}
if (e9plinkOn == true)
{
e9plinkCT++;
e9plinkCycle++;
if (e9plinkCT >= 6)
{
e9plinkCT = 0;
e9plinkFr++;
}
if (e9plinkCycle >= 60)
{
e9plinkOn = false;
e9plinkCycle = 0;
e9plinkFr = 0;
}
}
if (e9HP <= 0 && e9coins == false && e9smoke ==
false && e9sparkleOn == false)
{
e9spawn = false;
}
}
}
}
#endregion
//end e9 CT
//e10 CT
#region e10 CT
if (e10projectile == true)
{
e10projCT++;
if (e10projCT >= 6)
{
e10projA_frame++;
if (e10projA_frame >= 16)
{
e10projA_frame = 0;
}
e10projCT = 0;
}
}
if (e10spawn == true && ((drgnX - e10X) >= -1280 && (e10X -
drgnX) >= -1408))
{
if (e10knockback == true)
{
e10knockbackTimer++;
if (e10knockbackTimer >= 60)
{
e10knockback = false;
e10knockbackTimer = 0;
}
}
if (e10frozen == false)
{
e10CT++;
}
if (e10CT >= 6)
{
e10frame++;
e10CT = 0;
if (e10invulnerable == true)
{
e10invTimer++;
if (e10invTimer >= 10)
{
e10invulnerable = false;
e10invTimer = 0;
}
if (e10invTimer % 2 == 0)
{
e10invBlink = 0;
}
else
{
e10invBlink = 255;
}
}
else
{
if (e10invBlink < 255)
{
e10invBlink = 255;
}
}
}
if (e10coins == true)
{
e10coinCT++;
if (e10coinCT >= 6)
{
e10coinFrame++;
e10coinCT = 0;
if (e10coinFrame >= 4)
{
e10coinFrame = 0;
}
}
}
if (e10coinTouch == true)
{
e10coins = false;
e10sparkleOn = true;
e10coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e10coinCT = 0;
e10coinFrame = 0;
goldNow = goldNow + e10coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e10smoke == true)
{
if (e10smokeCT == 0 && e10smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e10smokeCT++;
if (e10smokeCT >= 6)
{
e10smokeCT = 0;
e10smokeFrame++;
if (e10smokeFrame >= 12)
{
e10smoke = false;
e10smokeCT = 0;
e10smokeFrame = 0;
}
}
}
if (e10sparkleOn == true)
{
e10sparkleCT++;
e10sparkleCycle++;
if (e10sparkleCT >= 3)
{
e10sparkleFr++;
e10sparkleCT = 0;
}
if (e10sparkleCycle >= 48)
{
e10sparkleOn = false;
e10sparkleCT = 0;
e10sparkleFr = 0;
e10sparkleCycle = 0;
}
}
if (e10plinkOn == true)
{
e10plinkCT++;
e10plinkCycle++;
if (e10plinkCT >= 6)
{
e10plinkCT = 0;
e10plinkFr++;
}
if (e10plinkCycle >= 60)
{
e10plinkOn = false;
e10plinkCycle = 0;
e10plinkFr = 0;
}
}
if (e10HP <= 0 && e10coins == false && e10smoke == false
&& e10sparkleOn == false)
{
e10spawn = false;
}
}
#endregion
//end e10 CT
//e11 CT
#region e11 CT
if (e11projectile == true)
{
e11projCT++;
if (e11projCT >= 6)
{
e11projA_frame++;
if (e11projA_frame >= 16)
{
e11projA_frame = 0;
}
e11projCT = 0;
}
}
if (e11plinkOn == true)
{
e11plinkCT++;
e11plinkCycle++;
if (e11plinkCT >= 6)
{
e11plinkCT = 0;
e11plinkFr++;
}
if (e11plinkCycle >= 60)
{
e11plinkOn = false;
e11plinkCycle = 0;
e11plinkFr = 0;
}
}
if (e11smoke == true)
{
if (e11smokeCT == 0 && e11smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e11smokeCT++;
if (e11smokeCT >= 6)
{
e11smokeCT = 0;
e11smokeFrame++;
if (e11smokeFrame >= 12)
{
e11smoke = false;
e11smokeCT = 0;
e11smokeFrame = 0;
}
}
}
if (e11knockback == true)
{
e11knockbackTimer++;
if (e11knockbackTimer >= 60)
{
e11knockback = false;
e11knockbackTimer = 0;
}
}
if (e11spawn == true && ((drgnX - e11X) >= -1280 && (e11X -
drgnX) >= -1408))
{
if (e11frozen == false)
{
e11CT++;
}
if (e11CT >= 6)
{
e11frame++;
e11CT = 0;
if (e11invulnerable == true)
{
e11invTimer++;
if (e11invTimer >= 10)
{
e11invulnerable = false;
e11invTimer = 0;
}
if (e11invTimer % 2 == 0)
{
e11invBlink = 0;
}
else
{
e11invBlink = 255;
}
}
else
{
if (e11invBlink < 255)
{
e11invBlink = 255;
}
}
}
if (e11coins == true)
{
e11coinCT++;
if (e11coinCT >= 6)
{
e11coinFrame++;
e11coinCT = 0;
if (e11coinFrame >= 4)
{
e11coinFrame = 0;
}
}
}
if (e11coinTouch == true)
{
e11coins = false;
e11coinTouch = false;
e11sparkleOn = true;
if (coinPlay == false)
{
coinPlay = true;
}
e11coinCT = 0;
e11coinFrame = 0;
goldNow = goldNow + e11coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e11sparkleOn == true)
{
e11sparkleCT++;
e11sparkleCycle++;
if (e11sparkleCT >= 3)
{
e11sparkleFr++;
e11sparkleCT = 0;
}
if (e11sparkleCycle >= 48)
{
e11sparkleOn = false;
e11sparkleCT = 0;
e11sparkleFr = 0;
e11sparkleCycle = 0;
}
}
if (e11HP <= 0 && e11coins == false && e11smoke == false
&& e11sparkleOn == false)
{
if (stage5eB == false)
{
e11spawn = false;
}
}
}
#endregion
//end e11 CT
//e12 CT
#region e12 CT
if (e12projectile == true)
{
e12projCT++;
if (e12projCT >= 6)
{
e12projA_frame++;
if (e12projA_frame >= 16)
{
e12projA_frame = 0;
}
e12projCT = 0;
}
}
if (e12spawn == true)
{
if (e12knockback == true && ((drgnX - e12X) >= -1280 &&
(e12X - drgnX) >= -1408))
{
e12knockbackTimer++;
if (e12knockbackTimer >= 60)
{
e12knockback = false;
e12knockbackTimer = 0;
}
}
if (e12frozen == false)
{
e12CT++;
}
if (e12CT >= 6)
{
e12frame++;
e12CT = 0;
if (e12invulnerable == true)
{
e12invTimer++;
if (e12invTimer >= 10)
{
e12invulnerable = false;
e12invTimer = 0;
}
if (e12invTimer % 2 == 0)
{
e12invBlink = 0;
}
else
{
e12invBlink = 255;
}
}
else
{
if (e12invBlink < 255)
{
e12invBlink = 255;
}
}
}
if (e12coins == true)
{
e12coinCT++;
if (e12coinCT >= 6)
{
e12coinFrame++;
e12coinCT = 0;
if (e12coinFrame >= 4)
{
e12coinFrame = 0;
}
}
}
if (e12coinTouch == true)
{
e12coins = false;
e12sparkleOn = true;
e12coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e12coinCT = 0;
e12coinFrame = 0;
goldNow = goldNow + e12coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e12smoke == true)
{
if (e12smokeCT == 0 && e12smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e12smokeCT++;
if (e12smokeCT >= 6)
{
e12smokeCT = 0;
e12smokeFrame++;
if (e12smokeFrame >= 12)
{
e12smoke = false;
e12smokeCT = 0;
e12smokeFrame = 0;
}
}
}
if (e12sparkleOn == true)
{
e12sparkleCT++;
e12sparkleCycle++;
if (e12sparkleCT >= 3)
{
e12sparkleFr++;
e12sparkleCT = 0;
}
if (e12sparkleCycle >= 48)
{
e12sparkleOn = false;
e12sparkleCT = 0;
e12sparkleFr = 0;
e12sparkleCycle = 0;
}
}
if (e12plinkOn == true)
{
e12plinkCT++;
e12plinkCycle++;
if (e12plinkCT >= 6)
{
e12plinkCT = 0;
e12plinkFr++;
}
if (e12plinkCycle >= 60)
{
e12plinkOn = false;
e12plinkCycle = 0;
e12plinkFr = 0;
}
}
if (e12HP <= 0 && e12coins == false && e12smoke == false
&& e12sparkleOn == false)
{
if (stage5eB == false)
{
e12spawn = false;
}
}
}
#endregion
//end e12 CT
//e13 CT
#region e13 CT
if (e13projectile == true)
{
e13projCT++;
if (e13projCT >= 6)
{
e13projA_frame++;
if (e13projA_frame >= 16)
{
e13projA_frame = 0;
}
e13projCT = 0;
}
}
if (e13spawn == true && ((drgnX - e13X) >= -1280 && (e13X -
drgnX) >= -1408))
{
if (e13knockback == true)
{
e13knockbackTimer++;
if (e13knockbackTimer >= 60)
{
e13knockback = false;
e13knockbackTimer = 0;
}
}
if (e13frozen == false)
{
e13CT++;
}
if (e13CT >= 6)
{
e13frame++;
e13CT = 0;
if (e13invulnerable == true)
{
e13invTimer++;
if (e13invTimer >= 10)
{
e13invulnerable = false;
e13invTimer = 0;
}
if (e13invTimer % 2 == 0)
{
e13invBlink = 0;
}
else
{
e13invBlink = 255;
}
}
else
{
if (e13invBlink < 255)
{
e13invBlink = 255;
}
}
}
if (e13coins == true)
{
e13coinCT++;
if (e13coinCT >= 6)
{
e13coinFrame++;
e13coinCT = 0;
if (e13coinFrame >= 4)
{
e13coinFrame = 0;
}
}
}
if (e13coinTouch == true)
{
e13coins = false;
e13sparkleOn = true;
e13coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e13coinCT = 0;
e13coinFrame = 0;
goldNow = goldNow + e13coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e13smoke == true)
{
if (e13smokeCT == 0 && e13smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e13smokeCT++;
if (e13smokeCT >= 6)
{
e13smokeCT = 0;
e13smokeFrame++;
if (e13smokeFrame >= 12)
{
e13smoke = false;
e13smokeCT = 0;
e13smokeFrame = 0;
}
}
}
if (e13sparkleOn == true)
{
e13sparkleCT++;
e13sparkleCycle++;
if (e13sparkleCT >= 3)
{
e13sparkleFr++;
e13sparkleCT = 0;
}
if (e13sparkleCycle >= 48)
{
e13sparkleOn = false;
e13sparkleCT = 0;
e13sparkleFr = 0;
e13sparkleCycle = 0;
}
}
if (e13plinkOn == true)
{
e13plinkCT++;
e13plinkCycle++;
if (e13plinkCT >= 6)
{
e13plinkCT = 0;
e13plinkFr++;
}
if (e13plinkCycle >= 60)
{
e13plinkOn = false;
e13plinkCycle = 0;
e13plinkFr = 0;
}
}
if (e13HP <= 0 && e13coins == false && e13smoke == false
&& e13sparkleOn == false)
{
if (stage5eB == false)
{
e13spawn = false;
}
}
}
#endregion
//end e13 CT
//e14 CT
#region e14 CT
if (e14projectile == true)
{
e14projCT++;
if (e14projCT >= 6)
{
e14projA_frame++;
if (e14projA_frame >= 16)
{
e14projA_frame = 0;
}
e14projCT = 0;
}
}
if (e14spawn == true && ((drgnX - e14X) >= -1280 && (e14X -
drgnX) >= -1408))
{
if (e14knockback == true)
{
e14knockbackTimer++;
if (e14knockbackTimer >= 60)
{
e14knockback = false;
e14knockbackTimer = 0;
}
}
if (e14frozen == false)
{
e14CT++;
}
if (e14CT >= 6)
{
e14frame++;
e14CT = 0;
if (e14invulnerable == true)
{
e14invTimer++;
if (e14invTimer >= 10)
{
e14invulnerable = false;
e14invTimer = 0;
}
if (e14invTimer % 2 == 0)
{
e14invBlink = 0;
}
else
{
e14invBlink = 255;
}
}
else
{
if (e14invBlink < 255)
{
e14invBlink = 255;
}
}
}
if (e14coins == true)
{
e14coinCT++;
if (e14coinCT >= 6)
{
e14coinFrame++;
e14coinCT = 0;
if (e14coinFrame >= 4)
{
e14coinFrame = 0;
}
}
}
if (e14coinTouch == true)
{
e14coins = false;
e14sparkleOn = true;
e14coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e14coinCT = 0;
e14coinFrame = 0;
goldNow = goldNow + e14coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e14smoke == true)
{
if (e14smokeCT == 0 && e14smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e14smokeCT++;
if (e14smokeCT >= 6)
{
e14smokeCT = 0;
e14smokeFrame++;
if (e14smokeFrame >= 12)
{
e14smoke = false;
e14smokeCT = 0;
e14smokeFrame = 0;
}
}
}
if (e14sparkleOn == true)
{
e14sparkleCT++;
e14sparkleCycle++;
if (e14sparkleCT >= 3)
{
e14sparkleFr++;
e14sparkleCT = 0;
}
if (e14sparkleCycle >= 48)
{
e14sparkleOn = false;
e14sparkleCT = 0;
e14sparkleFr = 0;
e14sparkleCycle = 0;
}
}
if (e14plinkOn == true)
{
e14plinkCT++;
e14plinkCycle++;
if (e14plinkCT >= 6)
{
e14plinkCT = 0;
e14plinkFr++;
}
if (e14plinkCycle >= 60)
{
e14plinkOn = false;
e14plinkCycle = 0;
e14plinkFr = 0;
}
}
if (e14HP <= 0 && e14coins == false && e14smoke == false
&& e14sparkleOn == false)
{
if (stage5eB == false)
{
e14spawn = false;
}
}
}
#endregion
//end e14 CT
//e15 CT
#region e15 CT
if (e15projectile == true)
{
e15projCT++;
if (e15projCT >= 6)
{
e15projA_frame++;
if (e15projA_frame >= 16)
{
e15projA_frame = 0;
}
e15projCT = 0;
}
}
if (stage4e4 == false)
{
if (e15spawn == true && ((drgnX - e15X) >= -1280 &&
(e15X - drgnX) >= -1408))
{
if (e15knockback == true)
{
e15knockbackTimer++;
if (e15knockbackTimer >= 60)
{
e15knockback = false;
e15knockbackTimer = 0;
}
}
if (e15frozen == false)
{
e15CT++;
}
if (e15CT >= 6)
{
e15frame++;
e15CT = 0;
if (e15invulnerable == true)
{
e15invTimer++;
if (e15invTimer >= 10)
{
e15invulnerable = false;
e15invTimer = 0;
}
if (e15invTimer % 2 == 0)
{
e15invBlink = 0;
}
else
{
e15invBlink = 255;
}
}
else
{
if (e15invBlink < 255)
{
e15invBlink = 255;
}
}
}
if (e15coins == true)
{
e15coinCT++;
if (e15coinCT >= 6)
{
e15coinFrame++;
e15coinCT = 0;
if (e15coinFrame >= 4)
{
e15coinFrame = 0;
}
}
}
if (e15coinTouch == true)
{
e15coins = false;
e15sparkleOn = true;
e15coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e15coinCT = 0;
e15coinFrame = 0;
goldNow = goldNow + e15coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e15smoke == true)
{
if (e15smokeCT == 0 && e15smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e15smokeCT++;
if (e15smokeCT >= 6)
{
e15smokeCT = 0;
e15smokeFrame++;
if (e15smokeFrame >= 12)
{
e15smoke = false;
e15smokeCT = 0;
e15smokeFrame = 0;
}
}
}
if (e15sparkleOn == true)
{
e15sparkleCT++;
e15sparkleCycle++;
if (e15sparkleCT >= 3)
{
e15sparkleFr++;
e15sparkleCT = 0;
}
if (e15sparkleCycle >= 48)
{
e15sparkleOn = false;
e15sparkleCT = 0;
e15sparkleFr = 0;
e15sparkleCycle = 0;
}
}
if (e15plinkOn == true)
{
e15plinkCT++;
e15plinkCycle++;
if (e15plinkCT >= 6)
{
e15plinkCT = 0;
e15plinkFr++;
}
if (e15plinkCycle >= 60)
{
e15plinkOn = false;
e15plinkCycle = 0;
e15plinkFr = 0;
}
}
if (e15HP <= 0 && e15coins == false && e15smoke ==
false && e15sparkleOn == false)
{
e15spawn = false;
}
}
}
else
{
if (e15spawn == true && (drgnY < 13000 && drgnY > 9000))
{
if (e15knockback == true)
{
e15knockbackTimer++;
if (e15knockbackTimer >= 60)
{
e15knockback = false;
e15knockbackTimer = 0;
}
}
e15CT++;
if (e15CT >= 6)
{
e15frame++;
e15CT = 0;
if (e15invulnerable == true)
{
e15invTimer++;
if (e15invTimer >= 10)
{
e15invulnerable = false;
e15invTimer = 0;
}
if (e15invTimer % 2 == 0)
{
e15invBlink = 0;
}
else
{
e15invBlink = 255;
}
}
else
{
if (e15invBlink < 255)
{
e15invBlink = 255;
}
}
}
if (e15coins == true)
{
e15coinCT++;
if (e15coinCT >= 6)
{
e15coinFrame++;
e15coinCT = 0;
if (e15coinFrame >= 4)
{
e15coinFrame = 0;
}
}
}
if (e15coinTouch == true)
{
e15coins = false;
e15sparkleOn = true;
e15coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e15coinCT = 0;
e15coinFrame = 0;
goldNow = goldNow + e15coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e15smoke == true)
{
if (e15smokeCT == 0 && e15smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e15smokeCT++;
if (e15smokeCT >= 6)
{
e15smokeCT = 0;
e15smokeFrame++;
if (e15smokeFrame >= 12)
{
e15smoke = false;
e15smokeCT = 0;
e15smokeFrame = 0;
}
}
}
if (e15sparkleOn == true)
{
e15sparkleCT++;
e15sparkleCycle++;
if (e15sparkleCT >= 3)
{
e15sparkleFr++;
e15sparkleCT = 0;
}
if (e15sparkleCycle >= 48)
{
e15sparkleOn = false;
e15sparkleCT = 0;
e15sparkleFr = 0;
e15sparkleCycle = 0;
}
}
if (e15plinkOn == true)
{
e15plinkCT++;
e15plinkCycle++;
if (e15plinkCT >= 6)
{
e15plinkCT = 0;
e15plinkFr++;
}
if (e15plinkCycle >= 60)
{
e15plinkOn = false;
e15plinkCycle = 0;
e15plinkFr = 0;
}
}
if (e15HP <= 0 && e15coins == false && e15smoke ==
false && e15sparkleOn == false)
{
e15spawn = false;
}
}
}
#endregion
//end e15 CT
//e16 CT
#region e16 CT
if (e16projectile == true)
{
e16projCT++;
if (e16projCT >= 6)
{
e16projA_frame++;
if (e16projA_frame >= 16)
{
e16projA_frame = 0;
}
e16projCT = 0;
}
}
if (stage4e4 == false)
{
if (e16spawn == true && ((drgnX - e16X) >= -1280 &&
(e16X - drgnX) >= -1408))
{
if (e16knockback == true)
{
e16knockbackTimer++;
if (e16knockbackTimer >= 60)
{
e16knockback = false;
e16knockbackTimer = 0;
}
}
if (e16frozen == false)
{
e16CT++;
}
if (e16CT >= 6)
{
e16frame++;
e16CT = 0;
if (e16invulnerable == true)
{
e16invTimer++;
if (e16invTimer >= 10)
{
e16invulnerable = false;
e16invTimer = 0;
}
if (e16invTimer % 2 == 0)
{
e16invBlink = 0;
}
else
{
e16invBlink = 255;
}
}
else
{
if (e16invBlink < 255)
{
e16invBlink = 255;
}
}
}
if (e16coins == true)
{
e16coinCT++;
if (e16coinCT >= 6)
{
e16coinFrame++;
e16coinCT = 0;
if (e16coinFrame >= 4)
{
e16coinFrame = 0;
}
}
}
if (e16coinTouch == true)
{
e16coins = false;
e16sparkleOn = true;
e16coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e16coinCT = 0;
e16coinFrame = 0;
goldNow = goldNow + e16coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e16smoke == true)
{
if (e16smokeCT == 0 && e16smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e16smokeCT++;
if (e16smokeCT >= 6)
{
e16smokeCT = 0;
e16smokeFrame++;
if (e16smokeFrame >= 12)
{
e16smoke = false;
e16smokeCT = 0;
e16smokeFrame = 0;
}
}
}
if (e16sparkleOn == true)
{
e16sparkleCT++;
e16sparkleCycle++;
if (e16sparkleCT >= 3)
{
e16sparkleFr++;
e16sparkleCT = 0;
}
if (e16sparkleCycle >= 48)
{
e16sparkleOn = false;
e16sparkleCT = 0;
e16sparkleFr = 0;
e16sparkleCycle = 0;
}
}
if (e16plinkOn == true)
{
e16plinkCT++;
e16plinkCycle++;
if (e16plinkCT >= 6)
{
e16plinkFr++;
e16plinkCT = 0;
}
if (e16plinkCycle >= 60)
{
e16plinkOn = false;
e16plinkCycle = 0;
e16plinkFr = 0;
}
}
if (e16HP <= 0 && e16coins == false && e16smoke ==
false && e16sparkleOn == false)
{
e16spawn = false;
}
}
}
else
{
if (e16spawn == true && (drgnY < 11000 && drgnY > 8000))
{
if (e16knockback == true)
{
e16knockbackTimer++;
if (e16knockbackTimer >= 60)
{
e16knockback = false;
e16knockbackTimer = 0;
}
}
e16CT++;
if (e16CT >= 6)
{
e16frame++;
e16CT = 0;
if (e16invulnerable == true)
{
e16invTimer++;
if (e16invTimer >= 10)
{
e16invulnerable = false;
e16invTimer = 0;
}
if (e16invTimer % 2 == 0)
{
e16invBlink = 0;
}
else
{
e16invBlink = 255;
}
}
else
{
if (e16invBlink < 255)
{
e16invBlink = 255;
}
}
}
if (e16coins == true)
{
e16coinCT++;
if (e16coinCT >= 6)
{
e16coinFrame++;
e16coinCT = 0;
if (e16coinFrame >= 4)
{
e16coinFrame = 0;
}
}
}
if (e16coinTouch == true)
{
e16coins = false;
e16sparkleOn = true;
e16coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e16coinCT = 0;
e16coinFrame = 0;
goldNow = goldNow + e16coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e16smoke == true)
{
if (e16smokeCT == 0 && e16smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e16smokeCT++;
if (e16smokeCT >= 6)
{
e16smokeCT = 0;
e16smokeFrame++;
if (e16smokeFrame >= 12)
{
e16smoke = false;
e16smokeCT = 0;
e16smokeFrame = 0;
}
}
}
if (e16sparkleOn == true)
{
e16sparkleCT++;
e16sparkleCycle++;
if (e16sparkleCT >= 3)
{
e16sparkleFr++;
e16sparkleCT = 0;
}
if (e16sparkleCycle >= 48)
{
e16sparkleOn = false;
e16sparkleCT = 0;
e16sparkleFr = 0;
e16sparkleCycle = 0;
}
}
if (e16plinkOn == true)
{
e16plinkCT++;
e16plinkCycle++;
if (e16plinkCT >= 6)
{
e16plinkFr++;
e16plinkCT = 0;
}
if (e16plinkCycle >= 60)
{
e16plinkOn = false;
e16plinkCycle = 0;
e16plinkFr = 0;
}
}
if (e16HP <= 0 && e16coins == false && e16smoke ==
false && e16sparkleOn == false)
{
e16spawn = false;
}
}
}
#endregion
//end e16 CT
//e17 CT
#region e17 CT
if (e17projectile == true)
{
e17projCT++;
if (e17projCT >= 6)
{
e17projA_frame++;
if (e17projA_frame >= 16)
{
e17projA_frame = 0;
}
e17projCT = 0;
}
}
if (stage4e4 == false)
{
if (e17spawn == true && ((drgnX - e17X) >= -1280 &&
(e17X - drgnX) >= -1408))
{
if (e17knockback == true)
{
e17knockbackTimer++;
if (e17knockbackTimer >= 60)
{
e17knockback = false;
e17knockbackTimer = 0;
}
}
if (e17frozen == false)
{
e17CT++;
}
if (e17CT >= 6)
{
e17frame++;
e17CT = 0;
if (e17invulnerable == true)
{
e17invTimer++;
if (e17invTimer >= 10)
{
e17invulnerable = false;
e17invTimer = 0;
}
if (e17invTimer % 2 == 0)
{
e17invBlink = 0;
}
else
{
e17invBlink = 255;
}
}
else
{
if (e17invBlink < 255)
{
e17invBlink = 255;
}
}
}
if (e17coins == true)
{
e17coinCT++;
if (e17coinCT >= 6)
{
e17coinFrame++;
e17coinCT = 0;
if (e17coinFrame >= 4)
{
e17coinFrame = 0;
}
}
}
if (e17coinTouch == true)
{
e17coins = false;
e17sparkleOn = true;
e17coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e17coinCT = 0;
e17coinFrame = 0;
goldNow = goldNow + e17coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e17smoke == true)
{
if (e17smokeCT == 0 && e17smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e17smokeCT++;
if (e17smokeCT >= 6)
{
e17smokeCT = 0;
e17smokeFrame++;
if (e17smokeFrame >= 12)
{
e17smoke = false;
e17smokeCT = 0;
e17smokeFrame = 0;
}
}
}
if (e17sparkleOn == true)
{
e17sparkleCT++;
e17sparkleCycle++;
if (e17sparkleCT >= 3)
{
e17sparkleFr++;
e17sparkleCT = 0;
}
if (e17sparkleCycle >= 48)
{
e17sparkleOn = false;
e17sparkleCT = 0;
e17sparkleFr = 0;
e17sparkleCycle = 0;
}
}
if (e17plinkOn == true)
{
e17plinkCT++;
e17plinkCycle++;
if (e17plinkCT >= 6)
{
e17plinkCT = 0;
e17plinkFr++;
}
if (e17plinkCycle >= 60)
{
e17plinkOn = false;
e17plinkCycle = 0;
e17plinkFr = 0;
}
}
if (e17HP <= 0 && e17coins == false && e17smoke ==
false && e17sparkleOn == false)
{
e17spawn = false;
}
}
}
else
{
if (e17spawn == true && (drgnY < 8000 && drgnY > 5000))
{
if (e17knockback == true)
{
e17knockbackTimer++;
if (e17knockbackTimer >= 60)
{
e17knockback = false;
e17knockbackTimer = 0;
}
}
e17CT++;
if (e17CT >= 6)
{
e17frame++;
e17CT = 0;
if (e17invulnerable == true)
{
e17invTimer++;
if (e17invTimer >= 10)
{
e17invulnerable = false;
e17invTimer = 0;
}
if (e17invTimer % 2 == 0)
{
e17invBlink = 0;
}
else
{
e17invBlink = 255;
}
}
else
{
if (e17invBlink < 255)
{
e17invBlink = 255;
}
}
}
if (e17coins == true)
{
e17coinCT++;
if (e17coinCT >= 6)
{
e17coinFrame++;
e17coinCT = 0;
if (e17coinFrame >= 4)
{
e17coinFrame = 0;
}
}
}
if (e17coinTouch == true)
{
e17coins = false;
e17sparkleOn = true;
e17coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e17coinCT = 0;
e17coinFrame = 0;
goldNow = goldNow + e17coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e17smoke == true)
{
if (e17smokeCT == 0 && e17smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e17smokeCT++;
if (e17smokeCT >= 6)
{
e17smokeCT = 0;
e17smokeFrame++;
if (e17smokeFrame >= 12)
{
e17smoke = false;
e17smokeCT = 0;
e17smokeFrame = 0;
}
}
}
if (e17sparkleOn == true)
{
e17sparkleCT++;
e17sparkleCycle++;
if (e17sparkleCT >= 3)
{
e17sparkleFr++;
e17sparkleCT = 0;
}
if (e17sparkleCycle >= 48)
{
e17sparkleOn = false;
e17sparkleCT = 0;
e17sparkleFr = 0;
e17sparkleCycle = 0;
}
}
if (e17plinkOn == true)
{
e17plinkCT++;
e17plinkCycle++;
if (e17plinkCT >= 6)
{
e17plinkCT = 0;
e17plinkFr++;
}
if (e17plinkCycle >= 60)
{
e17plinkOn = false;
e17plinkCycle = 0;
e17plinkFr = 0;
}
}
if (e17HP <= 0 && e17coins == false && e17smoke ==
false && e17sparkleOn == false)
{
e17spawn = false;
}
}
}
#endregion
//end e17 CT
//e18 CT
#region e18 CT
if (e18projectile == true)
{
e18projCT++;
if (e18projCT >= 6)
{
e18projA_frame++;
if (e18projA_frame >= 16)
{
e18projA_frame = 0;
}
e18projCT = 0;
}
}
if (e18spawn == true && ((drgnX - e18X) >= -1280 && (e18X -
drgnX) >= -1408))
{
if (e18knockback == true)
{
e18knockbackTimer++;
if (e18knockbackTimer >= 60)
{
e18knockback = false;
e18knockbackTimer = 0;
}
}
if (e18frozen == false)
{
e18CT++;
}
if (e18CT >= 6)
{
e18frame++;
e18CT = 0;
if (e18invulnerable == true)
{
e18invTimer++;
if (e18invTimer >= 10)
{
e18invulnerable = false;
e18invTimer = 0;
}
if (e18invTimer % 2 == 0)
{
e18invBlink = 0;
}
else
{
e18invBlink = 255;
}
}
else
{
if (e18invBlink < 255)
{
e18invBlink = 255;
}
}
}
if (e18coins == true)
{
e18coinCT++;
if (e18coinCT >= 6)
{
e18coinFrame++;
e18coinCT = 0;
if (e18coinFrame >= 4)
{
e18coinFrame = 0;
}
}
}
if (e18coinTouch == true)
{
e18coins = false;
e18sparkleOn = true;
e18coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e18coinCT = 0;
e18coinFrame = 0;
goldNow = goldNow + e18coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e18smoke == true)
{
if (e18smokeCT == 0 && e18smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e18smokeCT++;
if (e18smokeCT >= 6)
{
e18smokeCT = 0;
e18smokeFrame++;
if (e18smokeFrame >= 12)
{
e18smoke = false;
e18smokeCT = 0;
e18smokeFrame = 0;
}
}
}
if (e18sparkleOn == true)
{
e18sparkleCT++;
e18sparkleCycle++;
if (e18sparkleCT >= 3)
{
e18sparkleFr++;
e18sparkleCT = 0;
}
if (e18sparkleCycle >= 48)
{
e18sparkleOn = false;
e18sparkleCT = 0;
e18sparkleFr = 0;
e18sparkleCycle = 0;
}
}
if (e18plinkOn == true)
{
e18plinkCT++;
e18plinkCycle++;
if (e18plinkCT >= 6)
{
e18plinkCT = 0;
e18plinkFr++;
}
if (e18plinkCycle >= 60)
{
e18plinkOn = false;
e18plinkCycle = 0;
e18plinkFr = 0;
}
}
if (e18HP <= 0 && e18coins == false && e18smoke == false
&& e18sparkleOn == false)
{
e18spawn = false;
}
}
#endregion
//end e18 CT
//e19 CT
#region e19 CT
if (e19projectile == true)
{
e19projCT++;
if (e19projCT >= 6)
{
e19projA_frame++;
if (e19projA_frame >= 16)
{
e19projA_frame = 0;
}
e19projCT = 0;
}
}
if (e19spawn == true && ((drgnX - e19X) >= -1280 && (e19X -
drgnX) >= -1408))
{
if (e19knockback == true)
{
e19knockbackTimer++;
if (e19knockbackTimer >= 60)
{
e19knockback = false;
e19knockbackTimer = 0;
}
}
if (e19frozen == false)
{
e19CT++;
}
if (e19CT >= 6)
{
e19frame++;
e19CT = 0;
if (e19invulnerable == true)
{
e19invTimer++;
if (e19invTimer >= 10)
{
e19invulnerable = false;
e19invTimer = 0;
}
if (e19invTimer % 2 == 0)
{
e19invBlink = 0;
}
else
{
e19invBlink = 255;
}
}
else
{
if (e19invBlink < 255)
{
e19invBlink = 255;
}
}
}
if (e19coins == true)
{
e19coinCT++;
if (e19coinCT >= 6)
{
e19coinFrame++;
e19coinCT = 0;
if (e19coinFrame >= 4)
{
e19coinFrame = 0;
}
}
}
if (e19coinTouch == true)
{
e19coins = false;
e19sparkleOn = true;
e19coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e19coinCT = 0;
e19coinFrame = 0;
goldNow = goldNow + e19coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e19smoke == true)
{
if (e19smokeCT == 0 && e19smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e19smokeCT++;
if (e19smokeCT >= 6)
{
e19smokeCT = 0;
e19smokeFrame++;
if (e19smokeFrame >= 12)
{
e19smoke = false;
e19smokeCT = 0;
e19smokeFrame = 0;
}
}
}
if (e19sparkleOn == true)
{
e19sparkleCT++;
e19sparkleCycle++;
if (e19sparkleCT >= 3)
{
e19sparkleFr++;
e19sparkleCT = 0;
}
if (e19sparkleCycle >= 48)
{
e19sparkleOn = false;
e19sparkleCT = 0;
e19sparkleFr = 0;
e19sparkleCycle = 0;
}
}
if (e19plinkOn == true)
{
e19plinkCT++;
e19plinkCycle++;
if (e19plinkCT >= 6)
{
e19plinkCT = 0;
e19plinkFr++;
}
if (e19plinkCycle >= 60)
{
e19plinkOn = false;
e19plinkCycle = 0;
e19plinkFr = 0;
}
}
if (e19HP <= 0 && e19coins == false && e19smoke == false
&& e19sparkleOn == false)
{
e19spawn = false;
}
}
#endregion
//end e19 CT
//e20 CT
#region e20 CT
if (e20smoke == true)
{
if (e20smokeCT == 0 && e20smokeFrame == 0)
{
if (smokePlay == false)
{
smokePlay = true;
}
}
e20smokeCT++;
if (e20smokeCT >= 6)
{
e20smokeCT = 0;
e20smokeFrame++;
if (e20smokeFrame >= 12)
{
e20smoke = false;
e20smokeCT = 0;
e20smokeFrame = 0;
}
}
}
if (e20projectile == true)
{
e20projCT++;
if (e20projCT >= 6)
{
e20projA_frame++;
if (e20projA_frame >= 16)
{
e20projA_frame = 0;
}
e20projCT = 0;
}
}
if (e20spawn == true && ((drgnX - e20X) >= -1280 && (e20X -
drgnX) >= -1408))
{
if (e20knockback == true)
{
e20knockbackTimer++;
if (e20knockbackTimer >= 60)
{
e20knockback = false;
e20knockbackTimer = 0;
}
}
if (e20frozen == false)
{
e20CT++;
}
if (e20CT >= 6)
{
e20frame++;
e20CT = 0;
if (e20invulnerable == true)
{
e20invTimer++;
if (e20invTimer >= 10)
{
e20invulnerable = false;
e20invTimer = 0;
}
if (e20invTimer % 2 == 0)
{
e20invBlink = 0;
}
else
{
e20invBlink = 255;
}
}
else
{
if (e20invBlink < 255)
{
e20invBlink = 255;
}
}
}
if (e20coins == true)
{
e20coinCT++;
if (e20coinCT >= 6)
{
e20coinFrame++;
e20coinCT = 0;
if (e20coinFrame >= 4)
{
e20coinFrame = 0;
}
}
}
if (e20coinTouch == true)
{
e20coins = false;
e20sparkleOn = true;
e20coinTouch = false;
if (coinPlay == false)
{
coinPlay = true;
}
e20coinCT = 0;
e20coinFrame = 0;
goldNow = goldNow + e20coinValue;
if (goldNow > 9999999)
{
goldNow = 9999999;
}
updateGold = true;
}
if (e20sparkleOn == true)
{
e20sparkleCT++;
e20sparkleCycle++;
if (e20sparkleCT >= 3)
{
e20sparkleFr++;
e20sparkleCT = 0;
}
if (e20sparkleCycle >= 48)
{
e20sparkleOn = false;
e20sparkleCT = 0;
e20sparkleFr = 0;
e20sparkleCycle = 0;
}
}
if (e20plinkOn == true)
{
e20plinkCT++;
e20plinkCycle++;
if (e20plinkCT >= 6)
{
e20plinkCT = 0;
e20plinkFr++;
}
if (e20plinkCycle >= 60)
{
e20plinkOn = false;
e20plinkCycle = 0;
e20plinkFr = 0;
}
}
if (e20HP <= 0 && e20coins == false && e20smoke == false
&& e20sparkleOn == false)
{
e20spawn = false;
}
}
#endregion
//end e20 CT
#region cancel knockback
if ((touchLe1 == true || touchRe1 == true) && e1HP <= 0)
{
touchLe1 = false;
touchRe1 = false;
}
if ((touchLe2 == true || touchRe2 == true) && e2HP <= 0)
{
touchLe2 = false;
touchRe2 = false;
}
if ((touchLe3 == true || touchRe3 == true) && e3HP <= 0)
{
touchLe3 = false;
touchRe3 = false;
}
if ((touchLe4 == true || touchRe4 == true) && e4HP <= 0)
{
touchLe4 = false;
touchRe4 = false;
}
if ((touchLe5 == true || touchRe5 == true) && e5HP <= 0)
{
touchLe5 = false;
touchRe5 = false;
}
if ((touchLe6 == true || touchRe6 == true) && e6HP <= 0)
{
touchLe6 = false;
touchRe6 = false;
}
if ((touchLe7 == true || touchRe7 == true) && e7HP <= 0)
{
touchLe7 = false;
touchRe7 = false;
}
if ((touchLe8 == true || touchRe8 == true) && e8HP <= 0)
{
touchLe8 = false;
touchRe8 = false;
}
if ((touchLe9 == true || touchRe9 == true) && e9HP <= 0)
{
touchLe9 = false;
touchRe9 = false;
}
if ((touchLe10 == true || touchRe10 == true) && e10HP <= 0)
{
touchLe10 = false;
touchRe10 = false;
}
if ((touchLe11 == true || touchRe11 == true) && e11HP <= 0)
{
touchLe11 = false;
touchRe11 = false;
}
if ((touchLe12 == true || touchRe12 == true) && e12HP <= 0)
{
touchLe12 = false;
touchRe12 = false;
}
if ((touchLe13 == true || touchRe13 == true) && e13HP <= 0)
{
touchLe13 = false;
touchRe13 = false;
}
if ((touchLe14 == true || touchRe14 == true) && e14HP <= 0)
{
touchLe14 = false;
touchRe14 = false;
}
if ((touchLe15 == true || touchRe15 == true) && e15HP <= 0)
{
touchLe15 = false;
touchRe15 = false;
}
if ((touchLe16 == true || touchRe16 == true) && e16HP <= 0)
{
touchLe16 = false;
touchRe16 = false;
}
if ((touchLe17 == true || touchRe17 == true) && e17HP <= 0)
{
touchLe17 = false;
touchRe17 = false;
}
if ((touchLe18 == true || touchRe18 == true) && e18HP <= 0)
{
touchLe18 = false;
touchRe18 = false;
}
if ((touchLe19 == true || touchRe19 == true) && e19HP <= 0)
{
touchLe19 = false;
touchRe19 = false;
}
if ((touchLe20 == true || touchRe20 == true) && e20HP <= 0)
{
touchLe20 = false;
touchRe20 = false;
}
#endregion
#endregion
#region Passive Player CT Handling
if (levelUpMenu == false)
{
drgnCT++;
}
if (dragonDash == true && drgnAction == 11)
{
drgnDashing = 2;
}
else
{
drgnDashing = 1;
}
if (usingClaw == true)
{
clawCT++;
if (clawCT >= 5)
{
clawCT = 0;
clawTimer++;
clawFrame++;
if (clawTimer >= 8)
{
clawNoMove = false;
}
if (clawTimer >= 8)
{
usingClaw = false;
clawTimer = 0;
clawFrame = 0;
clawCT = 0;
}
}
}
if (drgnCT >= 6)
{
drgnFrame++;
if (drgnAction == 6)
{
if (drgnFrame >= 8)
{
drgnFrame = 0;
}
}
if (drgnFrame >= 16)
{
drgnFrame = 0;
}
if (drgnFire == true)
{
breathFrame++;
if (breathFrame >= 16)
{
breathFrame = 0;
}
}
drgnCT = 0;
if (drgnInvulnerable == true)
{
drgnInvTimer++;
if (drgnInvTimer >= 20)
{
drgnInvulnerable = false;
drgnInvTimer = 0;
}
if (drgnInvTimer % 2 == 0)
{
drgnInvOpacity = 0;
}
else
{
drgnInvOpacity = 255;
}
}
else
{
if (drgnInvOpacity < 255)
{
drgnInvOpacity = 255;
}
}
}
if (drgnOnGround == false)
{
drgnY_CT++;
}
if (breathNow < breathMax && drgnFire == false)
{
breathTimer++;
if (breathTimer >= (240 - (breathCycleBonus +
breathCycleTreasure)))
{
breathNow = breathMax;
}
}
if (drgnKnockback == true)
{
drgnFlyNow = 0;
if (touchLe1 == true || touchRe1 == true)
{
touchLe1 = false;
touchRe1 = false;
}
if (touchLe2 == true || touchRe2 == true)
{
touchLe2 = false;
touchRe2 = false;
}
if (touchLe3 == true || touchRe3 == true)
{
touchLe3 = false;
touchRe3 = false;
}
if (touchLe4 == true || touchRe4 == true)
{
touchLe4 = false;
touchRe4 = false;
}
if (touchLe5 == true || touchRe5 == true)
{
touchLe5 = false;
touchRe5 = false;
}
if (touchLe6 == true || touchRe6 == true)
{
touchLe6 = false;
touchRe6 = false;
}
if (touchLe7 == true || touchRe7 == true)
{
touchLe7 = false;
touchRe7 = false;
}
if (touchLe8 == true || touchRe8 == true)
{
touchLe8 = false;
touchRe8 = false;
}
if (touchLe9 == true || touchRe9 == true)
{
touchLe9 = false;
touchRe9 = false;
}
if (touchLe10 == true || touchRe10 == true)
{
touchLe10 = false;
touchRe10 = false;
}
drgnKnockbackTimer++;
if (drgnAction != 7)
{
drgnAction = 7;
drgnFrame = 0;
}
if (drgnFaceR == true && touchWallL == false && touchLe1
== false && touchLe2 == false && touchLe3 == false && touchLe4 == false && touchLe5
== false && touchLe6 == false && touchLe7 == false && touchLe8 == false && touchLe9
== false && touchLe10 == false)
{
if (drgnKnockbackTimer < 10)
{
drgnX--;
drgnX--;
}
else if (drgnKnockbackTimer >= 10 &&
drgnKnockbackTimer < 20)
{
drgnX--;
}
}
if (drgnFaceR == false && touchWallR == false &&
touchRe1 == false && touchRe2 == false && touchRe3 == false && touchRe4 == false &&
touchRe5 == false && touchRe6 == false && touchRe7 == false && touchRe8 == false &&
touchRe9 == false && touchRe10 == false)
{
if (drgnKnockbackTimer < 10)
{
drgnX++;
drgnX++;
}
else if (drgnKnockbackTimer >= 10 &&
drgnKnockbackTimer < 20)
{
drgnX++;
}
}
if (drgnKnockbackTimer >= 25)
{
drgnKnockback = false;
drgnKnockbackTimer = 0;
}
}
#endregion
if (blackMatteOpacity <= 0 && whiteMatteOpacity <= 0)
{
#region Control Input & Level Up
if (controlInput == true && runEvent == false &&
drgnHPNow > 0)
{
if (controlType == 0)
{
#region Outside Level Up Menu
if (drgnKnockback == false && levelUpMenu ==
false)
{
if (drgnWait == true)
{
if (drgnUnderwater == false &&
drgnOnGround == true)
{
drgnWaitTimer++;
}
if (drgnWaitTimer >= 300)
{
drgnAction = 8;
if (drgnIdle == false)
{
drgnIdle = true;
if (whistleRandom == -1)
{
whistleRandom =
generateRandom.Next(0, 9);
}
}
}
}
if (waterfallKnockback == true)
{
if (drgnAction != 7)
{
drgnCT = 0;
drgnAction = 7;
drgnFrame = 0;
}
}
if (drgnOnGround == true && drgnFlyNow !=
drgnFlyMax && lastKeyX == false && drgnKnockback == false && xWhileJumping == false)
{
drgnFlyNow = drgnFlyMax;
}
if (drgnAction == 5 || drgnAction == 4)
{
if (drgnFrame >= 5)
{
drgnFrame = 5;
}
}
#region PAUSE
if (endOfStage == false && stageExit ==
false && defeated == false && treasurePickUp == false && (kbState.IsKeyDown
(Keys.Enter) || gpState.IsButtonDown(Buttons.Start)) && lastKeyEsc == false)
{
lastKeyEsc = true;
actionStagePause = true;
showPause = true;
toggleTutorial = 0;
if (stage5e2 == true || (stage4e3 ==
true && from4e1 == true) || stage6eB == true)
{
play5e2Top.pauseBGM();
play5e2Bottom.pauseBGM();
}
else
{
playStageMusic.pauseBGM();
}
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
if (stage1eB == true)
{
loopThunderBlast.pauseSFX();
}
}
#endregion
#region type 1
if ((kbState.IsKeyDown(Keys.Up) ||
gpState.ThumbSticks.Left.Y > 0.4f) && stageHome == true && lastDirUp == false)
{
pressUp = true;
lastDirUp = true;
}
if (((kbState.IsKeyUp(Keys.Right) &&
kbState.IsKeyUp(Keys.Left) && kbState.IsKeyUp(Keys.Down)) &&
(gpState.ThumbSticks.Left.X > -0.4f && gpState.ThumbSticks.Left.X < 0.4f &&
gpState.ThumbSticks.Left.Y > -0.8f)) && drgnAction != 0 && usingClaw == false &&
drgnOnGround == true && drgnIdle == false && drgnFire == false && waterfallKnockback
== false && drgnGrab == false)
{
if (drgnAction != 0)
{
drgnCT = 0;
drgnFrame = 0;
}
drgnAction = 0;
drgnWait = true;
}
if (((kbState.IsKeyDown(Keys.Right) &&
kbState.IsKeyUp(Keys.Left) && kbState.IsKeyUp(Keys.Down)) ||
(gpState.ThumbSticks.Left.X >= 0.4f && gpState.ThumbSticks.Left.X > -0.4f &&
gpState.ThumbSticks.Left.Y > -0.8f)) && drgnFire == false && clawNoMove == false &&
waterfallKnockback == false && drgnGrab == false)
{
if (drgnFaceR == false)
{
drgnFacingDir = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
}
if (drgnAction != 1 && drgnOnGround ==
true && dragonDash == false)
{
drgnAction = 1;
drgnCT = 0;
drgnFrame = 0;
}
else if (drgnAction != 11 &&
drgnOnGround == true && dragonDash == true)
{
drgnAction = 11;
drgnCT = 0;
drgnFrame = 0;
}
if (boat1TouchR == true)
{
if (boat1Right == false)
{
if (boat1Vel <= 0)
{
boat1Vel = 1;
}
}
}
if (boat2TouchR == true)
{
if (boat2Right == false)
{
if (boat2Vel <= 0)
{
boat2Vel = 1;
}
}
}
if (touchWallR == false && touchRe1 ==
false && touchRe2 == false && touchRe3 == false && touchRe4 == false && touchRe5 ==
false && touchRe6 == false && touchRe7 == false && touchRe8 == false && touchRe9 ==
false && touchRe10 == false && duckStop == false)
{
if (((kbState.IsKeyDown(Keys.Right)
&& (gpState.ThumbSticks.Left.X < 0.4f && gpState.ThumbSticks.Left.X > -0.4f)) ||
(kbState.IsKeyUp(Keys.Right) && (gpState.ThumbSticks.Left.X >= 0.4f &&
gpState.ThumbSticks.Left.X > -0.4f))) && kbState.IsKeyUp(Keys.Left) &&
kbState.IsKeyUp(Keys.Down))
{
if (inMud == false)
{
if (drgnUnderwater == true)
{
drgnX++;
drgnX++;
drgnX++;
}
else
{
drgnX++;
drgnX++;
drgnX++;
drgnX++;
drgnX++;
if (dragonDash == true)
{
drgnX++;
drgnX++;
}
}
}
else
{
drgnX++;
}
}
}
if (stage3e3 == true && touchWallR ==
true && drgnY == 2049)
{
if (guardAct != 1)
{
guardFrame = 0;
guardCT = 0;
guardAct = 1;
}
}
drgnWait = false;
drgnWaitTimer = 0;
drgnIdle = false;
}
if (((kbState.IsKeyDown(Keys.Left) &&
kbState.IsKeyUp(Keys.Right) && kbState.IsKeyUp(Keys.Down)) ||
(gpState.ThumbSticks.Left.X <= -0.4f && gpState.ThumbSticks.Left.X < 0.4f &&
gpState.ThumbSticks.Left.Y > -0.8f)) && drgnFire == false && clawNoMove == false &&
waterfallKnockback == false && drgnGrab == false)
{
if (drgnAction != 1 && drgnOnGround ==
true && dragonDash == false)
{
drgnAction = 1;
drgnCT = 0;
drgnFrame = 0;
}
else if (drgnAction != 11 &&
drgnOnGround == true && dragonDash == true)
{
drgnAction = 11;
drgnCT = 0;
drgnFrame = 0;
}
if (drgnFaceR == true)
{
drgnFacingDir = 13;
clawDir = 2;
breathDir = 6;
clawX = -80 - clawhitboxmod;
breathX = -196;
drgnFaceR = false;
}
if (boat1TouchL == true)
{
if (boat1Left == false)
{
if (boat1Vel >= 0)
{
boat1Vel = -1;
}
}
}
if (boat2TouchL == true)
{
if (boat2Left == false)
{
if (boat2Vel >= 0)
{
boat2Vel = -1;
}
}
}
if (touchWallL == false && touchLe1 ==
false && touchLe2 == false && touchLe3 == false && touchLe4 == false && touchLe5 ==
false && touchLe6 == false && touchLe7 == false && touchLe8 == false && touchLe9 ==
false && touchLe10 == false && duckStop == false)
{
if (((kbState.IsKeyDown(Keys.Left)
&& (gpState.ThumbSticks.Left.X < 0.4f && gpState.ThumbSticks.Left.X > -0.4f)) ||
(kbState.IsKeyUp(Keys.Left) && (gpState.ThumbSticks.Left.X < 0.4f &&
gpState.ThumbSticks.Left.X <= -0.4f))) && kbState.IsKeyUp(Keys.Right) &&
kbState.IsKeyUp(Keys.Down))
{
if (inMud == false)
{
if (drgnUnderwater == true)
{
drgnX--;
drgnX--;
drgnX--;
}
else
{
drgnX--;
drgnX--;
drgnX--;
drgnX--;
drgnX--;
if (dragonDash == true)
{
drgnX--;
drgnX--;
}
}
}
else
{
drgnX--;
}
}
}
drgnWait = false;
drgnWaitTimer = 0;
drgnIdle = false;
}
if (((kbState.IsKeyDown(Keys.Down) &&
kbState.IsKeyUp(Keys.Left) && kbState.IsKeyUp(Keys.Right) && kbState.IsKeyUp
(Keys.A)) || (gpState.ThumbSticks.Left.X > -0.4f && gpState.ThumbSticks.Left.X <
0.4f && gpState.ThumbSticks.Left.Y <= -0.8f && gpState.IsButtonUp(Buttons.X))) &&
drgnFlight == false && clawNoMove == false && drgnOnGround == true &&
waterfallKnockback == false && drgnGrab == false)
{
if (drgnAction != 9)
{
drgnAction = 9;
drgnCT = 0;
drgnFrame = 0;
}
if (drgnOnGround == true)
{
duckStop = true;
}
else
{
duckStop = false;
}
drgnWait = false;
drgnWaitTimer = 0;
drgnIdle = false;
ducking = 3;
duckingYMod = 70;
}
else
{
if (ducking != 1)
{
duckStop = false;
ducking = 1;
duckingYMod = 0;
}
}
if (drgnUnderwater == false)
{
if ((kbState.IsKeyDown(Keys.X) ||
(gpState.IsButtonDown(Buttons.A))) && (drgnOnGround == true || dkcFall < 20) &&
drgnFlight == false && lastKeyX == false && clawNoMove == false && drgnFlyNow > 0 &&
xWhileJumping == false && waterfallKnockback == false && drgnGrab == false)
{
if (drgnAction != 4)
{
drgnAction = 4;
drgnCT = 0;
drgnFrame = 0;
}
if (stageHome == true || stage2e4 ==
true || stage3e3 == true || stage4e2 == true || stage1eB == true || stage2eB == true
|| stage3eB == true || stage4eB == true || stage5eB == true)
{
drgnYvel = -7;
}
else if (stage4e3 == true && drgnX >
11783 && drgnX < 12650 && drgnY > 2526)
{
drgnYvel = -9;
}
else
{
drgnYvel = -8;
}
drgnOnGround = false;
dkcFall = 41;
lastKeyX = true;
if (jumpPlay == false)
{
jumpPlay = true;
}
drgnWait = false;
drgnWaitTimer = 0;
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
usingClaw = false;
drgnIdle = false;
}
if ((kbState.IsKeyDown(Keys.X) ||
(gpState.IsButtonDown(Buttons.A))) && drgnOnGround == false && dkcFall >= 20 &&
drgnFlyNow > 0 && lastKeyX == false && inMud == false && waterfallKnockback == false
&& drgnGrab == false)
{
if (drgnAction != 6)
{
drgnAction = 6;
drgnCT = 0;
drgnFrame = 0;
drgnFlyNow = drgnFlyNow - 15;
}
drgnYvel = 0;
drgnFlight = true;
drgnFlyNow--;
drgnFlyXP++;
if (drgnFlyNow <= 0)
{
drgnFlight = false;
}
}
else if ((kbState.IsKeyUp(Keys.X) &&
gpState.IsButtonUp(Buttons.A)) && drgnOnGround == false)
{
drgnFlight = false;
}
}
else if (drgnUnderwater == true)
{
if (jumpWait > 0)
{
jumpWait--;
}
if ((kbState.IsKeyDown(Keys.X) ||
(gpState.IsButtonDown(Buttons.A))) && drgnFlight == false && lastKeyX == false &&
clawNoMove == false && xWhileJumping == false && waterfallKnockback == false &&
drgnGrab == false && jumpWait <= 0)
{
if (drgnAction != 4)
{
drgnAction = 4;
drgnCT = 0;
drgnFrame = 0;
}
drgnYvel = -8;
drgnOnGround = false;
lastKeyX = true;
dkcFall = 41;
if (waterjumpPlay == false)
{
waterjumpPlay = true;
}
drgnWait = false;
drgnWaitTimer = 0;
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
usingClaw = false;
drgnIdle = false;
}
}
if (((kbState.IsKeyDown(Keys.A) &&
kbState.IsKeyUp(Keys.Z) && kbState.IsKeyUp(Keys.Down)) || (gpState.IsButtonDown
(Buttons.X) && gpState.IsButtonUp(Buttons.Y) && gpState.ThumbSticks.Left.Y > -0.8f))
&& drgnOnGround == true && clawNoMove == false && drgnFlight == false && breathNow >
0 && waterfallKnockback == false && grabSlam == false)
{
if (lastKeyA == false)
{
lastKeyA = true;
if (breathNow - 30 > 0)
{
breathNow -= 30;
}
else
{
breathNow = 1;
}
breathFrame = 0;
}
if (underwaterBreath == false)
{
if (breathNow > 0)
{
drgnFire = true;
if (drgnAction != 2)
{
drgnAction = 2;
drgnCT = 0;
drgnFrame = 0;
}
breathNow--;
breathMaxXP++;
}
}
else if (underwaterBreath == true)
{
if (breathNow > 0)
{
drgnFire = true;
if (drgnAction != 7)
{
drgnAction = 7;
drgnCT = 0;
drgnFrame = 0;
}
breathNow--;
}
}
if (breathNow <= 0)
{
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
}
drgnWait = false;
drgnWaitTimer = 0;
drgnIdle = false;
}
else if ((kbState.IsKeyUp(Keys.A) &&
gpState.IsButtonUp(Buttons.X)) && drgnFire == true)
{
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
lastKeyA = false;
}
if (drgnFire == true)
{
breathTimer = 0;
}
if (((kbState.IsKeyDown(Keys.Z) &&
kbState.IsKeyUp(Keys.A)) || (gpState.IsButtonDown(Buttons.Y) && gpState.IsButtonUp
(Buttons.X))) && drgnOnGround == true && lastKeyZ == false && usingClaw == false &&
clawNoMove == false && drgnFlight == false && waterfallKnockback == false &&
drgnGrab == false)
{
if (drgnAction != 3 && lastKeyZ ==
false)
{
drgnAction = 3;
drgnCT = 0;
drgnFrame = 0;
}
if (drgnAction == 3 && lastKeyZ == true)
{
drgnAction = 0;
drgnCT = 0;
drgnFrame = 0;
}
if (usingClaw == false && lastKeyZ ==
false)
{
usingClaw = true;
clawNoMove = true;
}
if (usingClaw == false && lastKeyZ ==
true)
{
usingClaw = false;
clawNoMove = false;
}
drgnWait = false;
drgnWaitTimer = 0;
drgnIdle = false;
lastKeyZ = true;
if (slashPlay == false)
{
slashPlay = true;
}
}
if (((kbState.IsKeyDown(Keys.Z) &&
kbState.IsKeyDown(Keys.A)) || (gpState.IsButtonDown(Buttons.Y) &&
gpState.IsButtonDown(Buttons.X))) && drgnFire == true && waterfallKnockback ==
false)
{
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
}
if (kbState.IsKeyUp(Keys.Z) &&
gpState.IsButtonUp(Buttons.Y) && usingClaw == false)
{
lastKeyZ = false;
}
if (drgnOnGround == true &&
(((kbState.IsKeyDown(Keys.Right) || (gpState.ThumbSticks.Left.X >= 0.4f &&
gpState.ThumbSticks.Left.X > -0.4f && gpState.ThumbSticks.Left.Y > -0.8f)) &&
(kbState.IsKeyDown(Keys.Left) || (gpState.ThumbSticks.Left.X <= -0.4f &&
gpState.ThumbSticks.Left.X < 0.4f && gpState.ThumbSticks.Left.Y > -0.8f))) ||
((kbState.IsKeyDown(Keys.Right) || (gpState.ThumbSticks.Left.X >= 0.4f &&
gpState.ThumbSticks.Left.X > -0.4f && gpState.ThumbSticks.Left.Y > -0.8f)) &&
(kbState.IsKeyDown(Keys.Down) || (gpState.ThumbSticks.Left.X > -0.4f &&
gpState.ThumbSticks.Left.X < 0.4f && gpState.ThumbSticks.Left.Y <= -0.8f))) ||
((kbState.IsKeyDown(Keys.Left) || (gpState.ThumbSticks.Left.X <= -0.4f &&
gpState.ThumbSticks.Left.X < 0.4f && gpState.ThumbSticks.Left.Y > -0.8f)) &&
(kbState.IsKeyDown(Keys.Down) || (gpState.ThumbSticks.Left.X > -0.4f &&
gpState.ThumbSticks.Left.X < 0.4f && gpState.ThumbSticks.Left.Y <= -0.8f)))) &&
drgnFire == false && usingClaw == false && waterfallKnockback == false)
{
if (drgnAction != 0)
{
drgnAction = 0;
drgnCT = 0;
drgnFrame = 0;
}
drgnWait = true;
}
if (((kbState.IsKeyDown(Keys.Q) &&
kbState.IsKeyUp(Keys.A)) || (gpState.IsButtonDown(Buttons.LeftShoulder) &&
gpState.IsButtonUp(Buttons.X))) && underwaterBreath == false)
{
if (lastKeyQ == false)
{
lastKeyQ = true;
lastKeyW = true;
breathType--;
if (tutorialOn == true &&
seenTutorial == true)
{
tutorialOn = false;
}
if (breathType < 0)
{
breathType = 4;
}
if (breathType == 4 && haveGanja ==
false)
{
breathType = 3;
}
if (breathType == 3 && haveAcid ==
false)
{
breathType = 2;
}
if (breathType == 2 && haveFrost ==
false)
{
breathType = 1;
}
if (breathType == 1 && haveBolt ==
false)
{
breathType = 0;
}
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
}
if (((kbState.IsKeyDown(Keys.W) &&
kbState.IsKeyUp(Keys.A)) || (gpState.IsButtonDown(Buttons.RightShoulder) &&
gpState.IsButtonUp(Buttons.X))) && underwaterBreath == false)
{
if (lastKeyW == false)
{
lastKeyW = true;
lastKeyQ = true;
breathType++;
if (tutorialOn == true &&
seenTutorial == true)
{
tutorialOn = false;
}
if (breathType >= 5)
{
breathType = 0;
}
if (breathType == 1 && haveBolt ==
false)
{
breathType = 2;
}
if (breathType == 2 && haveFrost ==
false)
{
breathType = 3;
}
if (breathType == 3 && haveAcid ==
false)
{
breathType = 4;
}
if (breathType == 4 && haveGanja ==
false)
{
breathType = 0;
}
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
}
if (((kbState.IsKeyDown(Keys.Q) &&
kbState.IsKeyDown(Keys.W) && kbState.IsKeyUp(Keys.A)) || (gpState.IsButtonDown
(Buttons.LeftShoulder) && gpState.IsButtonDown(Buttons.RightShoulder) &&
gpState.IsButtonUp(Buttons.X))) && underwaterBreath == false)
{
lastKeyW = true;
lastKeyQ = true;
breathType = 0;
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
if ((kbState.IsKeyDown(Keys.X) ||
gpState.IsButtonDown(Buttons.A)) && drgnOnGround == false)
{
xWhileJumping = true;
}
if (stageHome == true && (kbState.IsKeyDown
(Keys.C) || gpState.IsButtonDown(Buttons.Back)) && levelUpMenu == false && lastKeyC
== false)
{
menuPos = 0;
levelPointerX = -360;
levelPointerY = 175;
lastKeyC = true;
if (pageTurnPlay == false)
{
pageTurnPlay = true;
}
levelUpMenu = true;
if (levelPageOn == false)
{
levelPageOn = true;
}
}
#endregion
if (drgnOnGround == false && drgnFlight ==
false)
{
if (dkcFall < 41 && drgnKnockback ==
false)
{
dkcFall++;
}
if (whiteMatte == false)
{
drgnY = drgnY + drgnYvel;
}
if (drgnUnderwater == false)
{
if (drgnYvel <= 0 && drgnY_CT >= 6)
{
drgnYvel++;
drgnY_CT = 0;
if ((kbState.IsKeyUp(Keys.X) &&
gpState.IsButtonUp(Buttons.A)) && drgnYvel < 0)
{
drgnYvel = (drgnYvel * 3 /
4);
}
}
if (drgnYvel > 0 && drgnYvel < 9 &&
drgnY_CT >= 5)
{
drgnYvel++;
drgnY_CT = 0;
}
if (inMud == true)
{
if (drgnYvel > 0)
{
drgnYvel = 1;
}
}
}
else if (drgnUnderwater == true)
{
if (drgnYvel <= 0 && drgnY_CT >= 8)
{
drgnYvel++;
drgnY_CT = 0;
if ((kbState.IsKeyUp(Keys.X) &&
gpState.IsButtonUp(Buttons.A)) && drgnYvel < 0)
{
drgnYvel = (drgnYvel * 3 /
4);
}
}
if (drgnYvel > 0 && drgnYvel < 7 &&
drgnY_CT >= 6)
{
drgnYvel++;
drgnY_CT = 0;
}
}
if (drgnYvel > 0)
{
if (drgnAction != 5 && drgnAction !=
3 && drgnAction != 2 && waterfallKnockback == false)
{
drgnAction = 5;
drgnCT = 0;
drgnFrame = 0;
}
}
if (drgnYvel <= 0)
{
if (drgnAction != 4 && drgnAction !=
3 && drgnAction != 2 && waterfallKnockback == false)
{
drgnAction = 4;
drgnCT = 0;
drgnFrame = 0;
}
}
}
else if (drgnOnGround == true)
{
drgnFlight = false;
drgnYvel = 0;
drgnY_CT = 0;
dkcFall = 0;
}
}
#endregion
//END DRAGON CONTROLS
//Level up menu controls
#region Level Up Menu Controls
if (levelUpMenu == true)
{
#region pageturn
{
if (levelPageOn == true && levelPageOff
== false)
{
storyFGFrameCT++;
if (storyFGFrameY1 >= 3 &&
storyFGFrameX1 >= 2)
{
levelPageOn = false;
}
else if (storyFGFrameCT >= 6)
{
storyFGFrameCT = 0;
if (storyFGFrameY1 < 5 &&
storyFGFrameX1 < 3)
{
storyFGFrameY1++;
}
if (storyFGFrameY1 >= 5 &&
storyFGFrameX1 < 3)
{
storyFGFrameY1 = 0;
storyFGFrameX1++;
}
}
}
if (levelPageOff == true)
{
storyFGFrameCT++;
if (storyFGFrameY1 <= 0 &&
storyFGFrameX1 <= 0)
{
levelUpMenu = false;
levelPageOff = false;
}
else if (storyFGFrameCT >= 6)
{
storyFGFrameCT = 0;
if (storyFGFrameY1 >= 0 &&
storyFGFrameX1 >= 0)
{
storyFGFrameY1--;
}
if (storyFGFrameY1 < 0 &&
storyFGFrameX1 >= 0)
{
storyFGFrameY1 = 4;
storyFGFrameX1--;
}
}
}
}
#endregion
if (levelPageOn == false)
{
if (gpState.IsButtonDown(Buttons.Back)
&& lastKeyC == false)
{
lastKeyC = true;
if (pageTurnPlay == false &&
storyFGFrameX1 >= 2 && storyFGFrameY1 >= 3)
{
pageTurnPlay = true;
}
levelPageOn = false;
levelPageOff = true;
}
if (menuPos == 0)
{
levelPointerX = -360;
levelPointerY = 175;
if (((kbState.IsKeyDown(Keys.C) &&
kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.Down)) || (gpState.IsButtonDown
(Buttons.A) && gpState.ThumbSticks.Left.Y < 0.8f && gpState.ThumbSticks.Left.Y > -
0.8f)) && lastKeyC == false)
{
lastKeyC = true;
if (atkLevel == 0 &&
goldAvailable >= 500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 500;
updateGold = true;
breathMaxBonus = 60;
atkLevel = 1;
}
else if (atkLevel == 1 &&
goldAvailable >= 1000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 1000;
updateGold = true;
breathDmgBonus = 1;
drgnBreathTotal =
breathDmgBonus + breathDmg + breathDmgTreasure1 + breathDmgTreasure2 + breathLV;
atkLevel = 2;
#region Breath
#region ten
if (drgnBreathTotal - 90 >=
0)
{
breathTen = 9;
}
else if (drgnBreathTotal -
80 >= 0)
{
breathTen = 8;
}
else if (drgnBreathTotal -
70 >= 0)
{
breathTen = 7;
}
else if (drgnBreathTotal -
60 >= 0)
{
breathTen = 6;
}
else if (drgnBreathTotal -
50 >= 0)
{
breathTen = 5;
}
else if (drgnBreathTotal -
40 >= 0)
{
breathTen = 4;
}
else if (drgnBreathTotal -
30 >= 0)
{
breathTen = 3;
}
else if (drgnBreathTotal -
20 >= 0)
{
breathTen = 2;
}
else if (drgnBreathTotal -
10 >= 0)
{
breathTen = 1;
}
else if (drgnBreathTotal -
10 < 0)
{
breathTen = 0;
}
#endregion
#region one
if ((drgnBreathTotal -
((breathTen * 10))) - 9 >= 0)
{
breathOne = 9;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 8 >= 0)
{
breathOne = 8;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 7 >= 0)
{
breathOne = 7;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 6 >= 0)
{
breathOne = 6;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 5 >= 0)
{
breathOne = 5;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 4 >= 0)
{
breathOne = 4;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 3 >= 0)
{
breathOne = 3;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 2 >= 0)
{
breathOne = 2;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 1 >= 0)
{
breathOne = 1;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 1 <= 0)
{
breathOne = 0;
}
#endregion
#endregion
}
else if (atkLevel == 2 &&
goldAvailable >= 1500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 1500;
updateGold = true;
clawDmgBonus = 3;
drgnClawTotal = clawDmgBonus
+ clawDmg + clawDmgTreasure1 + clawDmgTreasure2 + clawLV;
atkLevel = 3;
#region Claw
#region ten
if (drgnClawTotal - 90 >= 0)
{
clawTen = 9;
}
else if (drgnClawTotal - 80
>= 0)
{
clawTen = 8;
}
else if (drgnClawTotal - 70
>= 0)
{
clawTen = 7;
}
else if (drgnClawTotal - 60
>= 0)
{
clawTen = 6;
}
else if (drgnClawTotal - 50
>= 0)
{
clawTen = 5;
}
else if (drgnClawTotal - 40
>= 0)
{
clawTen = 4;
}
else if (drgnClawTotal - 30
>= 0)
{
clawTen = 3;
}
else if (drgnClawTotal - 20
>= 0)
{
clawTen = 2;
}
else if (drgnClawTotal - 10
>= 0)
{
clawTen = 1;
}
else if (drgnClawTotal - 10
< 0)
{
clawTen = 0;
}
#endregion
#region one
if ((drgnClawTotal -
((clawTen * 10))) - 9 >= 0)
{
clawOne = 9;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 8 >= 0)
{
clawOne = 8;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 7 >= 0)
{
clawOne = 7;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 6 >= 0)
{
clawOne = 6;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 5 >= 0)
{
clawOne = 5;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 4 >= 0)
{
clawOne = 4;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 3 >= 0)
{
clawOne = 3;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 2 >= 0)
{
clawOne = 2;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 1 >= 0)
{
clawOne = 1;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 1 <= 0)
{
clawOne = 0;
}
#endregion
#endregion
}
else if (atkLevel == 3 &&
goldAvailable >= 2500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 2500;
updateGold = true;
breathMaxBonus = 120;
atkLevel = 4;
}
else if (atkLevel == 4 &&
goldAvailable >= 3500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 3500;
updateGold = true;
breathCritBonus = 2;
atkLevel = 5;
}
else if (atkLevel == 5 &&
goldAvailable >= 5000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 5000;
updateGold = true;
breathCycleBonus = 60;
atkLevel = 6;
}
else
{
if (menuNoPlay == false)
{
menuNoPlay = true;
}
}
}
}
if (menuPos == 1)
{
levelPointerX = -360;
levelPointerY = 292;
if (((kbState.IsKeyDown(Keys.C) &&
kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.Down)) || (gpState.IsButtonDown
(Buttons.A) && gpState.ThumbSticks.Left.Y < 0.8f && gpState.ThumbSticks.Left.Y > -
0.8f)) && lastKeyC == false)
{
lastKeyC = true;
if (defLevel == 0 &&
goldAvailable >= 500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 500;
updateGold = true;
drgnHPBonus = 1;
printHPMax = 6 + drgnHPLV +
drgnHPBonus + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
defLevel = 1;
printHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPNow = drgnHPMax;
#region HP
#region ten
if (printHPMax - 90 >= 0)
{
hpTen = 9;
}
else if (printHPMax - 80 >=
0)
{
hpTen = 8;
}
else if (printHPMax - 70 >=
0)
{
hpTen = 7;
}
else if (printHPMax - 60 >=
0)
{
hpTen = 6;
}
else if (printHPMax - 50 >=
0)
{
hpTen = 5;
}
else if (printHPMax - 40 >=
0)
{
hpTen = 4;
}
else if (printHPMax - 30 >=
0)
{
hpTen = 3;
}
else if (printHPMax - 20 >=
0)
{
hpTen = 2;
}
else if (printHPMax - 10 >=
0)
{
hpTen = 1;
}
else if (printHPMax - 10 <
0)
{
hpTen = 0;
}
#endregion
#region one
if ((printHPMax - ((hpTen *
10))) - 9 >= 0)
{
hpOne = 9;
}
else if ((printHPMax -
((hpTen * 10))) - 8 >= 0)
{
hpOne = 8;
}
else if ((printHPMax -
((hpTen * 10))) - 7 >= 0)
{
hpOne = 7;
}
else if ((printHPMax -
((hpTen * 10))) - 6 >= 0)
{
hpOne = 6;
}
else if ((printHPMax -
((hpTen * 10))) - 5 >= 0)
{
hpOne = 5;
}
else if ((printHPMax -
((hpTen * 10))) - 4 >= 0)
{
hpOne = 4;
}
else if ((printHPMax -
((hpTen * 10))) - 3 >= 0)
{
hpOne = 3;
}
else if ((printHPMax -
((hpTen * 10))) - 2 >= 0)
{
hpOne = 2;
}
else if ((printHPMax -
((hpTen * 10))) - 1 >= 0)
{
hpOne = 1;
}
else if ((printHPMax -
((hpTen * 10))) - 1 <= 0)
{
hpOne = 0;
}
#endregion
#endregion
}
else if (defLevel == 1 &&
goldAvailable >= 1000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 1000;
updateGold = true;
drgnHPBonus = 2;
printHPMax = 6 + drgnHPLV +
drgnHPBonus + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
defLevel = 2;
printHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPNow = drgnHPMax;
#region HP
#region ten
if (printHPMax - 90 >= 0)
{
hpTen = 9;
}
else if (printHPMax - 80 >=
0)
{
hpTen = 8;
}
else if (printHPMax - 70 >=
0)
{
hpTen = 7;
}
else if (printHPMax - 60 >=
0)
{
hpTen = 6;
}
else if (printHPMax - 50 >=
0)
{
hpTen = 5;
}
else if (printHPMax - 40 >=
0)
{
hpTen = 4;
}
else if (printHPMax - 30 >=
0)
{
hpTen = 3;
}
else if (printHPMax - 20 >=
0)
{
hpTen = 2;
}
else if (printHPMax - 10 >=
0)
{
hpTen = 1;
}
else if (printHPMax - 10 <
0)
{
hpTen = 0;
}
#endregion
#region one
if ((printHPMax - ((hpTen *
10))) - 9 >= 0)
{
hpOne = 9;
}
else if ((printHPMax -
((hpTen * 10))) - 8 >= 0)
{
hpOne = 8;
}
else if ((printHPMax -
((hpTen * 10))) - 7 >= 0)
{
hpOne = 7;
}
else if ((printHPMax -
((hpTen * 10))) - 6 >= 0)
{
hpOne = 6;
}
else if ((printHPMax -
((hpTen * 10))) - 5 >= 0)
{
hpOne = 5;
}
else if ((printHPMax -
((hpTen * 10))) - 4 >= 0)
{
hpOne = 4;
}
else if ((printHPMax -
((hpTen * 10))) - 3 >= 0)
{
hpOne = 3;
}
else if ((printHPMax -
((hpTen * 10))) - 2 >= 0)
{
hpOne = 2;
}
else if ((printHPMax -
((hpTen * 10))) - 1 >= 0)
{
hpOne = 1;
}
else if ((printHPMax -
((hpTen * 10))) - 1 <= 0)
{
hpOne = 0;
}
#endregion
#endregion
}
else if (defLevel == 2 &&
goldAvailable >= 1500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 1500;
updateGold = true;
drgnHPBonus = 3;
printHPMax = 6 + drgnHPLV +
drgnHPBonus + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
defLevel = 3;
printHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPNow = drgnHPMax;
#region HP
#region ten
if (printHPMax - 90 >= 0)
{
hpTen = 9;
}
else if (printHPMax - 80 >=
0)
{
hpTen = 8;
}
else if (printHPMax - 70 >=
0)
{
hpTen = 7;
}
else if (printHPMax - 60 >=
0)
{
hpTen = 6;
}
else if (printHPMax - 50 >=
0)
{
hpTen = 5;
}
else if (printHPMax - 40 >=
0)
{
hpTen = 4;
}
else if (printHPMax - 30 >=
0)
{
hpTen = 3;
}
else if (printHPMax - 20 >=
0)
{
hpTen = 2;
}
else if (printHPMax - 10 >=
0)
{
hpTen = 1;
}
else if (printHPMax - 10 <
0)
{
hpTen = 0;
}
#endregion
#region one
if ((printHPMax - ((hpTen *
10))) - 9 >= 0)
{
hpOne = 9;
}
else if ((printHPMax -
((hpTen * 10))) - 8 >= 0)
{
hpOne = 8;
}
else if ((printHPMax -
((hpTen * 10))) - 7 >= 0)
{
hpOne = 7;
}
else if ((printHPMax -
((hpTen * 10))) - 6 >= 0)
{
hpOne = 6;
}
else if ((printHPMax -
((hpTen * 10))) - 5 >= 0)
{
hpOne = 5;
}
else if ((printHPMax -
((hpTen * 10))) - 4 >= 0)
{
hpOne = 4;
}
else if ((printHPMax -
((hpTen * 10))) - 3 >= 0)
{
hpOne = 3;
}
else if ((printHPMax -
((hpTen * 10))) - 2 >= 0)
{
hpOne = 2;
}
else if ((printHPMax -
((hpTen * 10))) - 1 >= 0)
{
hpOne = 1;
}
else if ((printHPMax -
((hpTen * 10))) - 1 <= 0)
{
hpOne = 0;
}
#endregion
#endregion
}
else if (defLevel == 3 &&
goldAvailable >= 2000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 2000;
updateGold = true;
spikeDRBonus = 2;
defLevel = 4;
}
else if (defLevel == 4 &&
goldAvailable >= 3000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 3000;
updateGold = true;
drgnHPBonus = 4;
printHPMax = 6 + drgnHPLV +
drgnHPBonus + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
defLevel = 5;
printHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPNow = drgnHPMax;
#region HP
#region ten
if (printHPMax - 90 >= 0)
{
hpTen = 9;
}
else if (printHPMax - 80 >=
0)
{
hpTen = 8;
}
else if (printHPMax - 70 >=
0)
{
hpTen = 7;
}
else if (printHPMax - 60 >=
0)
{
hpTen = 6;
}
else if (printHPMax - 50 >=
0)
{
hpTen = 5;
}
else if (printHPMax - 40 >=
0)
{
hpTen = 4;
}
else if (printHPMax - 30 >=
0)
{
hpTen = 3;
}
else if (printHPMax - 20 >=
0)
{
hpTen = 2;
}
else if (printHPMax - 10 >=
0)
{
hpTen = 1;
}
else if (printHPMax - 10 <
0)
{
hpTen = 0;
}
#endregion
#region one
if ((printHPMax - ((hpTen *
10))) - 9 >= 0)
{
hpOne = 9;
}
else if ((printHPMax -
((hpTen * 10))) - 8 >= 0)
{
hpOne = 8;
}
else if ((printHPMax -
((hpTen * 10))) - 7 >= 0)
{
hpOne = 7;
}
else if ((printHPMax -
((hpTen * 10))) - 6 >= 0)
{
hpOne = 6;
}
else if ((printHPMax -
((hpTen * 10))) - 5 >= 0)
{
hpOne = 5;
}
else if ((printHPMax -
((hpTen * 10))) - 4 >= 0)
{
hpOne = 4;
}
else if ((printHPMax -
((hpTen * 10))) - 3 >= 0)
{
hpOne = 3;
}
else if ((printHPMax -
((hpTen * 10))) - 2 >= 0)
{
hpOne = 2;
}
else if ((printHPMax -
((hpTen * 10))) - 1 >= 0)
{
hpOne = 1;
}
else if ((printHPMax -
((hpTen * 10))) - 1 <= 0)
{
hpOne = 0;
}
#endregion
#endregion
}
else if (defLevel == 5 &&
goldAvailable >= 6000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 6000;
updateGold = true;
drgnDRBonus = 1;
defLevel = 6;
}
else
{
if (menuNoPlay == false)
{
menuNoPlay = true;
}
}
}
}
if (menuPos == 2)
{
levelPointerX = -360;
levelPointerY = 409;
if (((kbState.IsKeyDown(Keys.C) &&
kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.Down)) || (gpState.IsButtonDown
(Buttons.A) && gpState.ThumbSticks.Left.Y < 0.8f && gpState.ThumbSticks.Left.Y > -
0.8f)) && lastKeyC == false)
{
lastKeyC = true;
if (sptLevel == 0 &&
goldAvailable >= 500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 500;
updateGold = true;
drgnFlyBonus = 30;
sptLevel = 1;
}
else if (sptLevel == 1 &&
goldAvailable >= 1000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 1000;
updateGold = true;
drgnFlyBonus = 60;
sptLevel = 2;
}
else if (sptLevel == 2 &&
goldAvailable >= 2500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 2500;
updateGold = true;
freezeTimeBonus = 60;
sptLevel = 3;
}
else if (sptLevel == 3 &&
goldAvailable >= 3000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 3000;
updateGold = true;
preserveGP = 1;
sptLevel = 4;
}
else if (sptLevel == 4 &&
goldAvailable >= 5000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 5000;
updateGold = true;
acidArmorRedBonus = 1;
sptLevel = 5;
}
else if (sptLevel == 5 &
goldAvailable >= 6000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 6000;
updateGold = true;
EXPReducer = 2;
sptLevel = 6;
}
else
{
if (menuNoPlay == false)
{
menuNoPlay = true;
}
}
}
}
if (menuPos == 3)
{
levelPointerX = -360;
levelPointerY = 555;
if (((kbState.IsKeyDown(Keys.C) &&
kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.Down)) || (gpState.IsButtonDown
(Buttons.A) && gpState.ThumbSticks.Left.Y < 0.8f && gpState.ThumbSticks.Left.Y > -
0.8f)) && lastKeyC == false)
{
lastKeyC = true;
if (pageTurnPlay == false &&
storyFGFrameX1 >= 2 && storyFGFrameY1 >= 3)
{
pageTurnPlay = true;
}
levelPageOn = false;
levelPageOff = true;
}
else if (((kbState.IsKeyDown(Keys.X)
&& kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.Down)) || (gpState.IsButtonDown
(Buttons.B) && gpState.ThumbSticks.Left.Y < 0.8f && gpState.ThumbSticks.Left.Y > -
0.8f)) && lastKeyX == false)
{
lastKeyX = true;
if (pageTurnPlay == false &&
storyFGFrameX1 >= 2 && storyFGFrameY1 >= 3)
{
pageTurnPlay = true;
}
levelPageOn = false;
levelPageOff = true;
}
}
if (((kbState.IsKeyDown(Keys.Down) &&
kbState.IsKeyUp(Keys.Up) && kbState.IsKeyUp(Keys.C) && kbState.IsKeyUp(Keys.X)) ||
(gpState.ThumbSticks.Left.Y <= -0.8 && gpState.IsButtonUp(Buttons.A) &&
gpState.IsButtonUp(Buttons.B))) && lastKeyDown == false)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
menuPos++;
if (menuPos > 3)
{
menuPos = 0;
}
}
if (((kbState.IsKeyDown(Keys.Up) &&
kbState.IsKeyUp(Keys.Down) && kbState.IsKeyUp(Keys.C) && kbState.IsKeyUp(Keys.X)) ||
(gpState.ThumbSticks.Left.Y >= 0.8 && gpState.IsButtonUp(Buttons.A) &&
gpState.IsButtonUp(Buttons.B))) && lastKeyUp == false)
{
lastKeyUp = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
menuPos--;
if (menuPos < 0)
{
menuPos = 3;
}
}
if ((kbState.IsKeyDown(Keys.X) ||
gpState.IsButtonDown(Buttons.B)) && lastKeyX == false)
{
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
menuPos = 3;
lastKeyX = true;
}
}
}
#endregion
//End level up menu controls
}
if (controlType == 1)
{
#region Outside Level Up Menu
if (drgnKnockback == false && levelUpMenu ==
false)
{
if (drgnWait == true)
{
if (drgnOnGround == true &&
drgnUnderwater == false)
{
drgnWaitTimer++;
}
if (drgnWaitTimer >= 300)
{
drgnAction = 8;
if (drgnIdle == false)
{
drgnIdle = true;
if (whistleRandom == -1)
{
whistleRandom =
generateRandom.Next(0, 9);
}
}
}
}
if (waterfallKnockback == true)
{
if (drgnAction != 7)
{
drgnCT = 0;
drgnAction = 7;
drgnFrame = 0;
}
}
if (drgnOnGround == true && drgnFlyNow !=
drgnFlyMax && lastKeyX == false && drgnKnockback == false && xWhileJumping == false)
{
drgnFlyNow = drgnFlyMax;
}
if (drgnAction == 5 || drgnAction == 4)
{
if (drgnFrame >= 5)
{
drgnFrame = 5;
}
}
#region PAUSE
if (endOfStage == false && stageExit ==
false && defeated == false && treasurePickUp == false && (kbState.IsKeyDown
(Keys.Enter) || gpState.IsButtonDown(Buttons.Start)) && lastKeyEsc == false)
{
lastKeyEsc = true;
actionStagePause = true;
showPause = true;
toggleTutorial = 0;
if (stage5e2 == true || (stage4e3 ==
true && from4e1 == true) || stage6eB == true)
{
play5e2Top.pauseBGM();
play5e2Bottom.pauseBGM();
}
else
{
playStageMusic.pauseBGM();
}
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
if (stage1eB == true)
{
loopThunderBlast.pauseSFX();
}
}
#endregion
if ((upTrue == true ||
gpState.ThumbSticks.Left.Y > 0.4f) && stageHome == true && lastDirUp == false)
{
pressUp = true;
lastDirUp = true;
}
if (((rightTrue == false && leftTrue ==
false && downTrue == false) && (gpState.ThumbSticks.Left.X > -0.4f &&
gpState.ThumbSticks.Left.X < 0.4f && gpState.ThumbSticks.Left.Y > -0.8f)) &&
drgnAction != 0 && usingClaw == false && drgnOnGround == true && drgnIdle == false
&& drgnFire == false && waterfallKnockback == false && drgnGrab == false)
{
if (drgnAction != 0)
{
drgnCT = 0;
drgnFrame = 0;
}
drgnAction = 0;
drgnWait = true;
}
if (((rightTrue == true && leftTrue == false
&& downTrue == false) || (gpState.ThumbSticks.Left.X >= 0.4f &&
gpState.ThumbSticks.Left.X > -0.4f && gpState.ThumbSticks.Left.Y > -0.8f)) &&
drgnFire == false && clawNoMove == false && waterfallKnockback == false && drgnGrab
== false)
{
if (drgnFaceR == false)
{
drgnFacingDir = 0;
clawDir = 0;
breathDir = 0;
clawX = 127;
breathX = 110;
drgnFaceR = true;
}
if (drgnAction != 1 && drgnOnGround ==
true && dragonDash == false)
{
drgnAction = 1;
drgnCT = 0;
drgnFrame = 0;
}
else if (drgnAction != 11 &&
drgnOnGround == true && dragonDash == true)
{
drgnAction = 11;
drgnCT = 0;
drgnFrame = 0;
}
if (boat1TouchR == true)
{
if (boat1Right == false)
{
if (boat1Vel <= 0)
{
boat1Vel = 1;
}
}
}
if (boat2TouchR == true)
{
if (boat2Right == false)
{
if (boat2Vel <= 0)
{
boat2Vel = 1;
}
}
}
if (touchWallR == false && touchRe1 ==
false && touchRe2 == false && touchRe3 == false && touchRe4 == false && touchRe5 ==
false && touchRe6 == false && touchRe7 == false && touchRe8 == false && touchRe9 ==
false && touchRe10 == false && duckStop == false)
{
if (((rightTrue == true &&
(gpState.ThumbSticks.Left.X < 0.4f && gpState.ThumbSticks.Left.X > -0.4f)) ||
(rightTrue == false && (gpState.ThumbSticks.Left.X >= 0.4f &&
gpState.ThumbSticks.Left.X > -0.4f))) && leftTrue == false && downTrue == false)
{
if (inMud == false)
{
if (drgnUnderwater == true)
{
drgnX++;
drgnX++;
drgnX++;
}
else
{
drgnX++;
drgnX++;
drgnX++;
drgnX++;
drgnX++;
if (dragonDash == true)
{
drgnX++;
drgnX++;
}
}
}
else
{
drgnX++;
}
}
}
if (stage3e3 == true && touchWallR ==
true && drgnY == 2049)
{
if (guardAct != 1)
{
guardFrame = 0;
guardCT = 0;
guardAct = 1;
}
}
drgnWait = false;
drgnWaitTimer = 0;
drgnIdle = false;
}
if (((leftTrue == true && rightTrue == false
&& downTrue == false) || (gpState.ThumbSticks.Left.X <= -0.4f &&
gpState.ThumbSticks.Left.X < 0.4f && gpState.ThumbSticks.Left.Y > -0.8f)) &&
drgnFire == false && clawNoMove == false && waterfallKnockback == false && drgnGrab
== false)
{
if (drgnAction != 1 && drgnOnGround ==
true && dragonDash == false)
{
drgnAction = 1;
drgnCT = 0;
drgnFrame = 0;
}
else if (drgnAction != 11 &&
drgnOnGround == true && dragonDash == true)
{
drgnAction = 11;
drgnCT = 0;
drgnFrame = 0;
}
if (drgnFaceR == true)
{
drgnFacingDir = 13;
clawDir = 2;
breathDir = 6;
clawX = -80 - clawhitboxmod;
breathX = -196;
drgnFaceR = false;
}
if (boat1TouchL == true)
{
if (boat1Left == false)
{
if (boat1Vel >= 0)
{
boat1Vel = -1;
}
}
}
if (boat2TouchL == true)
{
if (boat2Left == false)
{
if (boat2Vel >= 0)
{
boat2Vel = -1;
}
}
}
if (touchWallL == false && touchLe1 ==
false && touchLe2 == false && touchLe3 == false && touchLe4 == false && touchLe5 ==
false && touchLe6 == false && touchLe7 == false && touchLe8 == false && touchLe9 ==
false && touchLe10 == false && duckStop == false)
{
if (((leftTrue == true &&
(gpState.ThumbSticks.Left.X < 0.4f && gpState.ThumbSticks.Left.X > -0.4f)) ||
(leftTrue == false && (gpState.ThumbSticks.Left.X < 0.4f &&
gpState.ThumbSticks.Left.X <= -0.4f))) && rightTrue == false && downTrue == false)
{
if (inMud == false)
{
if (drgnUnderwater == true)
{
drgnX--;
drgnX--;
drgnX--;
}
else
{
drgnX--;
drgnX--;
drgnX--;
drgnX--;
drgnX--;
if (dragonDash == true)
{
drgnX--;
drgnX--;
}
}
}
else
{
drgnX--;
}
}
}
drgnWait = false;
drgnWaitTimer = 0;
drgnIdle = false;
}
if (((downTrue == true && leftTrue == false
&& rightTrue == false && breathTrue == false) || (gpState.ThumbSticks.Left.X > -0.4f
&& gpState.ThumbSticks.Left.X < 0.4f && gpState.ThumbSticks.Left.Y <= -0.8f &&
gpState.IsButtonUp(Buttons.X))) && drgnFlight == false && clawNoMove == false &&
drgnOnGround == true && waterfallKnockback == false && drgnGrab == false)
{
if (drgnAction != 9)
{
drgnAction = 9;
drgnCT = 0;
drgnFrame = 0;
}
if (drgnOnGround == true)
{
duckStop = true;
}
else
{
duckStop = false;
}
drgnWait = false;
drgnWaitTimer = 0;
drgnIdle = false;
ducking = 3;
duckingYMod = 70;
}
else
{
if (ducking != 1)
{
duckStop = false;
ducking = 1;
duckingYMod = 0;
}
}
if (drgnUnderwater == false)
{
if ((jumpTrue == true ||
(gpState.IsButtonDown(Buttons.A))) && (drgnOnGround == true || dkcFall < 20) &&
drgnFlight == false && lastKeyX == false && clawNoMove == false && drgnFlyNow > 0 &&
xWhileJumping == false && waterfallKnockback == false && drgnGrab == false)
{
if (drgnAction != 4)
{
drgnAction = 4;
drgnCT = 0;
drgnFrame = 0;
}
if (stageHome == true || stage2e4 ==
true || stage3e3 == true || stage4e2 == true || stage1eB == true || stage2eB == true
|| stage3eB == true || stage4eB == true || stage5eB == true)
{
drgnYvel = -7;
}
else if (stage4e3 == true && drgnX >
11783 && drgnX < 12650 && drgnY > 2526)
{
drgnYvel = -9;
}
else
{
drgnYvel = -8;
}
drgnOnGround = false;
dkcFall = 41;
lastKeyX = true;
if (jumpPlay == false)
{
jumpPlay = true;
}
drgnWait = false;
drgnWaitTimer = 0;
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
usingClaw = false;
drgnIdle = false;
}
if ((jumpTrue == true ||
(gpState.IsButtonDown(Buttons.A))) && drgnOnGround == false && dkcFall >= 20 &&
drgnFlyNow > 0 && lastKeyX == false && inMud == false && waterfallKnockback == false
&& drgnGrab == false)
{
if (drgnAction != 6)
{
drgnAction = 6;
drgnCT = 0;
drgnFrame = 0;
drgnFlyNow = drgnFlyNow - 15;
}
drgnYvel = 0;
drgnFlight = true;
drgnFlyNow--;
drgnFlyXP++;
if (drgnFlyNow <= 0)
{
drgnFlight = false;
}
}
else if ((jumpTrue == false &&
gpState.IsButtonUp(Buttons.A)) && drgnOnGround == false)
{
drgnFlight = false;
}
}
else if (drgnUnderwater == true)
{
if (jumpWait > 0)
{
jumpWait--;
}
if ((jumpTrue == true ||
(gpState.IsButtonDown(Buttons.A))) && drgnFlight == false && lastKeyX == false &&
clawNoMove == false && xWhileJumping == false && waterfallKnockback == false &&
drgnGrab == false && jumpWait <= 0)
{
if (drgnAction != 4)
{
drgnAction = 4;
drgnCT = 0;
drgnFrame = 0;
}
drgnYvel = -8;
drgnOnGround = false;
lastKeyX = true;
dkcFall = 41;
if (waterjumpPlay == false)
{
waterjumpPlay = true;
}
drgnWait = false;
drgnWaitTimer = 0;
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
usingClaw = false;
drgnIdle = false;
}
}
if (((breathTrue == true && clawTrue ==
false && downTrue == false) || (gpState.IsButtonDown(Buttons.X) &&
gpState.IsButtonUp(Buttons.Y) && gpState.ThumbSticks.Left.Y > -0.8f)) &&
drgnOnGround == true && clawNoMove == false && drgnFlight == false && breathNow > 0
&& waterfallKnockback == false && grabSlam == false)
{
if (lastKeyA == false)
{
lastKeyA = true;
if (breathNow - 30 > 0)
{
breathNow -= 30;
}
else
{
breathNow = 1;
}
breathFrame = 0;
}
if (underwaterBreath == false)
{
if (breathNow > 0)
{
drgnFire = true;
if (drgnAction != 2)
{
drgnAction = 2;
drgnCT = 0;
drgnFrame = 0;
}
breathNow--;
breathMaxXP++;
}
}
else if (underwaterBreath == true)
{
if (breathNow > 0)
{
drgnFire = true;
if (drgnAction != 7)
{
drgnAction = 7;
drgnCT = 0;
drgnFrame = 0;
}
breathNow--;
}
}
if (breathNow <= 0)
{
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
}
drgnWait = false;
drgnWaitTimer = 0;
drgnIdle = false;
}
else if ((breathTrue == false &&
gpState.IsButtonUp(Buttons.X)) && drgnFire == true)
{
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
lastKeyA = false;
}
if (drgnFire == true)
{
breathTimer = 0;
}
if (((clawTrue == true && breathTrue ==
false) || (gpState.IsButtonDown(Buttons.Y) && gpState.IsButtonUp(Buttons.X))) &&
drgnOnGround == true && lastKeyZ == false && usingClaw == false && clawNoMove ==
false && drgnFlight == false && waterfallKnockback == false && drgnGrab == false)
{
if (drgnAction != 3 && lastKeyZ ==
false)
{
drgnAction = 3;
drgnCT = 0;
drgnFrame = 0;
}
if (drgnAction == 3 && lastKeyZ == true)
{
drgnAction = 0;
drgnCT = 0;
drgnFrame = 0;
}
if (usingClaw == false && lastKeyZ ==
false)
{
usingClaw = true;
clawNoMove = true;
}
if (usingClaw == false && lastKeyZ ==
true)
{
usingClaw = false;
clawNoMove = false;
}
drgnWait = false;
drgnWaitTimer = 0;
drgnIdle = false;
lastKeyZ = true;
if (slashPlay == false)
{
slashPlay = true;
}
}
if (((clawTrue == true && breathTrue ==
true) || (gpState.IsButtonDown(Buttons.Y) && gpState.IsButtonDown(Buttons.X))) &&
drgnFire == true && waterfallKnockback == false)
{
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
}
if (clawTrue == false && gpState.IsButtonUp
(Buttons.Y) && usingClaw == false)
{
lastKeyZ = false;
}
if (drgnOnGround == true && (((rightTrue ==
true || (gpState.ThumbSticks.Left.X >= 0.4f && gpState.ThumbSticks.Left.X > -0.4f &&
gpState.ThumbSticks.Left.Y > -0.8f)) && (leftTrue == true ||
(gpState.ThumbSticks.Left.X <= -0.4f && gpState.ThumbSticks.Left.X < 0.4f &&
gpState.ThumbSticks.Left.Y > -0.8f))) || ((rightTrue == true ||
(gpState.ThumbSticks.Left.X >= 0.4f && gpState.ThumbSticks.Left.X > -0.4f &&
gpState.ThumbSticks.Left.Y > -0.8f)) && (downTrue == true ||
(gpState.ThumbSticks.Left.X > -0.4f && gpState.ThumbSticks.Left.X < 0.4f &&
gpState.ThumbSticks.Left.Y <= -0.8f))) || ((leftTrue == true ||
(gpState.ThumbSticks.Left.X <= -0.4f && gpState.ThumbSticks.Left.X < 0.4f &&
gpState.ThumbSticks.Left.Y > -0.8f)) && (downTrue == true ||
(gpState.ThumbSticks.Left.X > -0.4f && gpState.ThumbSticks.Left.X < 0.4f &&
gpState.ThumbSticks.Left.Y <= -0.8f)))) && drgnFire == false && usingClaw == false
&& waterfallKnockback == false)
{
if (drgnAction != 0)
{
drgnAction = 0;
drgnCT = 0;
drgnFrame = 0;
}
drgnWait = true;
}
if (((swlTrue == true && breathTrue ==
false) || (gpState.IsButtonDown(Buttons.LeftShoulder) && gpState.IsButtonUp
(Buttons.X))) && underwaterBreath == false)
{
if (lastKeyQ == false)
{
lastKeyQ = true;
lastKeyW = true;
breathType--;
if (tutorialOn == true &&
seenTutorial == true)
{
tutorialOn = false;
}
if (breathType < 0)
{
breathType = 4;
}
if (breathType == 4 && haveGanja ==
false)
{
breathType = 3;
}
if (breathType == 3 && haveAcid ==
false)
{
breathType = 2;
}
if (breathType == 2 && haveFrost ==
false)
{
breathType = 1;
}
if (breathType == 1 && haveBolt ==
false)
{
breathType = 0;
}
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
}
if (((swrTrue == true && breathTrue ==
false) || (gpState.IsButtonDown(Buttons.RightShoulder) && gpState.IsButtonUp
(Buttons.X))) && underwaterBreath == false)
{
if (lastKeyW == false)
{
lastKeyW = true;
lastKeyQ = true;
breathType++;
if (tutorialOn == true &&
seenTutorial == true)
{
tutorialOn = false;
}
if (breathType >= 5)
{
breathType = 0;
}
if (breathType == 1 && haveBolt ==
false)
{
breathType = 2;
}
if (breathType == 2 && haveFrost ==
false)
{
breathType = 3;
}
if (breathType == 3 && haveAcid ==
false)
{
breathType = 4;
}
if (breathType == 4 && haveGanja ==
false)
{
breathType = 0;
}
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
}
if (((swlTrue == true && swrTrue == true &&
breathTrue == false) || (gpState.IsButtonDown(Buttons.LeftShoulder) &&
gpState.IsButtonDown(Buttons.RightShoulder) && gpState.IsButtonUp(Buttons.X))) &&
underwaterBreath == false)
{
lastKeyW = true;
lastKeyQ = true;
breathType = 0;
if (drgnUnderwater == false)
{
helpOpacity = 255;
helpCT = 180;
}
}
if ((jumpTrue == true ||
gpState.IsButtonDown(Buttons.A)) && drgnOnGround == false)
{
xWhileJumping = true;
}
if (stageHome == true && (confTrue == true
|| gpState.IsButtonDown(Buttons.Back)) && levelUpMenu == false && lastKeyC == false)
{
menuPos = 0;
levelPointerX = -360;
levelPointerY = 175;
lastKeyC = true;
if (pageTurnPlay == false)
{
pageTurnPlay = true;
}
levelUpMenu = true;
if (levelPageOn == false)
{
levelPageOn = true;
}
}
if (drgnOnGround == false && drgnFlight ==
false)
{
if (dkcFall < 41 && drgnKnockback ==
false)
{
dkcFall++;
}
if (whiteMatte == false)
{
drgnY = drgnY + drgnYvel;
}
if (drgnUnderwater == false)
{
if (drgnYvel <= 0 && drgnY_CT >= 6)
{
drgnYvel++;
drgnY_CT = 0;
if ((jumpTrue == false &&
gpState.IsButtonUp(Buttons.A)) && drgnYvel < 0)
{
drgnYvel = (drgnYvel * 3 /
4);
}
}
if (drgnYvel > 0 && drgnYvel < 9 &&
drgnY_CT >= 5)
{
drgnYvel++;
drgnY_CT = 0;
}
if (inMud == true)
{
if (drgnYvel > 0)
{
drgnYvel = 1;
}
}
}
else if (drgnUnderwater == true)
{
if (drgnYvel <= 0 && drgnY_CT >= 8)
{
drgnYvel++;
drgnY_CT = 0;
if ((jumpTrue == false &&
gpState.IsButtonUp(Buttons.A)) && drgnYvel < 0)
{
drgnYvel = (drgnYvel * 3 /
4);
}
}
if (drgnYvel > 0 && drgnYvel < 7 &&
drgnY_CT >= 6)
{
drgnYvel++;
drgnY_CT = 0;
}
}
if (drgnYvel > 0)
{
if (drgnAction != 5 && drgnAction !=
3 && drgnAction != 2 && waterfallKnockback == false)
{
drgnAction = 5;
drgnCT = 0;
drgnFrame = 0;
}
}
if (drgnYvel <= 0)
{
if (drgnAction != 4 && drgnAction !=
3 && drgnAction != 2 && waterfallKnockback == false)
{
drgnAction = 4;
drgnCT = 0;
drgnFrame = 0;
}
}
}
else if (drgnOnGround == true)
{
drgnFlight = false;
drgnYvel = 0;
drgnY_CT = 0;
dkcFall = 0;
}
}
#endregion
//END DRAGON CONTROLS
//Level up menu controls
#region Level Up Menu Controls
if (levelUpMenu == true)
{
#region pageturn
{
if (levelPageOn == true && levelPageOff
== false)
{
storyFGFrameCT++;
if (storyFGFrameY1 >= 3 &&
storyFGFrameX1 >= 2)
{
levelPageOn = false;
}
else if (storyFGFrameCT >= 6)
{
storyFGFrameCT = 0;
if (storyFGFrameY1 < 5 &&
storyFGFrameX1 < 3)
{
storyFGFrameY1++;
}
if (storyFGFrameY1 >= 5 &&
storyFGFrameX1 < 3)
{
storyFGFrameY1 = 0;
storyFGFrameX1++;
}
}
}
if (levelPageOff == true)
{
storyFGFrameCT++;
if (storyFGFrameY1 <= 0 &&
storyFGFrameX1 <= 0)
{
levelUpMenu = false;
levelPageOff = false;
}
else if (storyFGFrameCT >= 6)
{
storyFGFrameCT = 0;
if (storyFGFrameY1 >= 0 &&
storyFGFrameX1 >= 0)
{
storyFGFrameY1--;
}
if (storyFGFrameY1 < 0 &&
storyFGFrameX1 >= 0)
{
storyFGFrameY1 = 4;
storyFGFrameX1--;
}
}
}
}
#endregion
if (levelPageOn == false)
{
if (gpState.IsButtonDown(Buttons.Back)
&& lastKeyC == false)
{
lastKeyC = true;
if (pageTurnPlay == false &&
storyFGFrameX1 >= 2 && storyFGFrameY1 >= 3)
{
pageTurnPlay = true;
}
levelPageOn = false;
levelPageOff = true;
}
if (menuPos == 0)
{
levelPointerX = -360;
levelPointerY = 175;
if (((confTrue == true && upTrue ==
false && downTrue == false) || (gpState.IsButtonDown(Buttons.A) &&
gpState.ThumbSticks.Left.Y < 0.8f && gpState.ThumbSticks.Left.Y > -0.8f)) &&
lastKeyC == false)
{
lastKeyC = true;
if (atkLevel == 0 &&
goldAvailable >= 500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 500;
updateGold = true;
breathMaxBonus = 60;
atkLevel = 1;
}
else if (atkLevel == 1 &&
goldAvailable >= 1000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 1000;
updateGold = true;
breathDmgBonus = 1;
drgnBreathTotal =
breathDmgBonus + breathDmg + breathDmgTreasure1 + breathDmgTreasure2 + breathLV;
atkLevel = 2;
#region Breath
#region ten
if (drgnBreathTotal - 90 >=
0)
{
breathTen = 9;
}
else if (drgnBreathTotal -
80 >= 0)
{
breathTen = 8;
}
else if (drgnBreathTotal -
70 >= 0)
{
breathTen = 7;
}
else if (drgnBreathTotal -
60 >= 0)
{
breathTen = 6;
}
else if (drgnBreathTotal -
50 >= 0)
{
breathTen = 5;
}
else if (drgnBreathTotal -
40 >= 0)
{
breathTen = 4;
}
else if (drgnBreathTotal -
30 >= 0)
{
breathTen = 3;
}
else if (drgnBreathTotal -
20 >= 0)
{
breathTen = 2;
}
else if (drgnBreathTotal -
10 >= 0)
{
breathTen = 1;
}
else if (drgnBreathTotal -
10 < 0)
{
breathTen = 0;
}
#endregion
#region one
if ((drgnBreathTotal -
((breathTen * 10))) - 9 >= 0)
{
breathOne = 9;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 8 >= 0)
{
breathOne = 8;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 7 >= 0)
{
breathOne = 7;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 6 >= 0)
{
breathOne = 6;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 5 >= 0)
{
breathOne = 5;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 4 >= 0)
{
breathOne = 4;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 3 >= 0)
{
breathOne = 3;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 2 >= 0)
{
breathOne = 2;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 1 >= 0)
{
breathOne = 1;
}
else if ((drgnBreathTotal -
((breathTen * 10))) - 1 <= 0)
{
breathOne = 0;
}
#endregion
#endregion
}
else if (atkLevel == 2 &&
goldAvailable >= 1500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 1500;
updateGold = true;
clawDmgBonus = 3;
drgnClawTotal = clawDmgBonus
+ clawDmg + clawDmgTreasure1 + clawDmgTreasure2 + clawLV;
atkLevel = 3;
#region Claw
#region ten
if (drgnClawTotal - 90 >= 0)
{
clawTen = 9;
}
else if (drgnClawTotal - 80
>= 0)
{
clawTen = 8;
}
else if (drgnClawTotal - 70
>= 0)
{
clawTen = 7;
}
else if (drgnClawTotal - 60
>= 0)
{
clawTen = 6;
}
else if (drgnClawTotal - 50
>= 0)
{
clawTen = 5;
}
else if (drgnClawTotal - 40
>= 0)
{
clawTen = 4;
}
else if (drgnClawTotal - 30
>= 0)
{
clawTen = 3;
}
else if (drgnClawTotal - 20
>= 0)
{
clawTen = 2;
}
else if (drgnClawTotal - 10
>= 0)
{
clawTen = 1;
}
else if (drgnClawTotal - 10
< 0)
{
clawTen = 0;
}
#endregion
#region one
if ((drgnClawTotal -
((clawTen * 10))) - 9 >= 0)
{
clawOne = 9;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 8 >= 0)
{
clawOne = 8;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 7 >= 0)
{
clawOne = 7;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 6 >= 0)
{
clawOne = 6;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 5 >= 0)
{
clawOne = 5;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 4 >= 0)
{
clawOne = 4;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 3 >= 0)
{
clawOne = 3;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 2 >= 0)
{
clawOne = 2;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 1 >= 0)
{
clawOne = 1;
}
else if ((drgnClawTotal -
((clawTen * 10))) - 1 <= 0)
{
clawOne = 0;
}
#endregion
#endregion
}
else if (atkLevel == 3 &&
goldAvailable >= 2500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 2500;
updateGold = true;
breathMaxBonus = 120;
atkLevel = 4;
}
else if (atkLevel == 4 &&
goldAvailable >= 3500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 3500;
updateGold = true;
breathCritBonus = 2;
atkLevel = 5;
}
else if (atkLevel == 5 &&
goldAvailable >= 5000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 5000;
updateGold = true;
breathCycleBonus = 60;
atkLevel = 6;
}
else
{
if (menuNoPlay == false)
{
menuNoPlay = true;
}
}
}
}
if (menuPos == 1)
{
levelPointerX = -360;
levelPointerY = 292;
if (((confTrue == true && upTrue ==
false && downTrue == false) || (gpState.IsButtonDown(Buttons.A) &&
gpState.ThumbSticks.Left.Y < 0.8f && gpState.ThumbSticks.Left.Y > -0.8f)) &&
lastKeyC == false)
{
lastKeyC = true;
if (defLevel == 0 &&
goldAvailable >= 500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 500;
updateGold = true;
drgnHPBonus = 1;
printHPMax = 6 + drgnHPLV +
drgnHPBonus + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
defLevel = 1;
printHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPNow = drgnHPMax;
#region HP
#region ten
if (printHPMax - 90 >= 0)
{
hpTen = 9;
}
else if (printHPMax - 80 >=
0)
{
hpTen = 8;
}
else if (printHPMax - 70 >=
0)
{
hpTen = 7;
}
else if (printHPMax - 60 >=
0)
{
hpTen = 6;
}
else if (printHPMax - 50 >=
0)
{
hpTen = 5;
}
else if (printHPMax - 40 >=
0)
{
hpTen = 4;
}
else if (printHPMax - 30 >=
0)
{
hpTen = 3;
}
else if (printHPMax - 20 >=
0)
{
hpTen = 2;
}
else if (printHPMax - 10 >=
0)
{
hpTen = 1;
}
else if (printHPMax - 10 <
0)
{
hpTen = 0;
}
#endregion
#region one
if ((printHPMax - ((hpTen *
10))) - 9 >= 0)
{
hpOne = 9;
}
else if ((printHPMax -
((hpTen * 10))) - 8 >= 0)
{
hpOne = 8;
}
else if ((printHPMax -
((hpTen * 10))) - 7 >= 0)
{
hpOne = 7;
}
else if ((printHPMax -
((hpTen * 10))) - 6 >= 0)
{
hpOne = 6;
}
else if ((printHPMax -
((hpTen * 10))) - 5 >= 0)
{
hpOne = 5;
}
else if ((printHPMax -
((hpTen * 10))) - 4 >= 0)
{
hpOne = 4;
}
else if ((printHPMax -
((hpTen * 10))) - 3 >= 0)
{
hpOne = 3;
}
else if ((printHPMax -
((hpTen * 10))) - 2 >= 0)
{
hpOne = 2;
}
else if ((printHPMax -
((hpTen * 10))) - 1 >= 0)
{
hpOne = 1;
}
else if ((printHPMax -
((hpTen * 10))) - 1 <= 0)
{
hpOne = 0;
}
#endregion
#endregion
}
else if (defLevel == 1 &&
goldAvailable >= 1000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 1000;
updateGold = true;
drgnHPBonus = 2;
printHPMax = 6 + drgnHPLV +
drgnHPBonus + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
defLevel = 2;
printHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPNow = drgnHPMax;
#region HP
#region ten
if (printHPMax - 90 >= 0)
{
hpTen = 9;
}
else if (printHPMax - 80 >=
0)
{
hpTen = 8;
}
else if (printHPMax - 70 >=
0)
{
hpTen = 7;
}
else if (printHPMax - 60 >=
0)
{
hpTen = 6;
}
else if (printHPMax - 50 >=
0)
{
hpTen = 5;
}
else if (printHPMax - 40 >=
0)
{
hpTen = 4;
}
else if (printHPMax - 30 >=
0)
{
hpTen = 3;
}
else if (printHPMax - 20 >=
0)
{
hpTen = 2;
}
else if (printHPMax - 10 >=
0)
{
hpTen = 1;
}
else if (printHPMax - 10 <
0)
{
hpTen = 0;
}
#endregion
#region one
if ((printHPMax - ((hpTen *
10))) - 9 >= 0)
{
hpOne = 9;
}
else if ((printHPMax -
((hpTen * 10))) - 8 >= 0)
{
hpOne = 8;
}
else if ((printHPMax -
((hpTen * 10))) - 7 >= 0)
{
hpOne = 7;
}
else if ((printHPMax -
((hpTen * 10))) - 6 >= 0)
{
hpOne = 6;
}
else if ((printHPMax -
((hpTen * 10))) - 5 >= 0)
{
hpOne = 5;
}
else if ((printHPMax -
((hpTen * 10))) - 4 >= 0)
{
hpOne = 4;
}
else if ((printHPMax -
((hpTen * 10))) - 3 >= 0)
{
hpOne = 3;
}
else if ((printHPMax -
((hpTen * 10))) - 2 >= 0)
{
hpOne = 2;
}
else if ((printHPMax -
((hpTen * 10))) - 1 >= 0)
{
hpOne = 1;
}
else if ((printHPMax -
((hpTen * 10))) - 1 <= 0)
{
hpOne = 0;
}
#endregion
#endregion
}
else if (defLevel == 2 &&
goldAvailable >= 1500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 1500;
updateGold = true;
drgnHPBonus = 3;
printHPMax = 6 + drgnHPLV +
drgnHPBonus + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
defLevel = 3;
printHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPNow = drgnHPMax;
#region HP
#region ten
if (printHPMax - 90 >= 0)
{
hpTen = 9;
}
else if (printHPMax - 80 >=
0)
{
hpTen = 8;
}
else if (printHPMax - 70 >=
0)
{
hpTen = 7;
}
else if (printHPMax - 60 >=
0)
{
hpTen = 6;
}
else if (printHPMax - 50 >=
0)
{
hpTen = 5;
}
else if (printHPMax - 40 >=
0)
{
hpTen = 4;
}
else if (printHPMax - 30 >=
0)
{
hpTen = 3;
}
else if (printHPMax - 20 >=
0)
{
hpTen = 2;
}
else if (printHPMax - 10 >=
0)
{
hpTen = 1;
}
else if (printHPMax - 10 <
0)
{
hpTen = 0;
}
#endregion
#region one
if ((printHPMax - ((hpTen *
10))) - 9 >= 0)
{
hpOne = 9;
}
else if ((printHPMax -
((hpTen * 10))) - 8 >= 0)
{
hpOne = 8;
}
else if ((printHPMax -
((hpTen * 10))) - 7 >= 0)
{
hpOne = 7;
}
else if ((printHPMax -
((hpTen * 10))) - 6 >= 0)
{
hpOne = 6;
}
else if ((printHPMax -
((hpTen * 10))) - 5 >= 0)
{
hpOne = 5;
}
else if ((printHPMax -
((hpTen * 10))) - 4 >= 0)
{
hpOne = 4;
}
else if ((printHPMax -
((hpTen * 10))) - 3 >= 0)
{
hpOne = 3;
}
else if ((printHPMax -
((hpTen * 10))) - 2 >= 0)
{
hpOne = 2;
}
else if ((printHPMax -
((hpTen * 10))) - 1 >= 0)
{
hpOne = 1;
}
else if ((printHPMax -
((hpTen * 10))) - 1 <= 0)
{
hpOne = 0;
}
#endregion
#endregion
}
else if (defLevel == 3 &&
goldAvailable >= 2000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 2000;
updateGold = true;
spikeDRBonus = 2;
defLevel = 4;
}
else if (defLevel == 4 &&
goldAvailable >= 3000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 3000;
updateGold = true;
drgnHPBonus = 4;
printHPMax = 6 + drgnHPLV +
drgnHPBonus + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
defLevel = 5;
printHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPMax = 6 + drgnHPBonus
+ drgnHPLV + drgnHPTreasure1 + drgnHPTreasure2 + boss1Clean + boss2Clean +
boss3Clean + boss4Clean + boss5Clean + questHPBonus;
drgnHPNow = drgnHPMax;
#region HP
#region ten
if (printHPMax - 90 >= 0)
{
hpTen = 9;
}
else if (printHPMax - 80 >=
0)
{
hpTen = 8;
}
else if (printHPMax - 70 >=
0)
{
hpTen = 7;
}
else if (printHPMax - 60 >=
0)
{
hpTen = 6;
}
else if (printHPMax - 50 >=
0)
{
hpTen = 5;
}
else if (printHPMax - 40 >=
0)
{
hpTen = 4;
}
else if (printHPMax - 30 >=
0)
{
hpTen = 3;
}
else if (printHPMax - 20 >=
0)
{
hpTen = 2;
}
else if (printHPMax - 10 >=
0)
{
hpTen = 1;
}
else if (printHPMax - 10 <
0)
{
hpTen = 0;
}
#endregion
#region one
if ((printHPMax - ((hpTen *
10))) - 9 >= 0)
{
hpOne = 9;
}
else if ((printHPMax -
((hpTen * 10))) - 8 >= 0)
{
hpOne = 8;
}
else if ((printHPMax -
((hpTen * 10))) - 7 >= 0)
{
hpOne = 7;
}
else if ((printHPMax -
((hpTen * 10))) - 6 >= 0)
{
hpOne = 6;
}
else if ((printHPMax -
((hpTen * 10))) - 5 >= 0)
{
hpOne = 5;
}
else if ((printHPMax -
((hpTen * 10))) - 4 >= 0)
{
hpOne = 4;
}
else if ((printHPMax -
((hpTen * 10))) - 3 >= 0)
{
hpOne = 3;
}
else if ((printHPMax -
((hpTen * 10))) - 2 >= 0)
{
hpOne = 2;
}
else if ((printHPMax -
((hpTen * 10))) - 1 >= 0)
{
hpOne = 1;
}
else if ((printHPMax -
((hpTen * 10))) - 1 <= 0)
{
hpOne = 0;
}
#endregion
#endregion
}
else if (defLevel == 5 &&
goldAvailable >= 6000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 6000;
updateGold = true;
drgnDRBonus = 1;
defLevel = 6;
}
else
{
if (menuNoPlay == false)
{
menuNoPlay = true;
}
}
}
}
if (menuPos == 2)
{
levelPointerX = -360;
levelPointerY = 409;
if (((confTrue == true && upTrue ==
false && downTrue == false) || (gpState.IsButtonDown(Buttons.A) &&
gpState.ThumbSticks.Left.Y < 0.8f && gpState.ThumbSticks.Left.Y > -0.8f)) &&
lastKeyC == false)
{
lastKeyC = true;
if (sptLevel == 0 &&
goldAvailable >= 500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 500;
updateGold = true;
drgnFlyBonus = 30;
sptLevel = 1;
}
else if (sptLevel == 1 &&
goldAvailable >= 1000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 1000;
updateGold = true;
drgnFlyBonus = 60;
sptLevel = 2;
}
else if (sptLevel == 2 &&
goldAvailable >= 2500)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 2500;
updateGold = true;
freezeTimeBonus = 60;
sptLevel = 3;
}
else if (sptLevel == 3 &&
goldAvailable >= 3000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 3000;
updateGold = true;
preserveGP = 1;
sptLevel = 4;
}
else if (sptLevel == 4 &&
goldAvailable >= 5000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 5000;
updateGold = true;
acidArmorRedBonus = 1;
sptLevel = 5;
}
else if (sptLevel == 5 &
goldAvailable >= 6000)
{
if (menuYesPlay == false)
{
menuYesPlay = true;
}
goldAvailable =
goldAvailable - 6000;
updateGold = true;
EXPReducer = 2;
sptLevel = 6;
}
else
{
if (menuNoPlay == false)
{
menuNoPlay = true;
}
}
}
}
if (menuPos == 3)
{
levelPointerX = -360;
levelPointerY = 555;
if (((confTrue == true && upTrue ==
false && downTrue == false) || (gpState.IsButtonDown(Buttons.A) &&
gpState.ThumbSticks.Left.Y < 0.8f && gpState.ThumbSticks.Left.Y > -0.8f)) &&
lastKeyC == false)
{
lastKeyC = true;
if (pageTurnPlay == false &&
storyFGFrameX1 >= 2 && storyFGFrameY1 >= 3)
{
pageTurnPlay = true;
}
levelPageOn = false;
levelPageOff = true;
}
else if (((jumpTrue == true &&
upTrue == false && downTrue == false) || (gpState.IsButtonDown(Buttons.B) &&
gpState.ThumbSticks.Left.Y < 0.8f && gpState.ThumbSticks.Left.Y > -0.8f)) &&
lastKeyX == false)
{
lastKeyX = true;
if (pageTurnPlay == false &&
storyFGFrameX1 >= 2 && storyFGFrameY1 >= 3)
{
pageTurnPlay = true;
}
levelPageOn = false;
levelPageOff = true;
}
}
if (((downTrue == true && upTrue ==
false && confTrue == false && jumpTrue == false) || (gpState.ThumbSticks.Left.Y <=
-0.8 && gpState.IsButtonUp(Buttons.A) && gpState.IsButtonUp(Buttons.B))) &&
lastKeyDown == false)
{
lastKeyDown = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
menuPos++;
if (menuPos > 3)
{
menuPos = 0;
}
}
if (((upTrue == true && downTrue ==
false && confTrue == false && jumpTrue == false) || (gpState.ThumbSticks.Left.Y >=
0.8 && gpState.IsButtonUp(Buttons.A) && gpState.IsButtonUp(Buttons.B))) && lastKeyUp
== false)
{
lastKeyUp = true;
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
menuPos--;
if (menuPos < 0)
{
menuPos = 3;
}
}
if ((jumpTrue == true ||
gpState.IsButtonDown(Buttons.B)) && lastKeyX == false)
{
if (menuTogglePlay == false)
{
menuTogglePlay = true;
}
menuPos = 3;
lastKeyX = true;
}
}
}
#endregion
//End level up menu controls
}
}
#endregion
}
#region stage script
#region Home Event
if (stageHome == true)
{
#region control clock
toggleTutorial++;
if (toggleTutorial >= 150)
{
toggleTutorial = 0;
if (tutorialPos == 0)
{
tutorialPos = 2 - controlType;
}
else
{
tutorialPos = 0;
seenTutorial = true;
}
}
#endregion
if (opacity < 250)
{
houseArrowCT = 0;
houseArrowFrame = 0;
}
npc1CT++;
if (npc1CT >= 6)
{
npc1CT = 0;
npc1Frame++;
if (npc1Frame >= 16)
{
npc1Frame = 0;
if (npc1VarAct == 1)
{
npc1VarAct = 0;
}
else
{
houseVarAct++;
}
if (houseVarAct >= 5)
{
houseVarAct = 0;
npc1VarAct = 1;
}
}
}
}
if (blackMatte == true && blackMatteOpacity >= 255)
{
if (home1F == true)
{
home1F = false;
home2F = true;
blackMatte = false;
drgnY = 560;
drgnX = 160;
}
else if (home2F == true)
{
home2F = false;
home1F = true;
blackMatte = false;
drgnY = 525;
drgnX = 293;
}
}
#endregion
#region 1-1 Enemy AI
if (stage1e1 == true) //1-1 processes and AI
{
#region tutorial clock
if (on1e2 == false)
{
toggleTutorial++;
if (toggleTutorial >= 150)
{
toggleTutorial = 0;
if (tutorialPos == 0)
{
tutorialPos = 2 - controlType;
}
else
{
tutorialPos = 0;
}
}
}
#endregion
#region warp
if (drgnOnGround == true && drgnX > 2978 && drgnX < 3009
&& drgnY > 1617)
{
if (runEvent == false)
{
runEvent = true;
}
}
if (runEvent == true)
{
if (whiteMatteOpacity == 0)
{
if (sfxWarpPlay == false)
{
sfxWarpPlay = true;
}
whiteMatte = true;
drgnAction = 0;
drgnFrame = 0;
}
if (whiteMatteOpacity >= 255)
{
if (drgnY != 1096)
{
drgnY = 1096;
drgnCamY = drgnY + 72 - 360;
}
obs1CT++;
if (obs1CT >= 60 && drgnY == 1096)
{
runEvent = false;
whiteMatte = false;
}
}
}
#endregion
//Squire
#region e1
if (e1spawn == true)
{
if (e1frame >= 16 / e1FrameHalf)
{
e1frame = 0;
}
//1-1 e1 move limits
if (e1onGround == false)
{
e1Y_CT++;
e1Y = e1Y + e1Yvel;
if (e1Yvel < 5 && e1Y_CT >= 6)
{
e1Yvel++;
e1Y_CT = 0;
}
}
if (e1frozen == false && e1peaceful == false)
{
if (e1X >= 1346)
{
if (e1knockback == false)
{
e1faceR = false;
}
if (e1knockback == true)
{
e1touchWallR = true;
}
}
else
{
e1touchWallR = false;
}
if (e1X <= 944)
{
if (e1knockback == false)
{
e1faceR = true;
}
if (e1knockback == true)
{
e1touchWallL = true;
}
}
else
{
e1touchWallL = false;
}
//1-1 e1 move limits
if (e1knockback == false && e1HP > 0)
{
if ((drgnX - e1X) >= -300 && (e1X - drgnX)
>= -300)
{
e1proximity = true;
}
else
{
e1proximity = false;
}
if (e1proximity == false)
{
if (e1faceR == false)
{
e1facing = 0;
if (e1act != 0)
{
e1act = 0;
e1frame = 0;
}
e1X--;
e1X--;
}
if (e1faceR == true)
{
e1facing = 4;
if (e1act != 0)
{
e1act = 0;
e1frame = 0;
}
e1X++;
e1X++;
}
}
else if (e1proximity == true)
{
e1facing = 0;
if (drgnX < e1X)
{
if (e1act != 1)
{
e1act = 1;
e1frame = 0;
}
}
if (drgnX >= e1X)
{
if (e1act != 5)
{
e1act = 5;
e1frame = 0;
}
}
}
}
else if (e1knockback == true)
{
if (drgnX < e1X)
{
if (e1act != 2)
{
e1act = 2;
e1frame = 0;
}
if (e1touchWallR == false)
{
e1X++;
}
}
if (drgnX >= e1X)
{
if (e1act != 6)
{
e1act = 6;
e1frame = 0;
}
if (e1touchWallL == false)
{
e1X--;
}
}
}
}
else if (e1peaceful == true)
{
if (drgnX < e1X)
{
e1act = 3;
}
else if (drgnX >= e1X)
{
e1act = 7;
}
}
}
#endregion
//Squire
#region e2
if (e2spawn == true)
{
if (e2frame >= 16 / e2FrameHalf)
{
e2frame = 0;
}
if (e2onGround == false)
{
e2Y_CT++;
e2Y = e2Y + e2Yvel;
if (e2Yvel < 5 && e2Y_CT >= 6)
{
e2Yvel++;
e2Y_CT = 0;
}
}
if (e2frozen == false && e2peaceful == false)
{
//1-1 e2 move limits
if (e2X >= 1891)
{
if (e2knockback == false)
{
e2faceR = false;
}
if (e2knockback == true)
{
e2touchWallR = true;
}
}
else
{
e2touchWallR = false;
}
if (e2X <= 1473)
{
if (e2knockback == false)
{
e2faceR = true;
}
if (e2knockback == true)
{
e2touchWallL = true;
}
}
else
{
e2touchWallL = false;
}
//1-1 e2 move limits
if (e2knockback == false && e2HP > 0)
{
if ((drgnX - e2X) >= -300 && (e2X - drgnX)
>= -300)
{
e2proximity = true;
}
else
{
e2proximity = false;
}
if (e2proximity == false)
{
if (e2faceR == false)
{
e2facing = 0;
if (e2act != 0)
{
e2act = 0;
e2frame = 0;
}
e2X--;
e2X--;
}
if (e2faceR == true)
{
e2facing = 4;
if (e2act != 0)
{
e2act = 0;
e2frame = 0;
}
e2X++;
e2X++;
}
}
else if (e2proximity == true)
{
e2facing = 0;
if (drgnX < e2X)
{
if (e2act != 1)
{
e2act = 1;
e2frame = 0;
}
}
if (drgnX >= e2X)
{
if (e2act != 5)
{
e2act = 5;
e2frame = 0;
}
}
}
}
else if (e2knockback == true)
{
if (drgnX < e2X)
{
if (e2act != 2)
{
e2act = 2;
e2frame = 0;
}
if (e2touchWallR == false)
{
e2X++;
}
}
if (drgnX >= e2X)
{
if (e2act != 6)
{
e2act = 6;
e2frame = 0;
}
if (e2touchWallL == false)
{
e2X--;
}
}
}
}
else if (e2peaceful == true)
{
if (drgnX < e2X)
{
e2act = 3;
}
else if (drgnX >= e2X)
{
e2act = 7;
}
}
}
#endregion
//Sheep
#region e3
if (e3spawn == true)
{
if (e3frame >= 16 / e3FrameHalf)
{
e3frame = 0;
}
if (e3onGround == false)
{
e3Y_CT++;
e3Y = e3Y + e3Yvel;
if (e3Yvel < 5 && e3Y_CT >= 6)
{
e3Yvel++;
e3Y_CT = 0;
}
}
if (e3frozen == false)
{
//1-1 e3 move limits
if (e3X >= 2255)
{
if (e3knockback == false)
{
e3faceR = false;
}
if (e3knockback == true)
{
e3touchWallR = true;
}
}
else
{
e3touchWallR = false;
}
if (e3X <= 2007)
{
if (e3knockback == false)
{
e3faceR = true;
}
if (e3knockback == true)
{
e3touchWallL = true;
}
}
else
{
e3touchWallL = false;
}
//1-1 e3 move limits
if (e3knockback == false && e3HP > 0)
{
e3altAnimCT++;
if (e3altAnimCT >= 90 && e3altAnim == false)
{
e3altAnimCT = 0;
e3altAnim = true;
}
if (e3altAnimCT >= 90 && e3altAnim == true)
{
e3altAnimCT = 0;
e3altAnim = false;
}
if (e3faceR == false)
{
e3facing = 0;
if (e3act != 0 && e3altAnim == false)
{
e3act = 0;
e3frame = 0;
}
else if (e3altAnim == true)
{
e3X--;
e3X--;
if (e3act != 1)
{
e3act = 1;
e3frame = 0;
}
}
}
if (e3faceR == true)
{
e3facing = 2;
if (e3act != 0 && e3altAnim == false)
{
e3act = 0;
e3frame = 0;
}
else if (e3altAnim == true)
{
e3X++;
e3X++;
if (e3act != 1)
{
e3act = 1;
e3frame = 0;
}
}
}
}
}
}
#endregion
//Squire
#region e4
if (e4spawn == true)
{
if (e4frame >= 16 / e4FrameHalf)
{
e4frame = 0;
}
if (e4onGround == false)
{
e4Y_CT++;
e4Y = e4Y + e4Yvel;
if (e4Yvel < 5 && e4Y_CT >= 6)
{
e4Yvel++;
e4Y_CT = 0;
}
}
if (e4frozen == false && e4peaceful == false)
{
//1-1 e4 move limits
if (e4X >= 2653)
{
if (e4knockback == false)
{
e4faceR = false;
}
if (e4knockback == true)
{
e4touchWallR = true;
}
}
else
{
e4touchWallR = false;
}
if (e4X <= 2250)
{
if (e4knockback == false)
{
e4faceR = true;
}
if (e4knockback == true)
{
e4touchWallL = true;
}
}
else
{
e4touchWallL = false;
}
//1-1 e4 move limits
if (e4knockback == false && e4HP > 0)
{
if ((drgnX - e4X) >= -300 && (e4X - drgnX)
>= -300)
{
e4proximity = true;
}
else
{
e4proximity = false;
}
if (e4proximity == false)
{
if (e4faceR == false)
{
e4facing = 0;
if (e4act != 0)
{
e4act = 0;
e4frame = 0;
}
e4X--;
e4X--;
}
if (e4faceR == true)
{
e4facing = 4;
if (e4act != 0)
{
e4act = 0;
e4frame = 0;
}
e4X++;
e4X++;
}
}
else if (e4proximity == true)
{
e4facing = 0;
if (drgnX < e4X)
{
if (e4act != 1)
{
e4act = 1;
e4frame = 0;
}
}
if (drgnX >= e4X)
{
if (e4act != 5)
{
e4act = 5;
e4frame = 0;
}
}
}
}
else if (e4knockback == true)
{
if (drgnX < e4X)
{
if (e4act != 2)
{
e4act = 2;
e4frame = 0;
}
if (e4touchWallR == false)
{
e4X++;
}
}
if (drgnX >= e4X)
{
if (e4act != 6)
{
e4act = 6;
e4frame = 0;
}
if (e4touchWallL == false)
{
e4X--;
}
}
}
}
else if (e4peaceful == true)
{
if (drgnX < e4X)
{
e4act = 3;
}
else if (drgnX >= e4X)
{
e4act = 7;
}
}
}
#endregion
//Sheep
#region e5
if (e5spawn == true)
{
if (e5frame >= 16 / e5FrameHalf)
{
e5frame = 0;
}
if (e5onGround == false)
{
e5Y_CT++;
e5Y = e5Y + e5Yvel;
if (e5Yvel < 5 && e5Y_CT >= 6)
{
e5Yvel++;
e5Y_CT = 0;
}
}
if (e5frozen == false)
{
//1-1 e5 move limits
if (e5X >= 3321)
{
if (e5knockback == false)
{
e5faceR = false;
}
if (e5knockback == true)
{
e5touchWallR = true;
}
}
else
{
e5touchWallR = false;
}
if (e5X <= 2807)
{
if (e5knockback == false)
{
e5faceR = true;
}
if (e5knockback == true)
{
e5touchWallL = true;
}
}
else
{
e5touchWallL = false;
}
//1-1 e5 move limits
if (e5knockback == false && e5HP > 0)
{
e5altAnimCT++;
if (e5altAnimCT >= 66 && e5altAnim == false)
{
e5altAnimCT = 0;
e5altAnim = true;
}
if (e5altAnimCT >= 143 && e5altAnim == true)
{
e5altAnimCT = 0;
e5altAnim = false;
}
if (e5faceR == false)
{
e5facing = 0;
if (e5act != 0 && e5altAnim == false)
{
e5act = 0;
e5frame = 0;
}
else if (e5altAnim == true)
{
e5X--;
e5X--;
if (e5act != 1)
{
e5act = 1;
e5frame = 0;
}
}
}
if (e5faceR == true)
{
e5facing = 2;
if (e5act != 0 && e5altAnim == false)
{
e5act = 0;
e5frame = 0;
}
else if (e5altAnim == true)
{
e5X++;
e5X++;
if (e5act != 1)
{
e5act = 1;
e5frame = 0;
}
}
}
}
}
}
#endregion
//Ram
#region e6
if (e6spawn == true)
{
if (e6frame >= 16 / e6FrameHalf)
{
e6frame = 0;
}
if (e6onGround == false)
{
e6Y_CT++;
e6Y = e6Y + e6Yvel;
if (e6Yvel < 5 && e6Y_CT >= 6)
{
e6Yvel++;
e6Y_CT = 0;
}
}
if (e6frozen == false)
{
if (e6knockback == false && e6HP > 0)
{
e6altAnimCT++;
if (e6altAnimCT >= 120 && e6altAnim ==
false)
{
e6altAnimCT = 0;
e6altAnim = true;
}
if (e6altAnimCT >= 80 && e6altAnim == true)
{
e6altAnimCT = 0;
e6altAnim = false;
}
if (drgnX <= e6X)
{
e6faceR = false;
e6facing = 0;
}
if (drgnX > e6X)
{
e6faceR = true;
e6facing = 3;
}
if (e6faceR == false && e6invulnerable ==
false)
{
if (e6act != 0 && e6altAnim == false)
{
e6act = 0;
e6frame = 0;
}
else if (e6altAnim == true)
{
if (e6act != 1)
{
e6act = 1;
e6frame = 0;
}
}
}
if (e6faceR == true && e6invulnerable ==
false)
{
if (e6act != 0 && e6altAnim == false)
{
e6act = 0;
e6frame = 0;
}
else if (e6altAnim == true)
{
if (e6act != 1)
{
e6act = 1;
e6frame = 0;
}
}
}
if (e6invulnerable == true)
{
if (e6act != 2)
{
e6act = 2;
e6frame = 0;
}
}
}
}
}
#endregion
}
#endregion
#region 1-2 Enemy AI
if (stage1e2 == true)
{
//Stampede Type A
#region e1
if (e1spawn == true)
{
if (e1frame >= 16 / e1FrameHalf)
{
e1frame = 0;
}
if (e1faceR == false)
{
e1X = e1X - 7;
}
else if (e1faceR == true)
{
e1X = e1X + 7;
}
if (e1X <= 0)
{
e1faceR = true;
e1facing = 3;
}
if (e1X >= 2977)
{
e1faceR = false;
e1facing = 0;
}
}
#endregion
//Archer
#region e2
if (e2projectile == true)
{
e2reload = 0;
if (e2projA_frame >= 4)
{
e2projA_frame = 0;
}
if (e2projA_dir == 4)
{
e2projA_X = e2projA_X - 6;
e2projA_Y = e2projA_Y + 6;
}
else if (e2projA_dir == 3)
{
e2projA_X = e2projA_X - 9;
}
else if (e2projA_dir == 5)
{
e2projA_X = e2projA_X - 6;
e2projA_Y = e2projA_Y - 6;
}
else if (e2projA_dir == 1)
{
e2projA_X = e2projA_X + 6;
e2projA_Y = e2projA_Y + 6;
}
else if (e2projA_dir == 0)
{
e2projA_X = e2projA_X + 9;
}
else if (e2projA_dir == 2)
{
e2projA_X = e2projA_X + 6;
e2projA_Y = e2projA_Y - 6;
}
}
if ((drgnX - e2projA_X) <= -800 || (e2projA_X - drgnX)
<= -800 || (drgnY - e2projA_Y) <= -600 || (e2projA_Y - drgnY) <= -600)
{
e2projectile = false;
}
if (e2HP <= 0)
{
e2burn = false;
}
if (e2spawn == true)
{
if (e2frame >= 16 / e2FrameHalf)
{
e2frame = 0;
}
if (e2frozen == false && e2peaceful == false)
{
if (e2burn == false && e2knockback == false &&
e2HP > 0)
{
if (e2reload < 80)
{
if (drgnX < e2X)
{
e2facing = 0;
}
else if (drgnX >= e2X)
{
e2facing = 8;
}
}
if ((drgnX - e2X) >= -600 && (e2X - drgnX)
>= -600)
{
e2proximity = true;
}
else
{
e2proximity = false;
if (e2act != 0)
{
e2act = 0;
e2frame = 0;
}
}
if (e2proximity == true)
{
if (e2projectile == false)
{
if (e2frozen == false) { e2reload++;
}
e2projA_X = e2X + 32;
e2projA_Y = e2Y + 36;
}
if (e2reload < 80)
{
if (e2act != 4)
{
e2act = 4;
e2frame = 0;
}
}
if (e2reload >= 80 && e2reload < 85)
{
if (drgnY > e2Y + 144 && drgnX <
e2X)
{
e2projA_dir = 4;
e2projWidth = 35;
e2projHeight = 45;
e2projOrigX = 10;
e2projOrigY = 20;
if (e2act != 3)
{
e2act = 3;
e2frame = 0;
}
}
else if (drgnY <= e2Y + 144 && drgnY
>= e2Y - 144 && drgnX < e2X)
{
e2projA_dir = 3;
e2projWidth = 55;
e2projHeight = 15;
e2projOrigX = 15;
e2projOrigY = 33;
if (e2act != 1)
{
e2act = 1;
e2frame = 0;
}
}
else if (drgnY < e2Y - 144 && drgnX
< e2X)
{
e2projA_dir = 5;
e2projWidth = 40;
e2projHeight = 45;
e2projOrigX = 5;
e2projOrigY = 15;
if (e2act != 2)
{
e2act = 2;
e2frame = 0;
}
}
if (drgnY > e2Y + 144 && drgnX >=
e2X)
{
e2projA_dir = 1;
e2projWidth = 40;
e2projHeight = 45;
e2projOrigX = 40;
e2projOrigY = 20;
if (e2act != 3)
{
e2act = 3;
e2frame = 0;
}
}
else if (drgnY <= e2Y + 144 && drgnY
>= e2Y - 144 && drgnX >= e2X)
{
e2projA_dir = 0;
e2projWidth = 55;
e2projHeight = 15;
e2projOrigX = 25;
e2projOrigY = 33;
if (e2act != 1)
{
e2act = 1;
e2frame = 0;
}
}
else if (drgnY < e2Y - 144 && drgnX
>= e2X)
{
e2projA_dir = 2;
e2projWidth = 35;
e2projHeight = 45;
e2projOrigX = 40;
e2projOrigY = 15;
if (e2act != 2)
{
e2act = 2;
e2frame = 0;
}
}
}
if (e2reload >= 156 && e2reload < 190)
{
if (e2projectile == false)
{
if (arrowPlay == false)
{
arrowPlay = true;
}
e2projectile = true;
e2projA_frame = 0;
}
}
}
else if (e2proximity == false)
{
}
}
else if (e2burn == true && e2knockback == false)
{
if (e2act != 6)
{
e2act = 6;
e2frame = 0;
}
e2burnTimer++;
e2burnCT++;
if (e2burnTimer <= 121)
{
if (e2burnTimer % 60 == 0 && e2burnTimer
!= 0)
{
e2HP--;
if (e2HP <= 0 && e2smoke == false)
{
if (e2coinValue > 0)
{
e2coins = true;
e2coinFrame = 0;
e2coinCT = 0;
}
e2smoke = true;
e2smokeCT = 0;
e2smokeFrame = 0;
e2knockback = false;
}
}
}
else if (e2burnTimer > 121)
{
e2burn = false;
e2burnTimer = 0;
e2invBlink = 255;
}
}
else if (e2knockback == true)
{
e2burn = false;
if (e2act != 5)
{
e2act = 5;
e2frame = 0;
}
}
}
else if (e2peaceful == true)
{
e2facing = 0;
if (drgnX < e2X)
{
if (e2act != 7)
{
e2act = 7;
}
}
if (drgnX > e2X)
{
if (e2act != 7)
{
e2act = 7;
}
}
}
}
#endregion
//Heavy CD
#region e3
if (e3spawn == true)
{
if (e3frame >= 16 / e3FrameHalf)
{
e3frame = 0;
}
if (e3frozen == false && e3knockback == false)
{
if (drgnX < e3X)
{
e3facing = 0;
e3faceR = false;
}
else if (drgnX > e3X)
{
e3facing = 4;
e3faceR = true;
}
if ((drgnX - e3X) >= -300 && (e3X - drgnX) >= -
300)
{
e3proximity = true;
}
else
{
e3proximity = false;
}
if (e3peaceful == false)
{
if (e3proximity == true)
{
if (e3act != 1)
{
e3act = 1;
e3frame = 0;
}
}
else
{
if (e3act != 0)
{
e3act = 0;
e3frame = 0;
}
}
}
else if (e3peaceful == true)
{
if (e3act != 3)
{
e3act = 3;
e3frame = 0;
}
}
}
else if (e3knockback == false)
{
if (e3act != 2)
{
e3act = 2;
e3frame = 0;
}
}
}
#endregion
//Heavy CD
#region e4
if (e4spawn == true)
{
if (e4frame >= 16 / e4FrameHalf)
{
e4frame = 0;
}
if (e4frozen == false && e4knockback == false)
{
if (drgnX < e4X)
{
e4facing = 0;
e4faceR = false;
}
else if (drgnX > e4X)
{
e4facing = 4;
e4faceR = true;
}
if ((drgnX - e4X) >= -300 && (e4X - drgnX) >= -
300)
{
e4proximity = true;
}
else
{
e4proximity = false;
}
if (e4peaceful == false)
{
if (e4proximity == true)
{
if (e4act != 1)
{
e4act = 1;
e4frame = 0;
}
}
else
{
if (e4act != 0)
{
e4act = 0;
e4frame = 0;
}
}
}
else if (e4peaceful == true)
{
if (e4act != 3)
{
e4act = 3;
e4frame = 0;
}
}
}
else if (e4knockback == false)
{
if (e4act != 2)
{
e4act = 2;
e4frame = 0;
}
}
}
#endregion
//Squire (no move)
#region e5
if (e5spawn == true)
{
if (e5frame >= 16 / e5FrameHalf)
{
e5frame = 0;
}
if (e5frozen == false && e5knockback == false)
{
if (drgnX < e5X)
{
e5facing = 0;
e5faceR = false;
}
else if (drgnX > e5X)
{
e5facing = 4;
e5faceR = true;
}
if ((drgnX - e5X) >= -300 && (e5X - drgnX) >= -
300)
{
e5proximity = true;
}
else
{
e5proximity = false;
}
if (e5act != 1)
{
e5act = 1;
e5frame = 0;
}
}
else if (e5knockback == false)
{
if (e5act != 2)
{
e5act = 2;
e5frame = 0;
}
}
}
#endregion
//Archer
#region e7
if (e7projectile == true)
{
e7reload = 0;
e7projA_X = e7projA_X + 10;
if (e7projA_frame >= 4)
{
e7projA_frame = 0;
}
}
if ((drgnX - e7projA_X) <= -1408 || (e7projA_X - drgnX)
<= -1408 || (drgnY - e7projA_Y) <= -866 || (e7projA_Y - drgnY) <= -866)
{
e7projectile = false;
}
if (e7HP <= 0)
{
e7burn = false;
}
if (e7spawn == true)
{
if (e7frame >= 16 / e7FrameHalf)
{
e7frame = 0;
}
if (e7frozen == false && e7peaceful == false)
{
if (e7burn == false && e7knockback == false &&
e7HP > 0)
{
if (e7reload < 80)
{
if (drgnX < e7X)
{
e7facing = 0;
}
else if (drgnX >= e7X)
{
e7facing = 8;
}
}
if ((drgnX - e7X) >= -700 && drgnX < 10000)
{
e7proximity = true;
}
else
{
e7proximity = false;
if (e7act != 0)
{
e7act = 0;
e7frame = 0;
}
}
if (e7proximity == true)
{
if (e7projectile == false)
{
if (e7frozen == false) { e7reload++;
}
e7projA_X = e7X + 32;
e7projA_Y = e7Y + 36;
}
if (e7reload < 80)
{
if (e7act != 4)
{
e7act = 4;
e7frame = 0;
}
}
if (e7reload >= 80 && e7reload < 85)
{
e7projA_dir = 0;
e7projWidth = 55;
e7projHeight = 15;
e7projOrigX = 25;
e7projOrigY = 33;
if (e7act != 1)
{
e7act = 1;
e7frame = 0;
}
}
if (e7reload >= 156 && e7reload < 190)
{
if (e7projectile == false)
{
if (arrowPlay == false)
{
arrowPlay = true;
}
e7projectile = true;
e7projA_frame = 0;
}
}
}
else if (e7proximity == false)
{
}
}
else if (e7burn == true && e7knockback == false)
{
if (e7act != 6)
{
e7act = 6;
e7frame = 0;
}
e7burnTimer++;
e7burnCT++;
if (e7burnTimer <= 121)
{
if (e7burnTimer % 60 == 0 && e7burnTimer
!= 0)
{
e7HP--;
if (e7HP <= 0)
{
if (e7coinValue > 0 && e7smoke
== false)
{
e7coins = true;
e7coinFrame = 0;
e7coinCT = 0;
}
e7smoke = true;
e7smokeCT = 0;
e7smokeFrame = 0;
e7knockback = false;
}
}
}
}
else if (e7knockback == true)
{
e7burn = false;
if (e7act != 5)
{
e7act = 5;
e7frame = 0;
}
}
}
else if (e7peaceful == true)
{
e7facing = 0;
if (drgnX < e7X)
{
if (e7act != 7)
{
e7act = 7;
}
}
if (drgnX > e7X)
{
if (e7act != 7)
{
e7act = 7;
}
}
}
}
#endregion
//Stampede Type B
#region e6
if (e6spawn == true)
{
if (e6frame >= 16 / e6FrameHalf)
{
e6frame = 0;
}
if (e6faceR == false)
{
e6faceR = true;
}
if (e6X < 6060 && e6Y <= 990 && runEvent == false)
{
e6X = e6X + eventXVel;
e6act = 1;
}
else if (e6X >= 6060 && e6Y <= 990 && runEvent ==
false)
{
e6X = 6060;
e6frame = 0;
e6act = 2;
}
if (e6Y > 990 && e6X < 9726 && runEvent == false)
{
e6X = e6X + eventXVel;
e6act = 1;
}
else if (e6X >= 9726 && runEvent == false)
{
e6X = 9726;
e6frame = 0;
e6act = 2;
}
if (e6X >= 7815 && e6Y < 1253)
{
e6Y_CT++;
if (e6Y_CT >= 6 && e6Yvel < 5)
{
e6Yvel++;
e6Y_CT = 0;
}
e6Y = e6Y + e6Yvel;
}
else if (e6X >= 7815 && e6X < 8498 && e6Y >= 1253)
{
e6Y = 1253;
e6Yvel = 0;
}
if (e6X >= 8498 && e6Y < 1394)
{
e6Y_CT++;
if (e6Y_CT >= 6 && e6Yvel < 5)
{
e6Yvel++;
e6Y_CT = 0;
}
e6Y = e6Y + e6Yvel;
}
else if (e6X >= 8498 && e6Y >= 1394)
{
e6Y = 1394;
}
if (e6X >= 6918 && e6X < 7422)
{
eventXVel = 5;
}
if (e6X >= 7422 && e6X < 7815)
{
eventXVel = 6;
}
if (e6X >= 7815 && e6X < 8015)
{
eventXVel = 5;
}
if (e6X >= 8015 && e6X < 8498)
{
eventXVel = 6;
}
if (e6X >= 8498 && e6X < 8698)
{
eventXVel = 5;
}
if (e6X >= 8698 && e6X < 8900)
{
eventXVel = 6;
}
if (e6X >= 8900 && e6X < 9300)
{
eventXVel = 7;
}
if (e6X >= 9300 && e6X < 9726)
{
eventXVel = 8;
}
if (e6X >= 9726)
{
eventXVel = 0;
}
}
#endregion
}
#endregion
#region 1-3 Enemy AI
if (stage1e3 == true)
{
if (drgnX > 3798)
{
cameraMaxY = 4566;
}
else
{
cameraMaxY = 1997;
}
#region Truck
if (truckSpawn == true)
{
truckCT++;
if (truckCT >= 6)
{
truckCT = 0;
truckFrame++;
if (truckFrame >= 4)
{
truckFrame = 0;
}
if (truckAct == 1)
{
if (eventXVel < 8)
{
eventXVel++;
}
}
}
if (truckCharge % 2 == 0 || truckCharge >= 60 ||
truckCharge == 0)
{
puzzle1Opacity = 255;
}
if (truckCharge % 2 == 1 && truckCharge > 0 &&
truckCharge < 60)
{
puzzle1Opacity = 0;
}
if (truckCharge >= 60)
{
if (runEvent == false)
{
enginePlay = true;
}
runEvent = true;
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
drgnAction = 0;
}
if (runEvent == true)
{
if (truckAct != 1)
{
truckAct = 1;
truckFrame = 0;
truckCT = 0;
truckSmokeFrame = 0;
}
if (truckAct == 1)
{
truckX = truckX - eventXVel;
}
if (truckX - drgnX <= -1931)
{
runEvent = false;
truckSpawn = false;
}
}
}
#endregion
//Squire
#region e1
if (e1spawn == true)
{
if (e1frame >= 16 / e1FrameHalf)
{
e1frame = 0;
}
//1-1 e1 move limits
if (e1onGround == false)
{
e1Y_CT++;
e1Y = e1Y + e1Yvel;
if (e1Yvel < 5 && e1Y_CT >= 6)
{
e1Yvel++;
e1Y_CT = 0;
}
}
if (e1frozen == false && e1peaceful == false)
{
if (e1X >= 9034)
{
if (e1knockback == false)
{
e1faceR = false;
}
if (e1knockback == true)
{
e1touchWallR = true;
}
}
else
{
e1touchWallR = false;
}
if (e1X <= 8490)
{
if (e1knockback == false)
{
e1faceR = true;
}
if (e1knockback == true)
{
e1touchWallL = true;
}
}
else
{
e1touchWallL = false;
}
//1-1 e1 move limits
if (e1knockback == false && e1HP > 0)
{
if ((drgnX - e1X) >= -300 && (e1X - drgnX)
>= -300)
{
e1proximity = true;
}
else
{
e1proximity = false;
}
if (e1proximity == false)
{
if (e1faceR == false)
{
e1facing = 0;
if (e1act != 0)
{
e1act = 0;
e1frame = 0;
}
e1X--;
e1X--;
}
if (e1faceR == true)
{
e1facing = 4;
if (e1act != 0)
{
e1act = 0;
e1frame = 0;
}
e1X++;
e1X++;
}
}
else if (e1proximity == true)
{
e1facing = 0;
if (drgnX < e1X)
{
if (e1act != 1)
{
e1act = 1;
e1frame = 0;
}
}
if (drgnX >= e1X)
{
if (e1act != 5)
{
e1act = 5;
e1frame = 0;
}
}
}
}
else if (e1knockback == true)
{
if (drgnX < e1X)
{
if (e1act != 2)
{
e1act = 2;
e1frame = 0;
}
if (e1touchWallR == false)
{
e1X++;
}
}
if (drgnX >= e1X)
{
if (e1act != 6)
{
e1act = 6;
e1frame = 0;
}
if (e1touchWallL == false)
{
e1X--;
}
}
}
}
else if (e1peaceful == true)
{
if (drgnX < e1X)
{
e1act = 3;
}
else if (drgnX >= e1X)
{
e1act = 7;
}
}
}
#endregion
//Archer s-4
#region e2
if (e2projectile == true)
{
e2reload = 0;
if (e2projA_frame >= 4)
{
e2projA_frame = 0;
}
if (e2projA_dir == 4)
{
e2projA_X = e2projA_X - 6;
e2projA_Y = e2projA_Y + 6;
}
else if (e2projA_dir == 3)
{
e2projA_X = e2projA_X - 9;
}
else if (e2projA_dir == 5)
{
e2projA_X = e2projA_X - 6;
e2projA_Y = e2projA_Y - 6;
}
else if (e2projA_dir == 1)
{
e2projA_X = e2projA_X + 6;
e2projA_Y = e2projA_Y + 6;
}
else if (e2projA_dir == 0)
{
e2projA_X = e2projA_X + 9;
}
else if (e2projA_dir == 2)
{
e2projA_X = e2projA_X + 6;
e2projA_Y = e2projA_Y - 6;
}
}
if ((drgnX - e2projA_X) <= -1408 || (e2projA_X - drgnX)
<= -1408 || (drgnY - e2projA_Y) <= -866 || (e2projA_Y - drgnY) <= -866)
{
e2projectile = false;
}
if (e2HP <= 0)
{
e2burn = false;
}
if (e2spawn == true)
{
if (e2frame >= 16 / e2FrameHalf)
{
e2frame = 0;
}
if (e2frozen == false && e2peaceful == false)
{
if (e2burn == false && e2knockback == false &&
e2HP > 0)
{
if (e2reload < 80)
{
if (drgnX < e2X)
{
e2facing = 0;
}
else if (drgnX >= e2X)
{
e2facing = 8;
}
}
if ((drgnX - e2X) >= -600 && (e2X - drgnX)
>= -600 && (e2Y - drgnY) >= -200 && (drgnY - e2Y) >= -700)
{
e2proximity = true;
}
else
{
e2proximity = false;
if (e2act != 0)
{
e2act = 0;
e2frame = 0;
}
}
if (e2proximity == true)
{
if (e2projectile == false)
{
if (e2frozen == false) { e2reload++;
}
e2projA_X = e2X + 32;
e2projA_Y = e2Y + 36;
}
if (e2reload < 80)
{
if (e2act != 4)
{
e2act = 4;
e2frame = 0;
}
}
if (e2reload >= 80 && e2reload < 85)
{
if (drgnY > e2Y + 144 && drgnX <
e2X)
{
e2projA_dir = 4;
e2projWidth = 35;
e2projHeight = 45;
e2projOrigX = 10;
e2projOrigY = 20;
if (e2act != 3)
{
e2act = 3;
e2frame = 0;
}
}
else if (drgnY <= e2Y + 144 && drgnY
>= e2Y - 144 && drgnX < e2X)
{
e2projA_dir = 3;
e2projWidth = 55;
e2projHeight = 15;
e2projOrigX = 15;
e2projOrigY = 33;
if (e2act != 1)
{
e2act = 1;
e2frame = 0;
}
}
else if (drgnY < e2Y - 144 && drgnX
< e2X)
{
e2projA_dir = 5;
e2projWidth = 40;
e2projHeight = 45;
e2projOrigX = 5;
e2projOrigY = 15;
if (e2act != 2)
{
e2act = 2;
e2frame = 0;
}
}
if (drgnY > e2Y + 144 && drgnX >=
e2X)
{
e2projA_dir = 1;
e2projWidth = 40;
e2projHeight = 45;
e2projOrigX = 40;
e2projOrigY = 20;
if (e2act != 3)
{
e2act = 3;
e2frame = 0;
}
}
else if (drgnY <= e2Y + 144 && drgnY
>= e2Y - 144 && drgnX >= e2X)
{
e2projA_dir = 0;
e2projWidth = 55;
e2projHeight = 15;
e2projOrigX = 25;
e2projOrigY = 33;
if (e2act != 1)
{
e2act = 1;
e2frame = 0;
}
}
else if (drgnY < e2Y - 144 && drgnX
>= e2X)
{
e2projA_dir = 2;
e2projWidth = 35;
e2projHeight = 45;
e2projOrigX = 40;
e2projOrigY = 15;
if (e2act != 2)
{
e2act = 2;
e2frame = 0;
}
}
}
if (e2reload >= 156 && e2reload < 190)
{
if (e2projectile == false)
{
if (arrowPlay == false)
{
arrowPlay = true;
}
e2projectile = true;
e2projA_frame = 0;
}
}
}
else if (e2proximity == false)
{
}
}
else if (e2burn == true && e2knockback == false)
{
if (e2act != 6)
{
e2act = 6;
e2frame = 0;
}
e2burnTimer++;
e2burnCT++;
if (e2burnTimer <= 121)
{
if (e2burnTimer % 60 == 0 && e2burnTimer
!= 0)
{
e2HP--;
if (e2burnTimer % 60 == 0 &&
e2burnTimer != 0)
{
e2HP--;
if (e2HP <= 0 && e2smoke ==
false)
{
if (e2coinValue > 0)
{
e2coins = true;
e2coinFrame = 0;
e2coinCT = 0;
}
e2smoke = true;
e2smokeCT = 0;
e2smokeFrame = 0;
e2knockback = false;
}
}
}
}
else if (e2burnTimer > 121)
{
e2burn = false;
e2burnTimer = 0;
e2invBlink = 255;
}
}
else if (e2knockback == true)
{
e2burn = false;
if (e2act != 5)
{
e2act = 5;
e2frame = 0;
}
}
}
else if (e2peaceful == true)
{
e2facing = 0;
if (drgnX < e2X)
{
if (e2act != 7)
{
e2act = 7;
}
}
if (drgnX > e2X)
{
if (e2act != 7)
{
e2act = 7;
}
}
}
}
#endregion
//Heavy XX s-4
#region e3
if (e3spawn == true)
{
if (e3frame >= 16 / e3FrameHalf)
{
e3frame = 0;
}
if (e3frozen == false && e3knockback == false)
{
if (drgnX < e3X)
{
e3facing = 0;
e3faceR = false;
}
else if (drgnX > e3X)
{
e3facing = 4;
e3faceR = true;
}
if ((drgnX - e3X) >= -300 && (e3X - drgnX) >= -
300)
{
e3proximity = true;
}
else
{
e3proximity = false;
}
if (e3peaceful == false)
{
if (e3proximity == true)
{
if (e3act != 1)
{
e3act = 1;
e3frame = 0;
}
}
else
{
if (e3act != 0)
{
e3act = 0;
e3frame = 0;
}
}
}
else if (e3peaceful == true)
{
if (e3act != 3)
{
e3act = 3;
e3frame = 0;
}
}
}
else if (e3knockback == false)
{
if (e3act != 2)
{
e3act = 2;
e3frame = 0;
}
}
}
#endregion
//Squire s-1
#region e4
if (e4spawn == true)
{
if (e4frame >= 16 / e4FrameHalf)
{
e4frame = 0;
}
//1-1 e4 move limits
if (e4onGround == false)
{
e4Y_CT++;
e4Y = e4Y + e4Yvel;
if (e4Yvel < 5 && e4Y_CT >= 6)
{
e4Yvel++;
e4Y_CT = 0;
}
}
if (e4frozen == false && e4peaceful == false)
{
if (e4X >= 3200)
{
if (e4knockback == false)
{
e4faceR = false;
}
if (e4knockback == true)
{
e4touchWallR = true;
}
}
else
{
e4touchWallR = false;
}
if (e4X <= 2400)
{
if (e4knockback == false)
{
e4faceR = true;
}
if (e4knockback == true)
{
e4touchWallL = true;
}
}
else
{
e4touchWallL = false;
}
//1-1 e4 move limits
if (e4knockback == false && e4HP > 0)
{
if ((drgnX - e4X) >= -300 && (e4X - drgnX)
>= -300)
{
e4proximity = true;
}
else
{
e4proximity = false;
}
if (e4proximity == false)
{
if (e4faceR == false)
{
e4facing = 0;
if (e4act != 0)
{
e4act = 0;
e4frame = 0;
}
e4X--;
e4X--;
}
if (e4faceR == true)
{
e4facing = 4;
if (e4act != 0)
{
e4act = 0;
e4frame = 0;
}
e4X++;
e4X++;
}
}
else if (e4proximity == true)
{
e4facing = 0;
if (drgnX < e4X)
{
if (e4act != 1)
{
e4act = 1;
e4frame = 0;
}
}
if (drgnX >= e4X)
{
if (e4act != 5)
{
e4act = 5;
e4frame = 0;
}
}
}
}
else if (e4knockback == true)
{
if (drgnX < e4X)
{
if (e4act != 2)
{
e4act = 2;
e4frame = 0;
}
if (e4touchWallR == false)
{
e4X++;
}
}
if (drgnX >= e4X)
{
if (e4act != 6)
{
e4act = 6;
e4frame = 0;
}
if (e4touchWallL == false)
{
e4X--;
}
}
}
}
else if (e4peaceful == true)
{
if (drgnX < e4X)
{
e4act = 3;
}
else if (drgnX >= e4X)
{
e4act = 7;
}
}
}
#endregion
//Archer s-1 low
#region e5
if (e5projectile == true)
{
e5reload = 0;
if (e5projA_frame >= 4)
{
e5projA_frame = 0;
}
if (e5projA_dir == 4)
{
e5projA_X = e5projA_X - 6;
e5projA_Y = e5projA_Y + 6;
}
else if (e5projA_dir == 3)
{
e5projA_X = e5projA_X - 9;
}
else if (e5projA_dir == 5)
{
e5projA_X = e5projA_X - 6;
e5projA_Y = e5projA_Y - 6;
}
else if (e5projA_dir == 1)
{
e5projA_X = e5projA_X + 6;
e5projA_Y = e5projA_Y + 6;
}
else if (e5projA_dir == 0)
{
e5projA_X = e5projA_X + 9;
}
else if (e5projA_dir == 2)
{
e5projA_X = e5projA_X + 6;
e5projA_Y = e5projA_Y - 6;
}
}
if ((drgnX - e5projA_X) <= -1408 || (e5projA_X - drgnX)
<= -1408 || (drgnY - e5projA_Y) <= -866 || (e5projA_Y - drgnY) <= -866)
{
e5projectile = false;
}
if (e5HP <= 0)
{
e5burn = false;
}
if (e5spawn == true)
{
if (e5frame >= 16 / e5FrameHalf)
{
e5frame = 0;
}
if (e5frozen == false && e5peaceful == false)
{
if (e5burn == false && e5knockback == false &&
e5HP > 0)
{
if (e5reload < 80)
{
if (drgnX < e5X)
{
e5facing = 0;
}
else if (drgnX >= e5X)
{
e5facing = 8;
}
}
if ((drgnX - e5X) >= -600 && (e5X - drgnX)
>= -600 && (e5Y - drgnY) >= -200 && (drgnY - e5Y) >= -700)
{
e5proximity = true;
}
else
{
e5proximity = false;
if (e5act != 0)
{
e5act = 0;
e5frame = 0;
}
}
if (e5proximity == true)
{
if (e5projectile == false)
{
if (e5frozen == false) { e5reload++;
}
e5projA_X = e5X + 32;
e5projA_Y = e5Y + 36;
}
if (e5reload < 80)
{
if (e5act != 4)
{
e5act = 4;
e5frame = 0;
}
}
if (e5reload >= 80 && e5reload < 85)
{
if (drgnY > e5Y + 144 && drgnX <
e5X)
{
e5projA_dir = 4;
e5projWidth = 35;
e5projHeight = 45;
e5projOrigX = 10;
e5projOrigY = 20;
if (e5act != 3)
{
e5act = 3;
e5frame = 0;
}
}
else if (drgnY <= e5Y + 144 && drgnY
>= e5Y - 144 && drgnX < e5X)
{
e5projA_dir = 3;
e5projWidth = 55;
e5projHeight = 15;
e5projOrigX = 15;
e5projOrigY = 33;
if (e5act != 1)
{
e5act = 1;
e5frame = 0;
}
}
else if (drgnY < e5Y - 144 && drgnX
< e5X)
{
e5projA_dir = 5;
e5projWidth = 40;
e5projHeight = 45;
e5projOrigX = 5;
e5projOrigY = 15;
if (e5act != 2)
{
e5act = 2;
e5frame = 0;
}
}
if (drgnY > e5Y + 144 && drgnX >=
e5X)
{
e5projA_dir = 1;
e5projWidth = 40;
e5projHeight = 45;
e5projOrigX = 40;
e5projOrigY = 20;
if (e5act != 3)
{
e5act = 3;
e5frame = 0;
}
}
else if (drgnY <= e5Y + 144 && drgnY
>= e5Y - 144 && drgnX >= e5X)
{
e5projA_dir = 0;
e5projWidth = 55;
e5projHeight = 15;
e5projOrigX = 25;
e5projOrigY = 33;
if (e5act != 1)
{
e5act = 1;
e5frame = 0;
}
}
else if (drgnY < e5Y - 144 && drgnX
>= e5X)
{
e5projA_dir = 2;
e5projWidth = 35;
e5projHeight = 45;
e5projOrigX = 40;
e5projOrigY = 15;
if (e5act != 2)
{
e5act = 2;
e5frame = 0;
}
}
}
if (e5reload >= 156 && e5reload < 190)
{
if (e5projectile == false)
{
if (arrowPlay == false)
{
arrowPlay = true;
}
e5projectile = true;
e5projA_frame = 0;
}
}
}
else if (e5proximity == false)
{
}
}
else if (e5burn == true && e5knockback == false)
{
if (e5act != 6)
{
e5act = 6;
e5frame = 0;
}
e5burnTimer++;
e5burnCT++;
if (e5burnTimer <= 121)
{
if (e5burnTimer % 60 == 0 && e5burnTimer
!= 0)
{
e5HP--;
if (e5burnTimer % 60 == 0 &&
e5burnTimer != 0)
{
e5HP--;
if (e5HP <= 0 && e5smoke ==
false)
{
if (e5coinValue > 0)
{
e5coins = true;
e5coinFrame = 0;
e5coinCT = 0;
}
e5smoke = true;
e5smokeCT = 0;
e5smokeFrame = 0;
e5knockback = false;
}
}
}
}
else if (e5burnTimer > 121)
{
e5burn = false;
e5burnTimer = 0;
e5invBlink = 255;
}
}
else if (e5knockback == true)
{
e5burn = false;
if (e5act != 5)
{
e5act = 5;
e5frame = 0;
}
}
}
else if (e5peaceful == true)
{
e5facing = 0;
if (drgnX < e5X)
{
if (e5act != 7)
{
e5act = 7;
}
}
if (drgnX > e5X)
{
if (e5act != 7)
{
e5act = 7;
}
}
}
}
#endregion
//Archer s-1 high
#region e6
if (e6projectile == true)
{
e6reload = 0;
if (e6projA_frame >= 4)
{
e6projA_frame = 0;
}
if (e6projA_dir == 4)
{
e6projA_X = e6projA_X - 6;
e6projA_Y = e6projA_Y + 6;
}
else if (e6projA_dir == 3)
{
e6projA_X = e6projA_X - 9;
}
else if (e6projA_dir == 5)
{
e6projA_X = e6projA_X - 6;
e6projA_Y = e6projA_Y - 6;
}
else if (e6projA_dir == 1)
{
e6projA_X = e6projA_X + 6;
e6projA_Y = e6projA_Y + 6;
}
else if (e6projA_dir == 0)
{
e6projA_X = e6projA_X + 9;
}
else if (e6projA_dir == 2)
{
e6projA_X = e6projA_X + 6;
e6projA_Y = e6projA_Y - 6;
}
}
if ((drgnX - e6projA_X) <= -1408 || (e6projA_X - drgnX)
<= -1408 || (drgnY - e6projA_Y) <= -866 || (e6projA_Y - drgnY) <= -866)
{
e6projectile = false;
}
if (e6HP <= 0)
{
e6burn = false;
}
if (e6spawn == true)
{
if (e6frame >= 16 / e6FrameHalf)
{
e6frame = 0;
}
if (e6frozen == false && e6peaceful == false)
{
if (e6burn == false && e6knockback == false &&
e6HP > 0)
{
if (e6reload < 80)
{
if (drgnX < e6X)
{
e6facing = 0;
}
else if (drgnX >= e6X)
{
e6facing = 8;
}
}
if ((drgnX - e6X) >= -600 && (e6X - drgnX)
>= -600 && (e6Y - drgnY) >= -200 && (drgnY - e6Y) >= -700)
{
e6proximity = true;
}
else
{
e6proximity = false;
if (e6act != 0)
{
e6act = 0;
e6frame = 0;
}
}
if (e6proximity == true)
{
if (e6projectile == false)
{
if (e6frozen == false) { e6reload++;
}
e6projA_X = e6X + 32;
e6projA_Y = e6Y + 36;
}
if (e6reload < 80)
{
if (e6act != 4)
{
e6act = 4;
e6frame = 0;
}
}
if (e6reload >= 80 && e6reload < 85)
{
if (drgnY > e6Y + 144 && drgnX <
e6X)
{
e6projA_dir = 4;
e6projWidth = 35;
e6projHeight = 45;
e6projOrigX = 10;
e6projOrigY = 20;
if (e6act != 3)
{
e6act = 3;
e6frame = 0;
}
}
else if (drgnY <= e6Y + 144 && drgnY
>= e6Y - 144 && drgnX < e6X)
{
e6projA_dir = 3;
e6projWidth = 55;
e6projHeight = 15;
e6projOrigX = 15;
e6projOrigY = 33;
if (e6act != 1)
{
e6act = 1;
e6frame = 0;
}
}
else if (drgnY < e6Y - 144 && drgnX
< e6X)
{
e6projA_dir = 5;
e6projWidth = 40;
e6projHeight = 45;
e6projOrigX = 5;
e6projOrigY = 15;
if (e6act != 2)
{
e6act = 2;
e6frame = 0;
}
}
if (drgnY > e6Y + 144 && drgnX >=
e6X)
{
e6projA_dir = 1;
e6projWidth = 40;
e6projHeight = 45;
e6projOrigX = 40;
e6projOrigY = 20;
if (e6act != 3)
{
e6act = 3;
e6frame = 0;
}
}
else if (drgnY <= e6Y + 144 && drgnY
>= e6Y - 144 && drgnX >= e6X)
{
e6projA_dir = 0;
e6projWidth = 55;
e6projHeight = 15;
e6projOrigX = 25;
e6projOrigY = 33;
if (e6act != 1)
{
e6act = 1;
e6frame = 0;
}
}
else if (drgnY < e6Y - 144 && drgnX
>= e6X)
{
e6projA_dir = 2;
e6projWidth = 35;
e6projHeight = 45;
e6projOrigX = 40;
e6projOrigY = 15;
if (e6act != 2)
{
e6act = 2;
e6frame = 0;
}
}
}
if (e6reload >= 156 && e6reload < 190)
{
if (e6projectile == false)
{
if (arrowPlay == false)
{
arrowPlay = true;
}
e6projectile = true;
e6projA_frame = 0;
}
}
}
else if (e6proximity == false)
{
}
}
else if (e6burn == true && e6knockback == false)
{
if (e6act != 6)
{
e6act = 6;
e6frame = 0;
}
e6burnTimer++;
e6burnCT++;
if (e6burnTimer <= 121)
{
if (e6burnTimer % 60 == 0 && e6burnTimer
!= 0)
{
e6HP--;
if (e6burnTimer % 60 == 0 &&
e6burnTimer != 0)
{
e6HP--;
if (e6HP <= 0 && e6smoke ==
false)
{
if (e6coinValue > 0)
{
e6coins = true;
e6coinFrame = 0;
e6coinCT = 0;
}
e6smoke = true;
e6smokeCT = 0;
e6smokeFrame = 0;
e6knockback = false;
}
}
}
}
else if (e6burnTimer > 121)
{
e6burn = false;
e6burnTimer = 0;
e6invBlink = 255;
}
}
else if (e6knockback == true)
{
e6burn = false;
if (e6act != 5)
{
e6act = 5;
e6frame = 0;
}
}
}
else if (e6peaceful == true)
{
e6facing = 0;
if (drgnX < e6X)
{
if (e6act != 7)
{
e6act = 7;
}
}
if (drgnX > e6X)
{
if (e6act != 7)
{
e6act = 7;
}
}
}
}
#endregion
//Archer s-3
#region e7
if (e7projectile == true)
{
e7reload = 0;
if (e7projA_frame >= 4)
{
e7projA_frame = 0;
}
if (e7projA_dir == 4)
{
e7projA_X = e7projA_X - 6;
e7projA_Y = e7projA_Y + 6;
}
else if (e7projA_dir == 3)
{
e7projA_X = e7projA_X - 9;
}
else if (e7projA_dir == 5)
{
e7projA_X = e7projA_X - 6;
e7projA_Y = e7projA_Y - 6;
}
else if (e7projA_dir == 1)
{
e7projA_X = e7projA_X + 6;
e7projA_Y = e7projA_Y + 6;
}
else if (e7projA_dir == 0)
{
e7projA_X = e7projA_X + 9;
}
else if (e7projA_dir == 2)
{
e7projA_X = e7projA_X + 6;
e7projA_Y = e7projA_Y - 6;
}
}
if ((drgnX - e7projA_X) <= -1408 || (e7projA_X - drgnX)
<= -1408 || (drgnY - e7projA_Y) <= -866 || (e7projA_Y - drgnY) <= -866)
{
e7projectile = false;
}
if (e7HP <= 0)
{
e7burn = false;
}
if (e7spawn == true)
{
if (e7frame >= 16 / e7FrameHalf)
{
e7frame = 0;
}
if (e7frozen == false && e7peaceful == false)
{
if (e7burn == false && e7knockback == false &&
e7HP > 0)
{
if (e7reload < 80)
{
if (drgnX < e7X)
{
e7facing = 0;
}
else if (drgnX >= e7X)
{
e7facing = 8;
}
}
if ((drgnX - e7X) >= -600 && (e7X - drgnX)
>= -600 && (e7Y - drgnY) >= -200 && (drgnY - e7Y) >= -700)
{
e7proximity = true;
}
else
{
e7proximity = false;
if (e7act != 0)
{
e7act = 0;
e7frame = 0;
}
}
if (e7proximity == true)
{
if (e7projectile == false)
{
if (e7frozen == false) { e7reload++;
}
e7projA_X = e7X + 32;
e7projA_Y = e7Y + 36;
}
if (e7reload < 80)
{
if (e7act != 4)
{
e7act = 4;
e7frame = 0;
}
}
if (e7reload >= 80 && e7reload < 85)
{
if (drgnY > e7Y + 144 && drgnX <
e7X)
{
e7projA_dir = 4;
e7projWidth = 35;
e7projHeight = 45;
e7projOrigX = 10;
e7projOrigY = 20;
if (e7act != 3)
{
e7act = 3;
e7frame = 0;
}
}
else if (drgnY <= e7Y + 144 && drgnY
>= e7Y - 144 && drgnX < e7X)
{
e7projA_dir = 3;
e7projWidth = 55;
e7projHeight = 15;
e7projOrigX = 15;
e7projOrigY = 33;
if (e7act != 1)
{
e7act = 1;
e7frame = 0;
}
}
else if (drgnY < e7Y - 144 && drgnX
< e7X)
{
e7projA_dir = 5;
e7projWidth = 40;
e7projHeight = 45;
e7projOrigX = 5;
e7projOrigY = 15;
if (e7act != 2)
{
e7act = 2;
e7frame = 0;
}
}
if (drgnY > e7Y + 144 && drgnX >=
e7X)
{
e7projA_dir = 1;
e7projWidth = 40;
e7projHeight = 45;
e7projOrigX = 40;
e7projOrigY = 20;
if (e7act != 3)
{
e7act = 3;
e7frame = 0;
}
}
else if (drgnY <= e7Y + 144 && drgnY
>= e7Y - 144 && drgnX >= e7X)
{
e7projA_dir = 0;
e7projWidth = 55;
e7projHeight = 15;
e7projOrigX = 25;
e7projOrigY = 33;
if (e7act != 1)
{
e7act = 1;
e7frame = 0;
}
}
else if (drgnY < e7Y - 144 && drgnX
>= e7X)
{
e7projA_dir = 2;
e7projWidth = 35;
e7projHeight = 45;
e7projOrigX = 40;
e7projOrigY = 15;
if (e7act != 2)
{
e7act = 2;
e7frame = 0;
}
}
}
if (e7reload >= 156 && e7reload < 190)
{
if (e7projectile == false)
{
if (arrowPlay == false)
{
arrowPlay = true;
}
e7projectile = true;
e7projA_frame = 0;
}
}
}
else if (e7proximity == false)
{
}
}
else if (e7burn == true && e7knockback == false)
{
if (e7act != 6)
{
e7act = 6;
e7frame = 0;
}
e7burnTimer++;
e7burnCT++;
if (e7burnTimer <= 121)
{
if (e7burnTimer % 60 == 0 && e7burnTimer
!= 0)
{
e7HP--;
if (e7burnTimer % 60 == 0 &&
e7burnTimer != 0)
{
e7HP--;
if (e7HP <= 0 && e7smoke ==
false)
{
if (e7coinValue > 0)
{
e7coins = true;
e7coinFrame = 0;
e7coinCT = 0;
}
e7smoke = true;
e7smokeCT = 0;
e7smokeFrame = 0;
e7knockback = false;
}
}
}
}
else if (e7burnTimer > 121)
{
e7burn = false;
e7burnTimer = 0;
e7invBlink = 255;
}
}
else if (e7knockback == true)
{
e7burn = false;
if (e7act != 5)
{
e7act = 5;
e7frame = 0;
}
}
}
else if (e7peaceful == true)
{
e7facing = 0;
if (drgnX < e7X)
{
if (e7act != 7)
{
e7act = 7;
}
}
if (drgnX > e7X)
{
if (e7act != 7)
{
e7act = 7;
}
}
}
}
#endregion
//Archer s-5
#region e8
if (e8projectile == true)
{
e8reload = 0;
if (e8projA_frame >= 4)
{
e8projA_frame = 0;
}
if (e8projA_dir == 4)
{
e8projA_X = e8projA_X - 6;
e8projA_Y = e8projA_Y + 6;
}
else if (e8projA_dir == 3)
{
e8projA_X = e8projA_X - 9;
}
else if (e8projA_dir == 5)
{
e8projA_X = e8projA_X - 6;
e8projA_Y = e8projA_Y - 6;
}
else if (e8projA_dir == 1)
{
e8projA_X = e8projA_X + 6;
e8projA_Y = e8projA_Y + 6;
}
else if (e8projA_dir == 0)
{
e8projA_X = e8projA_X + 9;
}
else if (e8projA_dir == 2)
{
e8projA_X = e8projA_X + 6;
e8projA_Y = e8projA_Y - 6;
}
}
if ((drgnX - e8projA_X) <= -1408 || (e8projA_X - drgnX)
<= -1408 || (drgnY - e8projA_Y) <= -866 || (e8projA_Y - drgnY) <= -866)
{
e8projectile = false;
}
if (e8HP <= 0)
{
e8burn = false;
}
if (e8spawn == true)
{
if (e8frame >= 16 / e8FrameHalf)
{
e8frame = 0;
}
if (e8frozen == false && e8peaceful == false)
{
if (e8burn == false && e8knockback == false &&
e8HP > 0)
{
if (e8reload < 80)
{
if (drgnX < e8X)
{
e8facing = 0;
}
else if (drgnX >= e8X)
{
e8facing = 8;
}
}
if ((drgnX - e8X) >= -600 && (e8X - drgnX)
>= -600 && (e8Y - drgnY) >= -200 && (drgnY - e8Y) >= -700)
{
e8proximity = true;
}
else
{
e8proximity = false;
if (e8act != 0)
{
e8act = 0;
e8frame = 0;
}
}
if (e8proximity == true)
{
if (e8projectile == false)
{
if (e8frozen == false) { e8reload++;
}
e8projA_X = e8X + 32;
e8projA_Y = e8Y + 36;
}
if (e8reload < 80)
{
if (e8act != 4)
{
e8act = 4;
e8frame = 0;
}
}
if (e8reload >= 80 && e8reload < 85)
{
if (drgnY > e8Y + 144 && drgnX <
e8X)
{
e8projA_dir = 4;
e8projWidth = 35;
e8projHeight = 45;
e8projOrigX = 10;
e8projOrigY = 20;
if (e8act != 3)
{
e8act = 3;
e8frame = 0;
}
}
else if (drgnY <= e8Y + 144 && drgnY
>= e8Y - 144 && drgnX < e8X)
{
e8projA_dir = 3;
e8projWidth = 55;
e8projHeight = 15;
e8projOrigX = 15;
e8projOrigY = 33;
if (e8act != 1)
{
e8act = 1;
e8frame = 0;
}
}
else if (drgnY < e8Y - 144 && drgnX
< e8X)
{
e8projA_dir = 5;
e8projWidth = 40;
e8projHeight = 45;
e8projOrigX = 5;
e8projOrigY = 15;
if (e8act != 2)
{
e8act = 2;
e8frame = 0;
}
}
if (drgnY > e8Y + 144 && drgnX >=
e8X)
{
e8projA_dir = 1;
e8projWidth = 40;
e8projHeight = 45;
e8projOrigX = 40;
e8projOrigY = 20;
if (e8act != 3)
{
e8act = 3;
e8frame = 0;
}
}
else if (drgnY <= e8Y + 144 && drgnY
>= e8Y - 144 && drgnX >= e8X)
{
e8projA_dir = 0;
e8projWidth = 55;
e8projHeight = 15;
e8projOrigX = 25;
e8projOrigY = 33;
if (e8act != 1)
{
e8act = 1;
e8frame = 0;
}
}
else if (drgnY < e8Y - 144 && drgnX
>= e8X)
{
e8projA_dir = 2;
e8projWidth = 35;
e8projHeight = 45;
e8projOrigX = 40;
e8projOrigY = 15;
if (e8act != 2)
{
e8act = 2;
e8frame = 0;
}
}
}
if (e8reload >= 156 && e8reload < 190)
{
if (e8projectile == false)
{
if (arrowPlay == false)
{
arrowPlay = true;
}
e8projectile = true;
e8projA_frame = 0;
}
}
}
else if (e8proximity == false)
{
}
}
else if (e8burn == true && e8knockback == false)
{
if (e8act != 6)
{
e8act = 6;
e8frame = 0;
}
e8burnTimer++;
e8burnCT++;
if (e8burnTimer <= 121)
{
if (e8burnTimer % 60 == 0 && e8burnTimer
!= 0)
{
e8HP--;
if (e8burnTimer % 60 == 0 &&
e8burnTimer != 0)
{
e8HP--;
if (e8HP <= 0 && e8smoke ==
false)
{
if (e8coinValue > 0)
{
e8coins = true;
e8coinFrame = 0;
e8coinCT = 0;
}
e8smoke = true;
e8smokeCT = 0;
e8smokeFrame = 0;
e8knockback = false;
}
}
}
}
else if (e8burnTimer > 121)
{
e8burn = false;
e8burnTimer = 0;
e8invBlink = 255;
}
}
else if (e8knockback == true)
{
e8burn = false;
if (e8act != 5)
{
e8act = 5;
e8frame = 0;
}
}
}
else if (e8peaceful == true)
{
e8facing = 0;
if (drgnX < e8X)
{
if (e8act != 7)
{
e8act = 7;
}
}
if (drgnX > e8X)
{
if (e8act != 7)
{
e8act = 7;
}
}
}
}
#endregion
//Heavy XX s-5
#region e9
if (e9spawn == true)
{
if (e9frame >= 16 / e9FrameHalf)
{
e9frame = 0;
}
if (e9frozen == false && e9knockback == false)
{
if (drgnX < e9X)
{
e9facing = 0;
e9faceR = false;
}
else if (drgnX > e9X)
{
e9facing = 4;
e9faceR = true;
}
if ((drgnX - e9X) >= -300 && (e9X - drgnX) >= -
300)
{
e9proximity = true;
}
else
{
e9proximity = false;
}
if (e9peaceful == false)
{
if (e9proximity == true)
{
if (e9act != 1)
{
e9act = 1;
e9frame = 0;
}
}
else
{
if (e9act != 0)
{
e9act = 0;
e9frame = 0;
}
}
}
else if (e9peaceful == true)
{
if (e9act != 3)
{
e9act = 3;
e9frame = 0;
}
}
}
else if (e9knockback == false)
{
if (e9act != 2)
{
e9act = 2;
e9frame = 0;
}
}
}
#endregion
//Squire s-3
#region e10
if (e10spawn == true)
{
if (e10frame >= 16 / e10FrameHalf)
{
e10frame = 0;
}
//1-1 e10 move limits
if (e10onGround == false)
{
e10Y_CT++;
e10Y = e10Y + e10Yvel;
if (e10Yvel < 5 && e10Y_CT >= 6)
{
e10Yvel++;
e10Y_CT = 0;
}
}
if (e10frozen == false && e10peaceful == false)
{
if (e10X >= 6000)
{
if (e10knockback == false)
{
e10faceR = false;
}
if (e10knockback == true)
{
e10touchWallR = true;
}
}
else
{
e10touchWallR = false;
}
if (e10X <= 5171)
{
if (e10knockback == false)
{
e10faceR = true;
}
if (e10knockback == true)
{
e10touchWallL = true;
}
}
else
{
e10touchWallL = false;
}
//1-1 e10 move limits
if (e10knockback == false && e10HP > 0)
{
if ((drgnX - e10X) >= -300 && (e10X - drgnX)
>= -300 && (drgnY - e10Y) >= -250)
{
e10proximity = true;
}
else
{
e10proximity = false;
}
if (e10proximity == false)
{
if (e10faceR == false)
{
e10facing = 0;
if (e10act != 0)
{
e10act = 0;
e10frame = 0;
}
e10X--;
e10X--;
}
if (e10faceR == true)
{
e10facing = 4;
if (e10act != 0)
{
e10act = 0;
e10frame = 0;
}
e10X++;
e10X++;
}
}
else if (e10proximity == true)
{
e10facing = 0;
if (drgnX < e10X)
{
if (e10act != 1)
{
e10act = 1;
e10frame = 0;
}
}
if (drgnX >= e10X)
{
if (e10act != 5)
{
e10act = 5;
e10frame = 0;
}
}
}
}
else if (e10knockback == true)
{
if (drgnX < e10X)
{
if (e10act != 2)
{
e10act = 2;
e10frame = 0;
}
if (e10touchWallR == false)
{
e10X++;
}
}
if (drgnX >= e10X)
{
if (e10act != 6)
{
e10act = 6;
e10frame = 0;
}
if (e10touchWallL == false)
{
e10X--;
}
}
}
}
else if (e10peaceful == true)
{
if (drgnX < e10X)
{
e10act = 3;
}
else if (drgnX >= e10X)
{
e10act = 7;
}
}
}
#endregion
//Archer
#region e11
if (e11projectile == true)
{
e11reload = 0;
if (e11projA_frame >= 4)
{
e11projA_frame = 0;
}
if (e11projA_dir == 4)
{
e11projA_X = e11projA_X - 6;
e11projA_Y = e11projA_Y + 6;
}
else if (e11projA_dir == 3)
{
e11projA_X = e11projA_X - 9;
}
else if (e11projA_dir == 5)
{
e11projA_X = e11projA_X - 6;
e11projA_Y = e11projA_Y - 6;
}
else if (e11projA_dir == 1)
{
e11projA_X = e11projA_X + 6;
e11projA_Y = e11projA_Y + 6;
}
else if (e11projA_dir == 0)
{
e11projA_X = e11projA_X + 9;
}
else if (e11projA_dir == 2)
{
e11projA_X = e11projA_X + 6;
e11projA_Y = e11projA_Y - 6;
}
}
if (drgnX < e11projA_X)
{
if ((drgnX - e11projA_X) <= -1200 || (drgnY -
e11projA_Y) <= -1200 || (e11projA_Y - drgnY) <= -1200)
{
e11projectile = false;
}
}
if (drgnX > e11projA_X)
{
if ((e11projA_X - drgnX) <= -1200 || (drgnY -
e11projA_Y) <= -1200 || (e11projA_Y - drgnY) <= -1200)
{
e11projectile = false;
}
}
if (e11HP <= 0)
{
e11burn = false;
}
if (e11spawn == true)
{
if (e11frame >= 16 / e11FrameHalf)
{
e11frame = 0;
}
if (e11frozen == false && e11peaceful == false)
{
if (e11burn == false && e11knockback == false &&
e11HP > 0)
{
if (e11reload < 80)
{
if (drgnX < e11X)
{
e11facing = 0;
}
else if (drgnX >= e11X)
{
e11facing = 8;
}
}
if ((drgnX - e11X) >= -1200 && (e11X -
drgnX) >= -1200)
{
e11proximity = true;
}
else
{
e11proximity = false;
if (e11act != 0)
{
e11act = 0;
e11frame = 0;
}
}
if (e11proximity == true)
{
if (e11projectile == false)
{
if (e11frozen == false) { e11reload
++; }
e11projA_X = e11X + 32;
e11projA_Y = e11Y + 36;
}
if (e11reload < 80)
{
if (e11act != 4)
{
e11act = 4;
e11frame = 0;
}
}
if (e11reload >= 80 && e11reload < 85)
{
if (drgnY > e11Y + 144 && drgnX <
e11X)
{
e11projA_dir = 4;
e11projWidth = 35;
e11projHeight = 45;
e11projOrigX = 10;
e11projOrigY = 20;
if (e11act != 3)
{
e11act = 3;
e11frame = 0;
}
}
else if (drgnY <= e11Y + 144 &&
drgnY >= e11Y - 144 && drgnX < e11X)
{
e11projA_dir = 3;
e11projWidth = 55;
e11projHeight = 15;
e11projOrigX = 15;
e11projOrigY = 33;
if (e11act != 1)
{
e11act = 1;
e11frame = 0;
}
}
else if (drgnY < e11Y - 144 && drgnX
< e11X)
{
e11projA_dir = 5;
e11projWidth = 40;
e11projHeight = 45;
e11projOrigX = 5;
e11projOrigY = 15;
if (e11act != 2)
{
e11act = 2;
e11frame = 0;
}
}
if (drgnY > e11Y + 144 && drgnX >=
e11X)
{
e11projA_dir = 1;
e11projWidth = 40;
e11projHeight = 45;
e11projOrigX = 40;
e11projOrigY = 20;
if (e11act != 3)
{
e11act = 3;
e11frame = 0;
}
}
else if (drgnY <= e11Y + 144 &&
drgnY >= e11Y - 144 && drgnX >= e11X)
{
e11projA_dir = 0;
e11projWidth = 55;
e11projHeight = 15;
e11projOrigX = 25;
e11projOrigY = 33;
if (e11act != 1)
{
e11act = 1;
e11frame = 0;
}
}
else if (drgnY < e11Y - 144 && drgnX
>= e11X)
{
e11projA_dir = 2;
e11projWidth = 35;
e11projHeight = 45;
e11projOrigX = 40;
e11projOrigY = 15;
if (e11act != 2)
{
e11act = 2;
e11frame = 0;
}
}
}
if (e11reload >= 156 && e11reload < 190)
{
if (e11projectile == false)
{
if (drgnX - e11X >= -1000 &&
e11X - drgnX >= -1000 && drgnY - e11Y >= -1000 && e11Y - drgnY >= -1000)
{
if (arrowPlay == false)
{
arrowPlay = true;
}
}
e11projectile = true;
e11projA_frame = 0;
}
}
}
else if (e11proximity == false)
{
}
}
else if (e11burn == true && e11knockback ==
false)
{
if (e11act != 6)
{
e11act = 6;
e11frame = 0;
}
e11burnTimer++;
e11burnCT++;
if (e11burnTimer <= 121)
{
if (e11burnTimer % 60 == 0 &&
e11burnTimer != 0)
{
e11HP--;
if (e11HP <= 0 && e11smoke == false)
{
if (e11coinValue > 0)
{
e11coins = true;
e11coinFrame = 0;
e11coinCT = 0;
}
e11smoke = true;
e11smokeCT = 0;
e11smokeFrame = 0;
e11knockback = false;
}
}
}
else if (e11burnTimer > 121)
{
e11burn = false;
e11burnTimer = 0;
e11invBlink = 255;
}
}
else if (e11knockback == true)
{
e11burn = false;
if (e11act != 5)
{
e11act = 5;
e11frame = 0;
}
}
}
else if (e11peaceful == true)
{
e11facing = 0;
if (drgnX < e11X)
{
if (e11act != 7)
{
e11act = 7;
}
}
if (drgnX > e11X)
{
if (e11act != 7)
{
e11act = 7;
}
}
}
}
#endregion
#region e12
if (e12projectile == true)
{
e12reload = 0;
if (e12projA_frame >= 4)
{
e12projA_frame = 0;
}
if (e12projA_dir == 4)
{
e12projA_X = e12projA_X - 6;
e12projA_Y = e12projA_Y + 6;
}
else if (e12projA_dir == 3)
{
e12projA_X = e12projA_X - 9;
}
else if (e12projA_dir == 5)
{
e12projA_X = e12projA_X - 6;
e12projA_Y = e12projA_Y - 6;
}
else if (e12projA_dir == 1)
{
e12projA_X = e12projA_X + 6;
e12projA_Y = e12projA_Y + 6;
}
else if (e12projA_dir == 0)
{
e12projA_X = e12projA_X + 9;
}
else if (e12projA_dir == 2)
{
e12projA_X = e12projA_X + 6;
e12projA_Y = e12projA_Y - 6;
}
}
if (drgnX < e12projA_X)
{
if ((drgnX - e12projA_X) <= -1200 || (drgnY -
e12projA_Y) <= -1200 || (e12projA_Y - drgnY) <= -1200)
{
e12projectile = false;
}
}
if (drgnX > e12projA_X)
{
if ((e12projA_X - drgnX) <= -1200 || (drgnY -
e12projA_Y) <= -1200 || (e12projA_Y - drgnY) <= -1200)
{
e12projectile = false;
}
}
if (e12HP <= 0)
{
e12burn = false;
}
if (e12spawn == true)
{
if (e12frame >= 16 / e12FrameHalf)
{
e12frame = 0;
}
if (e12frozen == false && e12peaceful == false)
{
if (e12burn == false && e12knockback == false &&
e12HP > 0)
{
if (e12reload < 80)
{
if (drgnX < e12X)
{
e12facing = 0;
}
else if (drgnX >= e12X)
{
e12facing = 8;
}
}
if ((drgnX - e12X) >= -1200 && (e12X -
drgnX) >= -1200)
{
e12proximity = true;
}
else
{
e12proximity = false;
if (e12act != 0)
{
e12act = 0;
e12frame = 0;
}
}
if (e12proximity == true)
{
if (e12projectile == false)
{
if (e12frozen == false) { e12reload
++; }
e12projA_X = e12X + 32;
e12projA_Y = e12Y + 36;
}
if (e12reload < 80)
{
if (e12act != 4)
{
e12act = 4;
e12frame = 0;
}
}
if (e12reload >= 80 && e12reload < 85)
{
if (drgnY > e12Y + 144 && drgnX <
e12X)
{
e12projA_dir = 4;
e12projWidth = 35;
e12projHeight = 45;
e12projOrigX = 10;
e12projOrigY = 20;
if (e12act != 3)
{
e12act = 3;
e12frame = 0;
}
}
else if (drgnY <= e12Y + 144 &&
drgnY >= e12Y - 144 && drgnX < e12X)
{
e12projA_dir = 3;
e12projWidth = 55;
e12projHeight = 15;
e12projOrigX = 15;
e12projOrigY = 33;
if (e12act != 1)
{
e12act = 1;
e12frame = 0;
}
}
else if (drgnY < e12Y - 144 && drgnX
< e12X)
{
e12projA_dir = 5;
e12projWidth = 40;
e12projHeight = 45;
e12projOrigX = 5;
e12projOrigY = 15;
if (e12act != 2)
{
e12act = 2;
e12frame = 0;
}
}
if (drgnY > e12Y + 144 && drgnX >=
e12X)
{
e12projA_dir = 1;
e12projWidth = 40;
e12projHeight = 45;
e12projOrigX = 40;
e12projOrigY = 20;
if (e12act != 3)
{
e12act = 3;
e12frame = 0;
}
}
else if (drgnY <= e12Y + 144 &&
drgnY >= e12Y - 144 && drgnX >= e12X)
{
e12projA_dir = 0;
e12projWidth = 55;
e12projHeight = 15;
e12projOrigX = 25;
e12projOrigY = 33;
if (e12act != 1)
{
e12act = 1;
e12frame = 0;
}
}
else if (drgnY < e12Y - 144 && drgnX
>= e12X)
{
e12projA_dir = 2;
e12projWidth = 35;
e12projHeight = 45;
e12projOrigX = 40;
e12projOrigY = 15;
if (e12act != 2)
{
e12act = 2;
e12frame = 0;
}
}
}
if (e12reload >= 156 && e12reload < 190)
{
if (e12projectile == false)
{
if (drgnX - e12X >= -1000 &&
e12X - drgnX >= -1000 && drgnY - e12Y >= -1000 && e12Y - drgnY >= -1000)
{
if (arrowPlay == false)
{
arrowPlay = true;
}
}
e12projectile = true;
e12projA_frame = 0;
}
}
}
else if (e12proximity == false)
{
}
}
else if (e12burn == true && e12knockback ==
false)
{
if (e12act != 6)
{
e12act = 6;
e12frame = 0;
}
e12burnTimer++;
e12burnCT++;
if (e12burnTimer <= 121)
{
if (e12burnTimer % 60 == 0 &&
e12burnTimer != 0)
{
e12HP--;
if (e12HP <= 0 && e12smoke == false)
{
if (e12coinValue > 0)
{
e12coins = true;
e12coinFrame = 0;
e12coinCT = 0;
}
e12smoke = true;
e12smokeCT = 0;
e12smokeFrame = 0;
e12knockback = false;
}
}
}
else if (e12burnTimer > 121)
{
e12burn = false;
e12burnTimer = 0;
e12invBlink = 255;
}
}
else if (e12knockback == true)
{
e12burn = false;
if (e12act != 5)
{
e12act = 5;
e12frame = 0;
}
}
}
else if (e12peaceful == true)
{
e12facing = 0;
if (drgnX < e12X)
{
if (e12act != 7)
{
e12act = 7;
}
}
if (drgnX > e12X)
{
if (e12act != 7)
{
e12act = 7;
}
}
}
}
#endregion
#region e13
if (e13projectile == true)
{
e13reload = 0;
if (e13projA_frame >= 4)
{
e13projA_frame = 0;
}
if (e13projA_dir == 4)
{
e13projA_X = e13projA_X - 6;
e13projA_Y = e13projA_Y + 6;
}
else if (e13projA_dir == 3)
{
e13projA_X = e13projA_X - 9;
}
else if (e13projA_dir == 5)
{
e13projA_X = e13projA_X - 6;
e13projA_Y = e13projA_Y - 6;
}
else if (e13projA_dir == 1)
{
e13projA_X = e13projA_X + 6;
e13projA_Y = e13projA_Y + 6;
}
else if (e13projA_dir == 0)
{
e13projA_X = e13projA_X + 9;
}
else if (e13projA_dir == 2)
{
e13projA_X = e13projA_X + 6;
e13projA_Y = e13projA_Y - 6;
}
}
if (drgnX < e13projA_X)
{
if ((drgnX - e13projA_X) <= -1200 || (drgnY -
e13projA_Y) <= -1200 || (e13projA_Y - drgnY) <= -1200)
{
e13projectile = false;
}
}
if (drgnX > e13projA_X)
{
if ((e13projA_X - drgnX) <= -1200 || (drgnY -
e13projA_Y) <= -1200 || (e13projA_Y - drgnY) <= -1200)
{
e13projectile = false;
}
}
if (e13HP <= 0)
{
e13burn = false;
}
if (e13spawn == true)
{
if (e13frame >= 16 / e13FrameHalf)
{
e13frame = 0;
}
if (e13frozen == false && e13peaceful == false)
{
if (e13burn == false && e13knockback == false &&
e13HP > 0)
{
if (e13reload < 80)
{
if (drgnX < e13X)
{
e13facing = 0;
}
else if (drgnX >= e13X)
{
e13facing = 8;
}
}
if ((drgnX - e13X) >= -1200 && (e13X -
drgnX) >= -1200)
{
e13proximity = true;
}
else
{
e13proximity = false;
if (e13act != 0)
{
e13act = 0;
e13frame = 0;
}
}
if (e13proximity == true)
{
if (e13projectile == false)
{
if (e13frozen == false) { e13reload
++; }
e13projA_X = e13X + 32;
e13projA_Y = e13Y + 36;
}
if (e13reload < 80)
{
if (e13act != 4)
{
e13act = 4;
e13frame = 0;
}
}
if (e13reload >= 80 && e13reload < 85)
{
if (drgnY > e13Y + 144 && drgnX <
e13X)
{
e13projA_dir = 4;
e13projWidth = 35;
e13projHeight = 45;
e13projOrigX = 10;
e13projOrigY = 20;
if (e13act != 3)
{
e13act = 3;
e13frame = 0;
}
}
else if (drgnY <= e13Y + 144 &&
drgnY >= e13Y - 144 && drgnX < e13X)
{
e13projA_dir = 3;
e13projWidth = 55;
e13projHeight = 15;
e13projOrigX = 15;
e13projOrigY = 33;
if (e13act != 1)
{
e13act = 1;
e13frame = 0;
}
}
else if (drgnY < e13Y - 144 && drgnX
< e13X)
{
e13projA_dir = 5;
e13projWidth = 40;
e13projHeight = 45;
e13projOrigX = 5;
e13projOrigY = 15;
if (e13act != 2)
{
e13act = 2;
e13frame = 0;
}
}
if (drgnY > e13Y + 144 && drgnX >=
e13X)
{
e13projA_dir = 1;
e13projWidth = 40;
e13projHeight = 45;
e13projOrigX = 40;
e13projOrigY = 20;
if (e13act != 3)
{
e13act = 3;
e13frame = 0;
}
}
else if (drgnY <= e13Y + 144 &&
drgnY >= e13Y - 144 && drgnX >= e13X)
{
e13projA_dir = 0;
e13projWidth = 55;
e13projHeight = 15;
e13projOrigX = 25;
e13projOrigY = 33;
if (e13act != 1)
{
e13act = 1;
e13frame = 0;
}
}
else if (drgnY < e13Y - 144 && drgnX
>= e13X)
{
e13projA_dir = 2;
e13projWidth = 35;
e13projHeight = 45;
e13projOrigX = 40;
e13projOrigY = 15;
if (e13act != 2)
{
e13act = 2;
e13frame = 0;
}
}
}
if (e13reload >= 156 && e13reload < 190)
{
if (e13projectile == false)
{
if (drgnX - e13X >= -1000 &&
e13X - drgnX >= -1000 && drgnY - e13Y >= -1000 && e13Y - drgnY >= -1000)
{
if (arrowPlay == false)
{
arrowPlay = true;
}
}
e13projectile = true;
e13projA_frame = 0;
}
}
}
else if (e13proximity == false)
{
}
}
else if (e13burn == true && e13knockback ==
false)
{
if (e13act != 6)
{
e13act = 6;
e13frame = 0;
}
e13burnTimer++;
e13burnCT++;
if (e13burnTimer <= 121)
{
if (e13burnTimer % 60 == 0 &&
e13burnTimer != 0)
{
e13HP--;
if (e13HP <= 0 && e13smoke == false)
{
if (e13coinValue > 0)
{
e13coins = true;
e13coinFrame = 0;
e13coinCT = 0;
}
e13smoke = true;
e13smokeCT = 0;
e13smokeFrame = 0;
e13knockback = false;
}
}
}
else if (e13burnTimer > 121)
{
e13burn = false;
e13burnTimer = 0;
e13invBlink = 255;
}
}
else if (e13knockback == true)
{
e13burn = false;
if (e13act != 5)
{
e13act = 5;
e13frame = 0;
}
}
}
else if (e13peaceful == true)
{
e13facing = 0;
if (drgnX < e13X)
{
if (e13act != 7)
{
e13act = 7;
}
}
if (drgnX > e13X)
{
if (e13act != 7)
{
e13act = 7;
}
}
}
}
#endregion
#region e14
if (e14projectile == true)
{
e14reload = 0;
if (e14projA_frame >= 4)
{
e14projA_frame = 0;
}
if (e14projA_dir == 4)
{
e14projA_X = e14projA_X - 6;
e14projA_Y = e14projA_Y + 6;
}
else if (e14projA_dir == 3)
{
e14projA_X = e14projA_X - 9;
}
else if (e14projA_dir == 5)
{
e14projA_X = e14projA_X - 6;
e14projA_Y = e14projA_Y - 6;
}
else if (e14projA_dir == 1)
{
e14projA_X = e14projA_X + 6;
e14projA_Y = e14projA_Y + 6;
}
else if (e14projA_dir == 0)
{
e14projA_X = e14projA_X + 9;
}
else if (e14projA_dir == 2)
{
e14projA_X = e14projA_X + 6;
e14projA_Y = e14projA_Y - 6;
}
}
if (drgnX < e14projA_X)
{
if ((drgnX - e14projA_X) <= -1200 || (drgnY -
e14projA_Y) <= -1200 || (e14projA_Y - drgnY) <= -1200)
{
e14projectile = false;
}
}
if (drgnX > e14projA_X)
{
if ((e14projA_X - drgnX) <= -1200 || (drgnY -
e14projA_Y) <= -1200 || (e14projA_Y - drgnY) <= -1200)
{
e14projectile = false;
}
}
if (e14HP <= 0)
{
e14burn = false;
}
if (e14spawn == true)
{
if (e14frame >= 16 / e14FrameHalf)
{
e14frame = 0;
}
if (e14frozen == false && e14peaceful == false)
{
if (e14burn == false && e14knockback == false &&
e14HP > 0)
{
if (e14reload < 80)
{
if (drgnX < e14X)
{
e14facing = 0;
}
else if (drgnX >= e14X)
{
e14facing = 8;
}
}
if ((drgnX - e14X) >= -1200 && (e14X -
drgnX) >= -1200)
{
e14proximity = true;
}
else
{
e14proximity = false;
if (e14act != 0)
{
e14act = 0;
e14frame = 0;
}
}
if (e14proximity == true)
{
if (e14projectile == false)
{
if (e14frozen == false) { e14reload
++; }
e14projA_X = e14X + 32;
e14projA_Y = e14Y + 36;
}
if (e14reload < 80)
{
if (e14act != 4)
{
e14act = 4;
e14frame = 0;
}
}
if (e14reload >= 80 && e14reload < 85)
{
if (drgnY > e14Y + 144 && drgnX <
e14X)
{
e14projA_dir = 4;
e14projWidth = 35;
e14projHeight = 45;
e14projOrigX = 10;
e14projOrigY = 20;
if (e14act != 3)
{
e14act = 3;
e14frame = 0;
}
}
else if (drgnY <= e14Y + 144 &&
drgnY >= e14Y - 144 && drgnX < e14X)
{
e14projA_dir = 3;
e14projWidth = 55;
e14projHeight = 15;
e14projOrigX = 15;
e14projOrigY = 33;
if (e14act != 1)
{
e14act = 1;
e14frame = 0;
}
}
else if (drgnY < e14Y - 144 && drgnX
< e14X)
{
e14projA_dir = 5;
e14projWidth = 40;
e14projHeight = 45;
e14projOrigX = 5;
e14projOrigY = 15;
if (e14act != 2)
{
e14act = 2;
e14frame = 0;
}
}
if (drgnY > e14Y + 144 && drgnX >=
e14X)
{
e14projA_dir = 1;
e14projWidth = 40;
e14projHeight = 45;
e14projOrigX = 40;
e14projOrigY = 20;
if (e14act != 3)
{
e14act = 3;
e14frame = 0;
}
}
else if (drgnY <= e14Y + 144 &&
drgnY >= e14Y - 144 && drgnX >= e14X)
{
e14projA_dir = 0;
e14projWidth = 55;
e14projHeight = 15;
e14projOrigX = 25;
e14projOrigY = 33;
if (e14act != 1)
{
e14act = 1;
e14frame = 0;
}
}
else if (drgnY < e14Y - 144 && drgnX
>= e14X)
{
e14projA_dir = 2;
e14projWidth = 35;
e14projHeight = 45;
e14projOrigX = 40;
e14projOrigY = 15;
if (e14act != 2)
{
e14act = 2;
e14frame = 0;
}
}
}
if (e14reload >= 156 && e14reload < 190)
{
if (e14projectile == false)
{
if (drgnX - e14X >= -1000 &&
e14X - drgnX >= -1000 && drgnY - e14Y >= -1000 && e14Y - drgnY >= -1000)
{
if (arrowPlay == false)
{
arrowPlay = true;
}
}
e14projectile = true;
e14projA_frame = 0;
}
}
}
else if (e14proximity == false)
{
}
}
else if (e14burn == true && e14knockback ==
false)
{
if (e14act != 6)
{
e14act = 6;
e14frame = 0;
}
e14burnTimer++;
e14burnCT++;
if (e14burnTimer <= 121)
{
if (e14burnTimer % 60 == 0 &&
e14burnTimer != 0)
{
e14HP--;
if (e14HP <= 0 && e14smoke == false)
{
if (e14coinValue > 0)
{
e14coins = true;
e14coinFrame = 0;
e14coinCT = 0;
}
e14smoke = true;
e14smokeCT = 0;
e14smokeFrame = 0;
e14knockback = false;
}
}
}
else if (e14burnTimer > 121)
{
e14burn = false;
e14burnTimer = 0;
e14invBlink = 255;
}
}
else if (e14knockback == true)
{
e14burn = false;
if (e14act != 5)
{
e14act = 5;
e14frame = 0;
}
}
}
else if (e14peaceful == true)
{
e14facing = 0;
if (drgnX < e14X)
{
if (e14act != 7)
{
e14act = 7;
}
}
if (drgnX > e14X)
{
if (e14act != 7)
{
e14act = 7;
}
}
}
}
#endregion
}
#endregion
#region 1-B Enemy AI
if (stage1eB == true)
{
#region Spectators
if (dragonLookWait >= 10)
{
dragonLook = true;
dragonLookWait = 0;
}
if (mogLookWait >= 10)
{
mogLook = true;
mogLookWait = 0;
}
if (ninjaLookWait >= 10)
{
ninjaLook = true;
ninjaLookWait = 0;
}
if (dragonLook == true)
{
if (dragonLookY > 281 && dragonLookCT < 119)
{
dragonLookY--;
dragonLookY--;
}
else if (dragonLookY <= 281 && dragonLookCT < 120)
{
dragonLookY = 281;
dragonLookCT++;
}
if (dragonLookCT >= 119 && dragonLookY < 302)
{
dragonLookY++;
dragonLookY++;
}
else if (dragonLookCT >= 119 && dragonLookY >= 302)
{
dragonLookY = 302;
dragonLook = false;
dragonLookCT = 0;
dragonLookWait = 0;
}
}
if (mogLook == true)
{
if (mogLookX < 35 && mogLookCT < 119)
{
mogLookX++;
mogLookX++;
}
else if (mogLookX >= 35 && mogLookCT < 120)
{
mogLookX = 35;
mogLookCT++;
}
if (mogLookCT >= 119 && mogLookX > 6)
{
mogLookX--;
mogLookX--;
}
else if (mogLookCT >= 119 && mogLookX <= 6)
{
mogLookX = 6;
mogLook = false;
mogLookCT = 0;
mogLookWait = 0;
}
}
if (ninjaLook == true)
{
if (ninjaLookY < 504 && ninjaLookCT < 119)
{
ninjaLookY++;
ninjaLookY++;
}
else if (ninjaLookY >= 504 && ninjaLookCT < 120)
{
ninjaLookY = 504;
ninjaLookCT++;
}
if (ninjaLookCT >= 119 && ninjaLookY > 475)
{
ninjaLookY--;
ninjaLookY--;
}
else if (ninjaLookCT >= 119 && ninjaLookY <= 475)
{
ninjaLookY = 475;
ninjaLook = false;
ninjaLookCT = 0;
ninjaLookWait = 0;
}
}
#endregion
#region CT Counter
boss1CT++;
if (boss1CT >= 6)
{
boss1CT = 0;
boss1Frame++;
if (boss1Frame >= 16)
{
boss1Frame = 0;
if (boss1Act == 10)
{
boss1Act = 6;
}
if (boss1Act == 9)
{
boss1Act = 4;
if (thunderBlastPlay == false)
{
thunderBlastPlay = true;
}
if (laserPlay == false)
{
laserPlay = true;
}
}
}
}
if (boss1FaceL == true)
{
boss1Facing = 13;
}
else
{
boss1Facing = 0;
}
if (boss1Exhausted == true)
{
boss1ExhaustedRecharge++;
if (boss1ExhaustedRecharge >= 360)
{
boss1Exhausted = false;
boss1ExhaustedRecharge = 0;
if (boss1HP > 10)
{
boss1Stamina = 10;
}
else if (boss1HP <= 10)
{
boss1Stamina = 5;
}
}
}
#endregion
if (boss1HP > 0)
{
#region Thunderbolt
if (attackThunderbolt == true)
{
boss1ProjFrameCT++;
if (boss1ProjFrameCT >= 6)
{
boss1ProjFrameCT = 0;
boss1AttackFrame++;
if (boss1AttackFrame >= 4)
{
boss1AttackFrame = 0;
}
}
if (boss1Frame > 14)
{
boss1Frame = 14;
}
if (boss1Frame == 12)
{
if (boss1AttackCT == 0)
{
if (boltUp == false)
{
if (boss1FaceL == false)
{
boltUpX = boss1X - 73;
}
if (boss1FaceL == true)
{
boltUpX = boss1X - 219;
}
if (thunderProjPlay == false)
{
thunderProjPlay = true;
}
}
boltUp = true;
}
if (boss1AttackCT == 1)
{
if (boltDn == false)
{
if (boss1FaceL == false)
{
boltDnX = boss1X - 105;
}
if (boss1FaceL == true)
{
boltDnX = boss1X - 209;
}
if (thunderProjPlay == false)
{
thunderProjPlay = true;
}
}
boltDn = true;
}
}
if (boss1FaceL == false && boltUp == true)
{
boltUpX = boltUpX + 12;
}
if (boss1FaceL == true && boltUp == true)
{
boltUpX = boltUpX - 12;
}
if (boss1FaceL == false && boltDn == true)
{
boltDnX = boltDnX + 12;
}
if (boss1FaceL == true && boltDn == true)
{
boltDnX = boltDnX - 12;
}
if (boss1FaceL == false)
{
if (boltUp == true)
{
if (boltUpX > 340)
{
boss1AttackCT = 1;
}
if (boltUpX > 1281)
{
if (boltUp == true)
{
boltUp = false;
}
}
}
if (boltDn == true)
{
if (boltDnX > 340)
{
boss1AttackCT = 2;
}
if (boltDnX > 1281)
{
boltDn = false;
}
}
}
if (boss1FaceL == true)
{
if (boltUp == true)
{
if (boltUpX < 500)
{
boss1AttackCT = 1;
}
if (boltUpX < -397)
{
boltUp = false;
}
}
if (boltDn == true)
{
if (boltDnX < 500)
{
boss1AttackCT = 2;
}
if (boltDnX < -397)
{
boltDn = false;
}
}
}
if (boss1AttackCT == 0)
{
if (boss1Act != 3)
{
boss1Frame = 0;
boss1Act = 3;
}
}
if (boss1AttackCT == 1)
{
if (boss1Act != 2)
{
boss1Frame = 0;
boss1Act = 2;
}
}
if (boss1AttackCT >= 2 && boltUp == false &&
boltDn == false)
{
boss1AttackCT = 0;
boss1WaitTimer = 0;
attackThunderbolt = false;
attackThunderblast = false;
attackThundercloud = false;
attackThunderslash = false;
boss1Stamina = boss1Stamina - 4;
}
}
#endregion
#region Thunderslash
if (attackThunderslash == true)
{
if (boss1Act != 10 && boss1Act != 6)
{
boss1Act = 10;
boss1Frame = 0;
}
if (boss1invBlink <= 0 && boss1Opacity <= 0)
{
boss1AttackTimer++;
}
if (boss1AttackTimer >= 15 && slash1Frame < 7)
{
if (slash1 == false)
{
slash1 = true;
if (slashPlay == false && boss1Opacity
<= 0)
{
slashPlay = true;
}
}
}
if (boss1AttackTimer >= 30 && slash2Frame < 7)
{
if (slash2 == false)
{
slash2 = true;
if (slashPlay == false && boss1Opacity
<= 0)
{
slashPlay = true;
}
}
}
if (boss1AttackTimer >= 45 && slash3Frame < 7)
{
if (slash3 == false)
{
slash3 = true;
if (slashPlay == false && boss1Opacity
<= 0)
{
slashPlay = true;
}
}
}
if (boss1AttackTimer >= 60 && slash4Frame < 7)
{
if (slash4 == false)
{
slash4 = true;
if (slashPlay == false && boss1Opacity
<= 0)
{
slashPlay = true;
}
}
}
if (boss1AttackTimer >= 135 && slash5Frame < 7)
{
if (slash5 == false)
{
slash5 = true;
if (slashPlay == false && boss1Opacity
<= 0)
{
slashPlay = true;
}
}
}
if (boss1AttackTimer >= 150 && slash6Frame < 7)
{
if (slash6 == false)
{
slash6 = true;
if (slashPlay == false && boss1Opacity
<= 0)
{
slashPlay = true;
}
}
}
if (boss1AttackTimer >= 165 && slash7Frame < 7)
{
if (slash7 == false)
{
slash7 = true;
if (slashPlay == false && boss1Opacity
<= 0)
{
slashPlay = true;
}
}
}
if (boss1AttackTimer >= 180 && slash8Frame < 7)
{
if (slash8 == false)
{
slash8 = true;
if (slashPlay == false && boss1Opacity
<= 0)
{
slashPlay = true;
}
}
}
if (slash1 == true)
{
slash1CT++;
if (slash1CT >= 6)
{
slash1Frame++;
slash1CT = 0;
}
if (slash1Frame >= 7)
{
slash1 = false;
}
}
if (slash2 == true)
{
slash2CT++;
if (slash2CT >= 6)
{
slash2Frame++;
slash2CT = 0;
}
if (slash2Frame >= 7)
{
slash2 = false;
}
}
if (slash3 == true)
{
slash3CT++;
if (slash3CT >= 6)
{
slash3Frame++;
slash3CT = 0;
}
if (slash3Frame >= 7)
{
slash3 = false;
}
}
if (slash4 == true)
{
slash4CT++;
if (slash4CT >= 6)
{
slash4Frame++;
slash4CT = 0;
}
if (slash4Frame >= 7)
{
slash4 = false;
}
}
if (slash5 == true)
{
slash5CT++;
if (slash5CT >= 6)
{
slash5Frame++;
slash5CT = 0;
}
if (slash5Frame >= 7)
{
slash5 = false;
}
}
if (slash6 == true)
{
slash6CT++;
if (slash6CT >= 6)
{
slash6Frame++;
slash6CT = 0;
}
if (slash6Frame >= 7)
{
slash6 = false;
}
}
if (slash7 == true)
{
slash7CT++;
if (slash7CT >= 6)
{
slash7Frame++;
slash7CT = 0;
}
if (slash7Frame >= 7)
{
slash7 = false;
}
}
if (slash8 == true)
{
slash8CT++;
if (slash8CT >= 6)
{
slash8Frame++;
slash8CT = 0;
}
if (slash7Frame >= 7)
{
slash8 = false;
}
}
if (boss1FaceL == false)
{
slashFacing = 0;
if (boss1Act == 6 && boss1X < 600)
{
if (boss1Opacity > 0 && boss1invBlink >
0)
{
if (boss1Opacity == 255)
{
if (invisPlay == false)
{
invisPlay = true;
}
}
boss1Opacity = boss1Opacity - 25;
boss1invBlink = boss1invBlink - 25;
}
}
if (boss1Act == 6 && boss1X > 600)
{
if (boss1Opacity < 255 && boss1invBlink
< 255)
{
if (boss1Opacity == 0)
{
if (invisPlay == false)
{
invisPlay = true;
}
}
boss1Opacity = boss1Opacity + 25;
boss1invBlink = boss1invBlink + 25;
}
}
if (boss1Opacity <= 0)
{
boss1Opacity = 0;
}
if (boss1invBlink <= 0)
{
boss1invBlink = 0;
}
if (boss1Opacity >= 255)
{
boss1Opacity = 255;
}
if (boss1invBlink >= 255)
{
boss1invBlink = 255;
}
if (slash8 == false && boss1AttackTimer >
190 && boss1X < 600)
{
if (boss1X != 1041)
{
boss1X = 1041;
boss1Frame = 0;
}
}
if (boss1Act == 6 && boss1X < 600 &&
(boss1Opacity > 0 && boss1invBlink > 0))
{
boss1X = boss1X + 2;
}
if (boss1Act == 6 && boss1X > 600 &&
(boss1Opacity > 0 && boss1invBlink > 0))
{
if (boss1X < 1093)
{
boss1X = boss1X + 2;
}
else if (boss1X >= 1093)
{
boss1X = 1093;
}
}
if (boss1X >= 1093 && boss1Frame >= 15)
{
boss1FaceL = true;
attackThunderslash = false;
boss1Stamina = boss1Stamina - 4;
}
}
else if (boss1FaceL == true)
{
slashFacing = 1;
if (boss1Act == 6 && boss1X > 600)
{
if (boss1Opacity > 0 && boss1invBlink >
0)
{
if (boss1Opacity == 255)
{
if (invisPlay == false)
{
invisPlay = true;
}
}
boss1Opacity = boss1Opacity - 25;
boss1invBlink = boss1invBlink - 25;
}
}
if (boss1Act == 6 && boss1X < 600)
{
if (boss1Opacity < 255 && boss1invBlink
< 255)
{
if (boss1Opacity == 0)
{
if (invisPlay == false)
{
invisPlay = true;
}
}
boss1Opacity = boss1Opacity + 25;
boss1invBlink = boss1invBlink + 25;
}
}
if (boss1Opacity <= 0)
{
boss1Opacity = 0;
}
if (boss1invBlink <= 0)
{
boss1invBlink = 0;
}
if (boss1Opacity >= 255)
{
boss1Opacity = 255;
}
if (boss1invBlink >= 255)
{
boss1invBlink = 255;
}
if (slash8 == false && boss1AttackTimer >
190 && boss1X > 600)
{
if (boss1X != 112)
{
boss1X = 112;
boss1Frame = 0;
}
}
if (boss1Act == 6 && boss1X > 600 &&
(boss1Opacity > 0 && boss1invBlink > 0))
{
boss1X = boss1X - 2;
}
if (boss1Act == 6 && boss1X < 600 &&
(boss1Opacity > 0 && boss1invBlink > 0))
{
if (boss1X > 60)
{
boss1X = boss1X - 2;
}
else if (boss1X <= 60)
{
boss1X = 60;
}
}
if (boss1X <= 60 && boss1Frame >= 15)
{
boss1FaceL = false;
attackThunderslash = false;
boss1Stamina = boss1Stamina - 4;
}
}
}
#endregion
#region Thundercloud
if (attackThundercloud == true)
{
boss1ProjFrameCT++;
if (boss1ProjFrameCT >= 6)
{
boss1ProjFrameCT = 0;
attackFrame++;
if (attackFrame >= 16)
{
attackFrame = 0;
}
}
if (boss1Act != 5)
{
boss1Act = 5;
boss1Frame = 0;
}
if (cloudY > 413)
{
cloudY--;
cloudY--;
}
if (cloudY <= 413)
{
cloudY = 413;
if (boss1FaceL == false)
{
if (cloud1X < cloud1XMax)
{
cloud1X++;
cloud1X++;
}
else if (cloud1X >= cloud1XMax)
{
cloud1X = cloud1XMax;
}
if (cloud2X < cloud2XMax)
{
cloud2X++;
cloud2X++;
cloud2X++;
cloud2X++;
}
else if (cloud2X >= cloud2XMax)
{
cloud2X = cloud2XMax;
}
if (cloud3X < cloud3XMax)
{
cloud3X++;
cloud3X++;
cloud3X++;
cloud3X++;
cloud3X++;
cloud3X++;
}
else if (cloud3X >= cloud3XMax)
{
cloud3X = cloud3XMax;
}
if (cloud4X < cloud4XMax)
{
cloud4X++;
cloud4X++;
cloud4X++;
cloud4X++;
cloud4X++;
cloud4X++;
cloud4X++;
cloud4X++;
}
else if (cloud4X >= cloud4XMax)
{
cloud4X = cloud4XMax;
}
}
if (boss1FaceL == true)
{
if (cloud1X > cloud1XMax)
{
cloud1X--;
cloud1X--;
cloud1X--;
cloud1X--;
cloud1X--;
cloud1X--;
cloud1X--;
cloud1X--;
}
else if (cloud1X <= cloud1XMax)
{
cloud1X = cloud1XMax;
}
if (cloud2X > cloud2XMax)
{
cloud2X--;
cloud2X--;
cloud2X--;
cloud2X--;
cloud2X--;
cloud2X--;
}
else if (cloud2X <= cloud2XMax)
{
cloud2X = cloud2XMax;
}
if (cloud3X > cloud3XMax)
{
cloud3X--;
cloud3X--;
cloud3X--;
cloud3X--;
}
else if (cloud3X <= cloud3XMax)
{
cloud3X = cloud3XMax;
}
if (cloud4X > cloud4XMax)
{
cloud4X--;
cloud4X--;
}
else if (cloud4X <= cloud4XMax)
{
cloud4X = cloud4XMax;
}
}
}
if (cloud1X == cloud1XMax && cloud2X ==
cloud2XMax && cloud3X == cloud3XMax && cloud4X == cloud4XMax)
{
boss1AttackTimer++;
if (boss1AttackTimer >= 30)
{
if (attackAct != 1)
{
if (thunderProjPlay == false)
{
thunderProjPlay = true;
}
attackAct = 1;
attackFrame = 0;
}
}
}
if (boss1AttackTimer >= 35 && attackAct == 1 &&
attackFrame >= 10)
{
attackThundercloud = false;
boss1Stamina = boss1Stamina - 2;
}
}
#endregion
#region Thunderblast
if (attackThunderblast == true)
{
if (boss1Act != 4 && boss1Act != 9)
{
if (shortCharge == false)
{
shortCharge = true;
}
boss1Act = 9;
boss1Frame = 0;
}
if (boss1Act == 4 && boss1AttackCT < 120)
{
laser1 = true;
laserProx1 = true;
loopThunderBlast.playSFX(sfxVolume,
tempVolume, pauseVolume);
boss1ProjFrameCT++;
boss1AttackCT++;
if (boss1ProjFrameCT >= 6)
{
boss1ProjFrameCT = 0;
attackFrame++;
if (attackFrame >= 8)
{
attackFrame = 0;
}
}
if (attackFrame >= 8)
{
attackFrame = 0;
}
}
if (boss1AttackCT >= 120)
{
attackThunderblast = false;
loopThunderBlast.pauseSFX();
laser1 = false;
laserProx1 = false;
boss1Stamina = boss1Stamina - 10;
}
}
#endregion
#region Counter
if (boss1Counter == true)
{
boss1AttackCT++;
if (boss1AttackCT >= 6)
{
counterFrame++;
boss1AttackCT = 0;
}
if (counterFrame >= 7)
{
boss1AttackCT = 0;
counterFrame = 0;
boss1Counter = false;
}
}
#endregion
}
if (boss1Knockback == false)
{
#region Wait and RNG
if (attackThunderbolt == false && attackThunderblast
== false && attackThundercloud == false && attackThunderslash == false &&
boss1Counter == false)
{
bossCounterCooldown++;
boss1invBlink = 255;
boss1AttackTimer = 0;
boss1AttackCT = 0;
if (needRand == true)
{
checkRand = generateRandom.Next(1, 15);
needRand = false;
haveRand = true;
}
if (boss1Stamina <= 0)
{
boss1Exhausted = true;
}
if (boss1Exhausted == false)
{
boss1WaitTimer++;
if (boss1WaitTimer >= 93)
{
if (needRand == false && haveRand ==
false)
{
needRand = true;
boss1WaitTimer = 0;
}
if (haveRand == true)
{
if (checkRand >= 0 && checkRand <=
4)
{
boss1AttackCT = 0;
boss1ProjFrameCT = 0;
dragonLookWait = dragonLookWait
+ 1;
mogLookWait = mogLookWait + 2;
ninjaLookWait = ninjaLookWait +
3;
if (boss1FaceL == false)
{
boltUpX = 77;
}
else if (boss1FaceL == true)
{
boltUpX = 7;
}
attackThunderbolt = true;
attackThunderblast = false;
attackThundercloud = false;
attackThunderslash = false;
if (boss1FaceL == false)
{
boltUpX = boss1X - 105;
boltUp = false;
boltDn = false;
}
else if (boss1FaceL == true)
{
boltUpX = boss1X - 209;
boltUp = false;
boltDn = false;
}
boss1Frame = 0;
}
else if (checkRand >= 5 && checkRand
<= 8)
{
boss1AttackTimer = 0;
dragonLookWait = dragonLookWait
+ 2;
mogLookWait = mogLookWait + 3;
ninjaLookWait = ninjaLookWait +
1;
attackThunderbolt = false;
attackThunderblast = false;
attackThundercloud = false;
attackThunderslash = true;
boss1Frame = 0;
slash1CT = 0;
slash1Frame = 0;
slash2CT = 0;
slash2Frame = 0;
slash3CT = 0;
slash3Frame = 0;
slash4CT = 0;
slash4Frame = 0;
slash5CT = 0;
slash5Frame = 0;
slash6CT = 0;
slash6Frame = 0;
slash7CT = 0;
slash7Frame = 0;
slash8CT = 0;
slash8Frame = 0;
if (checkRand == 5)
{
slashOddY = 560;
slashEvenY = 425;
}
if (checkRand == 6)
{
slashOddY = 425;
slashEvenY = 560;
}
if (checkRand == 7)
{
slashOddY = 560;
slashEvenY = 560;
}
if (checkRand == 8)
{
slashOddY = 425;
slashEvenY = 425;
}
}
else if (checkRand >= 9 && checkRand
<= 12)
{
boss1ProjFrameCT = 0;
attackFrame = 0;
boss1AttackTimer = 0;
boss1Frame = 0;
attackAct = 0;
dragonLookWait = dragonLookWait
+ 3;
mogLookWait = mogLookWait + 1;
ninjaLookWait = ninjaLookWait +
2;
attackThunderbolt = false;
attackThunderblast = false;
attackThundercloud = true;
attackThunderslash = false;
cloudY = boss1Y + 17;
cloud1X = boss1X + 30;
cloud2X = boss1X + 30;
cloud3X = boss1X + 30;
cloud4X = boss1X + 30;
if (checkRand == 9)
{
cloud1XMax = 170;
cloud2XMax = 450;
cloud3XMax = 810;
if (boss1FaceL == false)
{
cloud4XMax = 1140;
}
else if (boss1FaceL == true)
{
cloud4XMax = 1040;
}
}
if (checkRand == 10)
{
cloud1XMax = 200;
cloud2XMax = 300;
cloud3XMax = 700;
cloud4XMax = 800;
}
if (checkRand == 11)
{
if (boss1FaceL == false)
{
cloud1XMax = 120;
cloud2XMax = 240;
cloud3XMax = 360;
cloud4XMax = 480;
}
if (boss1FaceL == true)
{
cloud1XMax = 620;
cloud2XMax = 740;
cloud3XMax = 860;
cloud4XMax = 980;
}
}
if (checkRand == 12)
{
if (boss1FaceL == false)
{
cloud1XMax = 93;
}
else if (boss1FaceL == true)
{
cloud1XMax = 41;
}
cloud2XMax = 353;
cloud3XMax = 613;
cloud4XMax = 873;
}
}
else if (checkRand >= 13)
{
if (boss1FaceL == false)
{
thunderBlastX = 146;
attackAct = 0;
}
else if (boss1FaceL == true)
{
thunderBlastX = -10;
attackAct = 1;
}
boss1ProjFrameCT = 0;
attackFrame = 0;
boss1AttackTimer = 0;
boss1Frame = 0;
dragonLookWait = dragonLookWait
+ 5;
mogLookWait = mogLookWait + 5;
ninjaLookWait = ninjaLookWait +
5;
attackThunderbolt = false;
attackThunderblast = true;
attackThundercloud = false;
attackThunderslash = false;
}
boss1WaitTimer = 0;
haveRand = false;
}
}
if (boss1Act != 0 && boss1HP <= 7)
{
boss1Act = 0;
boss1Frame = 0;
}
else if (boss1Act != 1 && boss1HP > 7)
{
boss1Act = 1;
boss1Frame = 0;
}
}
else if (boss1Exhausted == true)
{
boss1invBlink = 255;
if (boss1Act != 12)
{
boss1Act = 12;
boss1Frame = 0;
}
}
}
#endregion
#region Counterattack
if (boss1Counter == true)
{
boss1WaitTimer++;
if (boss1Act != 7)
{
if (slashPlay == false)
{
slashPlay = true;
}
bossCounterCooldown = 0;
boss1AttackCT = 0;
counterFrame = 0;
boss1Act = 7;
boss1Frame = 0;
}
}
#endregion
}
#region Boss 1 Knockback
else if (boss1Knockback == true)
{
if (boss1Exhausted == true)
{
boss1ExhaustedRecharge = 0;
boss1Exhausted = false;
if (boss1HP > 10)
{
boss1Stamina = 10;
}
else if (boss1HP <= 10)
{
boss1Stamina = 5;
}
}
if (boss1Act != 11)
{
boss1Act = 11;
}
boss1knockbackTimer++;
if (boss1knockbackTimer >= 60)
{
boss1knockbackTimer = 0;
boss1Knockback = false;
}
if (boss1knockbackTimer % 2 == 0)
{
boss1invBlink = 0;
}
else
{
boss1invBlink = 255;
}
}
#endregion
#region Boss 1 Damage
if (boss1BreathHit == true)
{
boss1hitTimer++;
if (boss1hitTimer >= 2)
{
boss1BreathHit = false;
if (breathType != 2 && breathType != 4)
{
if ((breathDmg + breathDmgBonus + breathLV +
breathDmgTreasure1 + breathDmgTreasure2 + (boss1FireVul * breathCritBonus)) > 0)
{
boss1Knockback = true;
boss1HP = boss1HP - ((breathDmg +
breathDmgBonus + breathLV + breathDmgTreasure1 + breathDmgTreasure2 + (boss1FireVul
* breathCritBonus)));
breathXP++;
}
}
boss1hitTimer = 0;
}
}
if (boss1ClawHit == true)
{
boss1hitTimer++;
if (boss1hitTimer >= 2)
{
boss1ClawHit = false;
if ((clawDmg + clawDmgBonus + (clawLV * 2) +
clawDmgTreasure1 + clawDmgTreasure2) > 0)
{
boss1Knockback = true;
boss1HP = boss1HP - ((clawDmg + clawDmgBonus
+ (clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2));
clawXP++;
}
boss1hitTimer = 0;
}
}
#endregion
#region Boss 1 Defeated
if (boss1HP <= 0)
{
if (whiteMatte == false)
{
whiteMatte = true;
musicFade = true;
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
}
if (whiteMatteOpacity >= 255)
{
fadedIn = false;
fadeWait = true;
toStory = true;
story1_Bpost = true;
save.Data.boss1NoDmg = 1;
boss1Clean = 1;
if (drgnHPNow == drgnHPMax)
{
achievements.UpdateAch(-1, -1, 1, -1, -1, -
1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
save.Data.boss1Clean = true;
boss1NoDmg = true;
}
save.Save();
}
}
#endregion
}
#endregion
#region 5-1 Frame
if (stage5e1 == true)
{
barrierCT++;
if (barrierCT >= 6)
{
barrierFrame++;
if (barrierFrame >= 4)
{
barrierFrame = 0;
}
barrierCT = 0;
}
if (niaOn == true)
{
achievements.UpdateAch(-1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 1, -1, -1, -1, -1);
}
}
#endregion
#region 7-B 2 Enemy AI
if (stage7eB == true)
{
if (boss7Phase2 == true)
{
#region hit delay
if (headHitDelay > 0)
{
headHitDelay--;
}
#endregion
#region animate
#region king
mechKingCT++;
if (mechKingCT >= 6)
{
mechKingCT = 0;
mechKingFrame++;
}
if (mechKingFrame >= 16)
{
mechKingFrame = 0;
if (mechKingAct == 1) //fire
{
mechKingAct = 0;
mechFireAttack = true;
mechBroochDamaged = false;
}
else if (mechKingAct == 2) //ice
{
mechKingAct = 0;
mechIceX1 = 1900;
mechIceX2 = 1900;
mechIceX3 = 1900;
mechIceX4 = 1900;
mechIceX5 = 1900;
mechIceX6 = 1900;
mechIceX7 = 1900;
mechIceX8 = 1900;
mechIceY1 = 0;
mechIceY2 = 0;
mechIceY3 = 0;
mechIceY4 = 0;
mechIceY5 = 0;
mechIceY6 = 0;
mechIceY7 = 0;
mechIceY8 = 0;
mechIceAttack = true;
mechStaffDamaged = false;
}
else if (mechKingAct == 3) //thunder
{
mechKingAct = 0;
mechCloudOpacity = 0;
mechThunderWait = 0;
drgnThunderCharge = 0;
mechSwordDamaged = false;
mechThunderVel = 2;
mechThunderVelCT = 0;
mechThunderX = 120;
mechThunderDuration = 0;
thunderStrikeCT = 0;
thunderStrikeFrame = 0;
mechTeslaAct = 0;
mechTeslaFrame = 0;
mechTeslaCT = 0;
mechTeslaY = 150;
mechThunderAttack = true;
}
else if (mechKingAct == 4) //fist
{
mechKingAct = 0;
mechFistWait = 0;
mechFistVel = 0;
mechFistVelCT = 0;
mechFistFrame = 0;
mechFistAct = 0;
mechFistCT = 0;
mechFistFarX = 0;
mechFistX = 797;
mechPunchAttack = true;
}
else if (mechKingAct == 5) //laser
{
mechKingAct = 0;
mechHeadSerial = 0;
mechHeadRest = 0;
mechHeadRNG = generateRandom.Next(1, 4);
mechLaserAttack = true;
mechHeadChargeOn = false;
}
}
if (mechHeadHP <= 0)
{
if (mechKingAct != 6)
{
mechKingFrame = 0;
mechKingCT = 0;
mechKingAct = 6;
}
}
#endregion
#region head
mechHeadCT++;
if (mechHeadCT >= 3)
{
mechHeadCT = 0;
mechHeadFrame++;
}
if (mechHeadFrame >= 4)
{
mechHeadFrame = 0;
}
#endregion
#region brooch
if (mechBroochHP > 0)
{
mechBroochCT++;
if (mechBroochCT >= 6)
{
mechBroochCT = 0;
mechBroochFrame++;
}
if (mechBroochFrame >= 16)
{
mechBroochFrame = 0;
}
}
else
{
mechBroochFrame = 0;
mechBroochCT = 0;
}
#endregion
#region exhaust
mechExhaustCT++;
if (mechExhaustCT >= 6)
{
mechExhaustCT = 0;
mechExhaustFrame++;
}
if (mechExhaustFrame >= 4)
{
mechExhaustFrame = 0;
}
mechIntakeCT++;
if (mechIntakeCT >= 6)
{
mechIntakeCT = 0;
mechIntakeFrame++;
}
if (mechIntakeFrame >= 4)
{
mechIntakeFrame = 0;
}
#endregion
#endregion
#region reload
if (mechKingAct == 0)
{
if (mechLaserAttack == false && mechFireAttack
== false && mechPunchAttack == false && mechFistHP > 0)
{
mechFistCharge++;
}
if (mechFireAttack == false && mechIceAttack ==
false && mechThunderAttack == false && mechSwordHP > 0)
{
mechThunderCharge++;
}
if (mechBroochHP > 0 && mechFireAttack == false
&& mechLaserAttack == false)
{
mechFireCharge++;
}
if (mechFireAttack == false && mechLaserAttack
== false && mechThunderAttack == false && mechIceAttack == false && mechStaffHP > 0)
{
mechIceCharge++;
}
}
if (mechHeadHP > 0 && mechLaserAttack == false)
{
mechLaserCharge++;
}
#endregion
#region fire attack
if (mechFireCharge >= 360 && mechThunderAttack ==
false && mechIceAttack == false && mechLaserAttack == false && mechPunchAttack ==
false && mechBroochAct != 4)
{
mechFireCharge = 0;
mechKingCT = 0;
mechKingFrame = 0;
mechKingAct = 1;
}
if (mechFireAttack == true)
{
if (mechBroochAct == 0)
{
if (mechBroochAct != 1)
{
if (laserCharge == false)
{
laserCharge = true;
}
mechBroochCT = 0;
mechBroochFrame = 0;
mechBroochAct = 1;
}
}
else if (mechBroochAct == 2)
{
if (mechBroochAct != 3)
{
if (laserCharge == false)
{
laserCharge = true;
}
mechBroochCT = 0;
mechBroochFrame = 0;
mechBroochAct = 3;
}
}
mechFireChargeCT++;
if (mechFireChargeCT >= 6)
{
mechFireChargeCT = 0;
mechFireChargeFrame++;
}
if (mechFireChargeFrame >= 16)
{
mechFireChargeFrame = 0;
mechFireWait++;
}
if (mechFireWait >= 2)
{
mechFireCT++;
if (mechFireCT >= 6)
{
mechFireCT = 0;
mechFireFrame++;
}
if (mechFireFrame >= 4)
{
mechFireFrame = 0;
}
}
if (mechFireWait >= 4)
{
mechFireAttack = false;
mechFireFrame = 0;
mechFireCT = 0;
mechFireWait = 0;
mechFireChargeFrame = 0;
mechFireChargeCT = 0;
mechFireFrame = 0;
}
}
else
{
if (mechBroochHP > 0)
{
mechBroochAct = 0;
}
}
#endregion
#region thunder attack
if (mechThunderCharge >= 240)
{
mechThunderAct = 0;
mechThunderDuration = 0;
mechThunderCharge = 0;
mechKingCT = 0;
mechKingFrame = 0;
mechKingAct = 3;
}
#region clouds
mechCloudsFwdX1 += 6;
mechCloudsFwdX2 += 6;
mechCloudsFwdX3 += 6;
if (mechCloudsFwdX1 > 1600)
{
mechCloudsFwdX1 = mechCloudsFwdX3 - 1694;
}
if (mechCloudsFwdX2 > 1600)
{
mechCloudsFwdX2 = mechCloudsFwdX1 - 1694;
}
if (mechCloudsFwdX3 > 1600)
{
mechCloudsFwdX3 = mechCloudsFwdX2 - 1694;
}
mechCloudsBackX1--;
mechCloudsBackX2--;
mechCloudsBackX3--;
if (mechCloudsBackX1 < -1750)
{
mechCloudsBackX1 = mechCloudsBackX3 + 1694;
}
if (mechCloudsBackX2 < -1750)
{
mechCloudsBackX2 = mechCloudsBackX1 + 1694;
}
if (mechCloudsBackX3 < -1750)
{
mechCloudsBackX3 = mechCloudsBackX2 + 1694;
}
#endregion
if (mechThunderAttack == true)
{
if (mechThunderX >= 1900)
{
mechThunderAttack = false;
mechThunderX = 0;
mechThunderVel = 0;
}
if (mechCloudOpacity >= 255)
{
mechThunderWait++;
}
#region clouds
if (mechCloudOpacity < 255)
{
mechCloudOpacity += 5;
}
if (mechCloudOpacity > 255)
{
mechCloudOpacity = 255;
}
#endregion
#region hit & breath
if (mechCloudOpacity == 255)
{
if (drgnFire == true && breathType == 1)
{
drgnThunderCharge++;
drgnThunderCT++;
if (drgnThunderCT >= 6)
{
drgnThunderCT = 0;
drgnThunderFrame++;
}
if (drgnThunderFrame >= 4)
{
drgnThunderFrame = 0;
}
}
if (drgnFire == false)
{
if (drgnThunderCT != 0)
{
drgnThunderCT = 0;
}
if (drgnThunderFrame != 0)
{
drgnThunderFrame = 0;
}
}
if (drgnThunderCharge >= 60)
{
if (mechSwordDamaged == false)
{
if (drgnThunderStrike == false)
{
thunderStrikeCT = 0;
thunderStrikeFrame = 0;
drgnThunderStrike = true;
}
mechSwordDamaged = true;
mechSwordHit = true;
mechSwordInvCT = 60;
}
}
if (drgnThunderStrike == true)
{
thunderStrikeCT++;
if (thunderStrikeCT >= 6)
{
thunderStrikeCT = 0;
thunderStrikeFrame++;
}
if (thunderStrikeFrame >= 8)
{
thunderStrikeFrame = 0;
thunderStrikeCT = 0;
drgnThunderStrike = false;
}
}
}
#endregion
#region thunder ring
if (mechThunderWait >= 120 && mechCloudOpacity
>= 255)
{
if (mechTeslaOn == false)
{
mechThunderWait = 0;
mechTeslaFrame = 0;
mechTeslaCT = 0;
mechTeslaAct = 0;
mechTeslaOn = true;
}
}
if (mechTeslaOn == true)
{
mechTeslaCT++;
if (mechTeslaCT >= 6)
{
mechTeslaCT = 0;
mechTeslaFrame++;
}
if (mechTeslaFrame >= 4)
{
mechTeslaFrame = 0;
if (mechTeslaAct == 0)
{
mechTeslaAct = 1;
}
}
if (mechTeslaAct == 1)
{
if (mechTeslaY > -300)
{
mechTeslaY -= 5;
}
}
}
#endregion
#region attack
#region animate
mechThunderCT++;
if (mechThunderCT >= 6)
{
mechThunderCT = 0;
mechThunderFrame++;
}
if (mechThunderFrame >= 4)
{
mechThunderFrame = 0;
if (mechThunderX >= 320)
{
mechThunderDuration++;
}
if (mechThunderDuration == 4 ||
mechThunderDuration == 6 || mechThunderDuration == 8)
{
mechThunderAct++;
}
else if (mechThunderAct == 3)
{
mechThunderAct++;
}
if (mechThunderAct >= 4)
{
mechThunderAttack = false;
mechThunderAct = 0;
mechThunderDuration = 0;
}
}
#endregion
if (mechTeslaY <= -200)
{
#region move
mechThunderVelCT++;
if (mechThunderVelCT >= mechThunderCTDelay)
{
mechThunderVelCT = 0;
if (mechThunderVel <
mechThunderSpeedCap)
{
mechThunderVel++;
}
if (mechThunderVel >
mechThunderSpeedCap)
{
mechThunderVel--;
}
}
if (mechThunderVel > mechThunderSpeedCap)
{
mechThunderCTDelay = 60;
}
else
{
mechThunderCTDelay = 12;
}
if (drgnX - mechThunderX < 300)
{
mechThunderSpeedCap = 2;
}
else if (drgnX - mechThunderX >= 300 &&
drgnX - mechThunderX < 350)
{
mechThunderSpeedCap = 3;
}
else if (drgnX - mechThunderX >= 350 &&
drgnX - mechThunderX < 400)
{
mechThunderSpeedCap = 4;
}
else if (drgnX - mechThunderX >= 400 &&
drgnX - mechThunderX < 450)
{
mechThunderSpeedCap = 5;
}
else if (drgnX - mechThunderX >= 450 &&
drgnX - mechThunderX < 500)
{
mechThunderSpeedCap = 6;
}
else if (drgnX - mechThunderX >= 500 &&
drgnX - mechThunderX < 550)
{
mechThunderSpeedCap = 7;
}
else if (drgnX - mechThunderX >= 550 &&
drgnX - mechThunderX < 600)
{
mechThunderSpeedCap = 8;
}
else if (drgnX - mechThunderX >= 600 &&
drgnX - mechThunderX < 650)
{
mechThunderSpeedCap = 9;
}
else if (drgnX - mechThunderX >= 650 &&
drgnX - mechThunderX < 700)
{
mechThunderSpeedCap = 10;
}
else if (drgnX - mechThunderX >= 700 &&
drgnX - mechThunderX < 750)
{
mechThunderSpeedCap = 11;
}
else if (drgnX - mechThunderX >= 750 &&
drgnX - mechThunderX < 800)
{
mechThunderSpeedCap = 12;
}
else if (drgnX - mechThunderX >= 800 &&
drgnX - mechThunderX < 750)
{
mechThunderSpeedCap = 13;
}
mechThunderX += mechThunderVel;
#endregion
}
#endregion
}
else
{
if (mechCloudOpacity == 0)
{
mechCloudsFwdX1 = 0;
mechCloudsFwdX2 = -1694;
mechCloudsFwdX3 = -3388;
mechCloudsBackX1 = 0;
mechCloudsBackX2 = 1694;
mechCloudsBackX3 = 3388;
}
if (mechCloudOpacity > 0)
{
mechCloudOpacity -= 5;
}
if (mechCloudOpacity < 0)
{
mechCloudOpacity = 0;
}
mechThunderX = 120;
mechThunderWait = 0;
}
#endregion
#region staff attack
#region animate
mechScepterCT++;
if (mechScepterCT >= 6)
{
mechScepterCT = 0;
mechScepterFrame++;
}
if (mechScepterFrame >= 4)
{
mechScepterFrame = 0;
}
#endregion
#region reload
if (mechIceCharge >= 300 && mechFireAttack == false
&& mechLaserAttack == false && mechThunderAttack == false)
{
mechKingCT = 0;
mechKingFrame = 0;
mechKingAct = 2;
mechIceCharge = 0;
if (mechScepterAct != 2 && mechScepterAct != 1)
{
mechScepterFrame = 0;
mechScepterCT = 0;
mechScepterAct = 1;
}
}
#endregion
if (mechIceAttack == true)
{
#region ice 1
if (mechIceY1 < 350)
{
mechIceY1 = generateRandom.Next(400, 650);
}
if (mechIceX1 > 0)
{
mechIceCT1++;
if (mechIceCT1 >= 6)
{
mechIceCT1 = 0;
mechIceFrame1++;
}
if (mechIceFrame1 >= 4)
{
mechIceFrame1 = 0;
}
mechIceX1 -= 7;
if (mechIceX1 <= 1300)
{
if (mechIceY2 < 350)
{
mechIceY2 = generateRandom.Next(400,
650);
}
}
}
#endregion
#region ice 2
if (mechIceX2 > 0)
{
if (mechIceX1 <= 1300)
{
mechIceCT2++;
if (mechIceCT2 >= 6)
{
mechIceCT2 = 0;
mechIceFrame2++;
}
if (mechIceFrame2 >= 4)
{
mechIceFrame2 = 0;
}
mechIceX2 -= 7;
}
if (mechIceX2 <= 1300)
{
if (mechIceY3 < 350)
{
mechIceY3 = generateRandom.Next(400,
650);
}
}
}
#endregion
#region ice 3
if (mechIceX3 > 0)
{
if (mechIceX2 <= 1300)
{
mechIceCT3++;
if (mechIceCT3 >= 6)
{
mechIceCT3 = 0;
mechIceFrame3++;
}
if (mechIceFrame3 >= 4)
{
mechIceFrame3 = 0;
}
mechIceX3 -= 7;
}
if (mechIceX3 <= 1300)
{
if (mechIceY4 < 350)
{
mechIceY4 = generateRandom.Next(400,
650);
}
}
}
#endregion
#region ice 4
if (mechIceX4 > 0)
{
if (mechIceX3 <= 1300)
{
mechIceCT4++;
if (mechIceCT4 >= 6)
{
mechIceCT4 = 0;
mechIceFrame4++;
}
if (mechIceFrame4 >= 4)
{
mechIceFrame4 = 0;
}
mechIceX4 -= 7;
}
if (mechIceX4 <= 1300)
{
if (mechIceY5 < 350)
{
mechIceY5 = generateRandom.Next(400,
650);
}
}
}
#endregion
#region ice 5
if (mechIceX5 > 0)
{
if (mechIceX4 <= 1300)
{
mechIceCT5++;
if (mechIceCT5 >= 6)
{
mechIceCT5 = 0;
mechIceFrame5++;
}
if (mechIceFrame5 >= 4)
{
mechIceFrame5 = 0;
}
mechIceX5 -= 7;
}
if (mechIceX5 <= 1300)
{
if (mechIceY6 < 350)
{
mechIceY6 = generateRandom.Next(400,
650);
}
}
}
#endregion
#region ice 6
if (mechIceX6 > 0)
{
if (mechIceX5 <= 1300)
{
mechIceCT6++;
if (mechIceCT6 >= 6)
{
mechIceCT6 = 0;
mechIceFrame6++;
}
if (mechIceFrame6 >= 4)
{
mechIceFrame6 = 0;
}
mechIceX6 -= 7;
}
if (mechIceX6 <= 1300)
{
if (mechIceY7 < 350)
{
mechIceY7 = generateRandom.Next(400,
650);
}
}
}
#endregion
#region ice 7
if (mechIceX7 > 0)
{
if (mechIceX6 <= 1300)
{
mechIceCT7++;
if (mechIceCT7 >= 6)
{
mechIceCT7 = 0;
mechIceFrame7++;
}
if (mechIceFrame7 >= 4)
{
mechIceFrame7 = 0;
}
mechIceX7 -= 7;
}
if (mechIceX7 <= 1300)
{
if (mechIceY8 < 350)
{
mechIceY8 = generateRandom.Next(400,
650);
}
}
}
#endregion
#region ice 8
if (mechIceX8 > 0)
{
if (mechIceX7 <= 1300)
{
mechIceCT8++;
if (mechIceCT8 >= 6)
{
mechIceCT8 = 0;
mechIceFrame8++;
}
if (mechIceFrame8 >= 4)
{
mechIceFrame8 = 0;
}
mechIceX8 -= 7;
}
}
if (mechIceX8 <= 0)
{
mechIceAttack = false;
mechScepterAct = 0;
}
#endregion
}
#endregion
#region fist attack
#region reload
if (mechFistCharge >= 180 && mechLaserAttack ==
false && mechFireAttack == false)
{
mechFistCharge = 0;
mechKingCT = 0;
mechKingFrame = 0;
mechKingAct = 4;
}
#endregion
#region animate
mechFistCT++;
if (mechFistCT >= 6)
{
mechFistCT = 0;
mechFistFrame++;
}
if (mechFistFrame >= 4)
{
mechFistFrame = 0;
if (mechFistAct == 0)
{
mechFistAct = 1;
}
if (mechFistAct == 2)
{
mechPunchAttack = false;
mechFistAct = 0;
mechFistCT = 0;
}
}
#endregion
if (mechFistAct == 1)
{
if (mechFistWait < 60)
{
mechFistWait++;
}
if (mechFistWait >= 60)
{
if (mechFistFarX < 1900)
{
mechFistVelCT++;
if (mechFistVelCT >= 12)
{
mechFistVelCT = 0;
mechFistVel--;
}
if (mechFistFarX <= 0)
{
mechFistX += mechFistVel;
}
}
if (mechFistFarX >= 1900)
{
mechFistVelCT++;
if (mechFistVelCT >= 12)
{
mechFistVelCT = 0;
if (mechFistVel < -2)
{
mechFistVel++;
}
}
if (mechFistX > 797)
{
mechFistX += mechFistVel;
}
if (mechFistX <= 797)
{
mechFistX = 797;
mechFistFrame = 0;
mechFistCT = 0;
mechFistAct = 2;
mechFistFarX = 0;
}
}
}
}
if (mechFistX <= 0)
{
if (mechFistFarX < 1900)
{
mechFistFarX += 8;
}
if (mechFistFarX >= 1900)
{
mechFistX = 1900;
mechFistVel = -14;
}
}
#endregion
#region head attack
if (mechBroochHP > 0 || mechSwordHP > 0 ||
mechFistHP > 0 || mechStaffHP > 0)
{
if (mechLaserCharge >= 1200 && mechFireAttack ==
false && mechIceAttack == false && mechPunchAttack == false)
{
mechKingCT = 0;
mechKingFrame = 0;
mechKingAct = 5;
mechLaserCharge = 0;
}
}
else if (mechBroochHP <= 0 && mechSwordHP <= 0 &&
mechFistHP <= 0 && mechStaffHP > 0)
{
mechLaserCharge++;
if (mechLaserCharge >= 300 && mechFireAttack ==
false)
{
mechKingCT = 0;
mechKingFrame = 0;
mechKingAct = 5;
mechLaserCharge = 0;
}
}
if (mechLaserAttack == true)
{
if (mechHeadSerial == 0)
{
#region adjust X
if (mechHeadXPos > 875)
{
mechHeadAct = 1;
mechHeadXPos -= 3;
}
if (mechHeadXPos < 875)
{
mechHeadXPos = 875;
}
#endregion
}
#region move Y
if (mechHeadXPos == 875)
{
#region type 1
if (mechHeadRNG <= 1)
{
if (mechHeadSerial == 0)
{
if (mechHeadYPos < 350)
{
mechHeadYPos += 3;
}
if (mechHeadYPos >= 350)
{
mechHeadAct = 0;
if (mechHeadYPos > 350)
{
mechHeadYPos = 350;
}
if (mechHeadLaserOn == false &&
mechHeadChargeOn == false)
{
mechLaserDuration = 0;
mechLaserFrame = 0;
mechLaserCT = 0;
mechLaserAct = 0;
mechLaserShockCT = 0;
mechLaserShockFrame = 0;
mechHeadChargeOn = true;
}
}
}
}
#endregion
#region type 2
if (mechHeadRNG == 2)
{
if (mechHeadSerial == 0)
{
if (mechHeadYPos < 300)
{
mechHeadYPos += 3;
}
if (mechHeadYPos >= 300)
{
if (mechHeadLaserOn == false &&
mechHeadChargeOn == false)
{
mechLaserDuration = 0;
mechLaserFrame = 0;
mechLaserCT = 0;
mechLaserAct = 0;
mechLaserShockCT = 0;
mechLaserShockFrame = 0;
mechHeadChargeOn = true;
}
}
if (mechHeadChargeOn == false &&
mechHeadLaserOn == true && mechLaserWait >= 60)
{
mechHeadYPos++;
}
}
}
#endregion
#region type 3
if (mechHeadRNG >= 3)
{
if (mechHeadLaserOn == false)
{
if (mechHeadSerial == 0)
{
if (mechHeadYPos < 200)
{
mechHeadAct = 1;
mechHeadYPos += 3;
}
if (mechHeadYPos >= 200)
{
mechHeadAct = 0;
if (mechHeadYPos > 200)
{
mechHeadYPos = 200;
}
if (mechHeadLaserOn == false
&& mechHeadChargeOn == false)
{
mechLaserDuration = 0;
mechLaserFrame = 0;
mechLaserCT = 0;
mechLaserAct = 0;
mechLaserShockCT = 0;
mechLaserShockFrame = 0;
mechHeadChargeOn = true;
}
}
}
if (mechHeadSerial == 1)
{
if (mechHeadYPos < 350)
{
mechHeadAct = 1;
mechHeadYPos += 3;
}
if (mechHeadYPos >= 350)
{
mechHeadAct = 0;
if (mechHeadYPos > 350)
{
mechHeadYPos = 350;
}
if (mechHeadLaserOn == false
&& mechHeadChargeOn == false)
{
mechLaserDuration = 0;
mechLaserFrame = 0;
mechLaserCT = 0;
mechLaserAct = 0;
mechLaserShockCT = 0;
mechLaserShockFrame = 0;
mechHeadChargeOn = true;
}
}
}
if (mechHeadSerial == 2)
{
if (mechHeadYPos > 200)
{
mechHeadAct = 2;
mechHeadYPos -= 3;
}
if (mechHeadYPos <= 200)
{
mechHeadAct = 0;
if (mechHeadYPos < 200)
{
mechHeadYPos = 200;
}
if (mechHeadLaserOn == false
&& mechHeadChargeOn == false)
{
mechLaserDuration = 0;
mechLaserFrame = 0;
mechLaserCT = 0;
mechLaserAct = 0;
mechLaserShockCT = 0;
mechLaserShockFrame = 0;
mechHeadChargeOn = true;
}
}
}
if (mechHeadSerial == 3)
{
if (mechHeadYPos < 350)
{
mechHeadAct = 1;
mechHeadYPos += 3;
}
if (mechHeadYPos >= 350)
{
mechHeadAct = 0;
if (mechHeadYPos > 350)
{
mechHeadYPos = 350;
}
if (mechHeadLaserOn == false
&& mechHeadChargeOn == false)
{
mechLaserDuration = 0;
mechLaserFrame = 0;
mechLaserCT = 0;
mechLaserAct = 0;
mechLaserShockCT = 0;
mechLaserShockFrame = 0;
mechHeadChargeOn = true;
}
}
}
}
}
#endregion
}
#endregion
#region laser charge
if (mechHeadChargeOn == true)
{
mechHeadAct = 0;
mechLaserShockCT++;
if (mechLaserShockFrame == 0 &&
mechLaserShockCT == 1)
{
if (shortCharge == false)
{
shortCharge = true;
}
}
if (mechLaserShockCT >= 6)
{
mechLaserShockCT = 0;
mechLaserShockFrame++;
}
if (mechLaserShockFrame >= 4)
{
mechLaserWait = 0;
mechLaserShockFrame = 0;
mechLaserCT = 0;
mechLaserFrame = 0;
mechLaserAct = 0;
mechHeadLaserOn = true;
mechHeadChargeOn = false;
}
}
#endregion
#region mech laser on
if (mechHeadLaserOn == true)
{
if (mechLaserWait < 60)
{
mechLaserWait++;
}
if (mechLaserWait >= 60)
{
#region animate
mechLaserCT++;
if (mechLaserCT >= 6)
{
mechLaserCT = 0;
mechLaserFrame++;
}
if (mechLaserFrame >= 4)
{
mechLaserFrame = 0;
if (mechLaserAct == 1)
{
mechHeadLaserOn = false;
}
}
#endregion
mechHeadAct = 0;
if (mechLaserAct == 0)
{
mechLaserDuration++;
}
if (mechHeadRNG <= 1)
{
if (mechLaserDuration >= 240)
{
mechLaserFrame = 0;
mechLaserCT = 0;
mechLaserAct = 1;
mechLaserDuration = 0;
mechHeadSerial++;
}
}
if (mechHeadRNG == 2)
{
if (mechLaserDuration >= 120)
{
mechLaserFrame = 0;
mechLaserCT = 0;
mechLaserAct = 1;
mechLaserDuration = 0;
mechHeadSerial++;
}
}
if (mechHeadRNG >= 3)
{
if (mechLaserDuration >= 60)
{
mechLaserFrame = 0;
mechLaserCT = 0;
mechLaserAct = 1;
mechLaserDuration = 0;
mechHeadSerial++;
}
}
}
}
else
{
mechLaserAct = 0;
mechLaserCT = 0;
mechLaserFrame = 0;
mechLaserDuration = 0;
}
#endregion
#region end
if (mechHeadRNG < 3)
{
if (mechHeadSerial >= 1)
{
mechHeadRest++;
if (mechHeadRest < 300)
{
mechHeadAct = 0;
}
if (mechHeadRest >= 300)
{
if (mechHeadYPos > 50)
{
mechHeadAct = 2;
mechHeadYPos -= 3;
}
if (mechHeadYPos < 50)
{
mechHeadYPos = 50;
}
if (mechHeadYPos <= 50)
{
if (mechHeadXPos < 1050)
{
mechHeadAct = 2;
mechHeadXPos += 3;
}
if (mechHeadXPos >= 1050)
{
mechHeadAct = 0;
mechHeadXPos = 1050;
mechHeadRest = 0;
mechHeadAct = 0;
mechLaserAttack = false;
}
}
}
}
}
else if (mechHeadRNG >= 3)
{
if (mechHeadSerial >= 4)
{
mechHeadRest++;
if (mechHeadRest < 300)
{
mechHeadAct = 0;
}
if (mechHeadRest >= 300)
{
if (mechHeadYPos > 50)
{
mechHeadAct = 2;
mechHeadYPos -= 3;
}
if (mechHeadYPos < 50)
{
mechHeadYPos = 50;
}
if (mechHeadYPos <= 50)
{
if (mechHeadXPos < 1050)
{
mechHeadAct = 2;
mechHeadXPos += 3;
}
if (mechHeadXPos >= 1050)
{
mechHeadXPos = 1050;
mechHeadRest = 0;
mechHeadAct = 0;
mechLaserAttack = false;
}
}
}
}
}
#endregion
}
#endregion
#region take damage
#region head
if (mechHeadHit == true)
{
mechHeadHitWait++;
if (mechHeadHitWait >= 2)
{
mechHeadHitWait = 0;
mechHeadHit = false;
if (mechHeadFireHit == true)
{
mechHeadFireHit = false;
mechHeadHP = mechHeadHP - (breathDmg +
breathDmgBonus + breathLV + breathDmgTreasure1 + breathDmgTreasure2);
}
if (mechHeadClawHit == true)
{
mechHeadClawHit = false;
mechHeadHP = mechHeadHP - (clawDmg +
clawDmgBonus + (clawLV * 2) + clawDmgTreasure1 + clawDmgTreasure2);
}
}
}
if (mechHeadHP > 0)
{
if (mechHeadInvCT > 0)
{
mechHeadInvCT--;
if (mechHeadInvCT % 2 == 0)
{
mechHeadInvBlink = 0;
}
else
{
mechHeadInvBlink = 255;
}
if (mechHeadInvCT <= 0)
{
mechHeadInvBlink = 255;
mechHeadInvCT = 0;
}
}
else if (mechSwordDamage >= 300 ||
mechStaffDamage >= 300 || mechExhaustDamage >= 300 || mechSwordDamage >= 300 ||
mechFistDamage >= 300 || mechBroochDamage >= 300)
{
mechHeadInvBlink = 0;
if (mechSwordDamage >= 305)
{
if (mechHeadHP > 0)
{
mechHeadHP--;
}
mechSwordDamage = 0;
}
if (mechStaffDamage >= 305)
{
if (mechHeadHP > 0)
{
mechHeadHP--;
}
mechStaffDamage = 0;
}
if (mechExhaustDamage >= 305)
{
if (mechHeadHP > 0)
{
mechHeadHP--;
}
if (mechBroochHP > 0)
{
mechBroochHP--;
}
if (mechSwordHP > 0)
{
mechSwordHP--;
}
if (mechStaffHP > 0)
{
mechStaffHP--;
}
if (mechFistHP > 0)
{
mechFistHP--;
}
mechExhaustDamage = 0;
}
if (mechFistDamage >= 305)
{
if (mechHeadHP > 0)
{
mechHeadHP--;
}
mechFistDamage = 0;
}
if (mechBroochDamage >= 305)
{
if (mechHeadHP > 0)
{
mechHeadHP--;
}
mechBroochDamage = 0;
}
}
else
{
mechHeadInvBlink = 255;
}
}
else
{
mechHeadInvBlink = 255;
}
#endregion
#region brooch
if (mechBroochHit == true)
{
mechBroochHitWait++;
if (mechBroochHitWait >= 2)
{
mechBroochHitWait = 0;
mechBroochHit = false;
mechBroochHP -= (breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2);
}
}
if (mechBroochHP > 0)
{
if (mechBroochInvCT > 0)
{
mechBroochInvCT--;
if (mechBroochInvCT % 2 == 0)
{
mechBroochInvBlink = 0;
}
else
{
mechBroochInvBlink = 255;
}
}
else if (mechExhaustDamage >= 300)
{
mechBroochInvBlink = 0;
}
else
{
mechBroochInvBlink = 255;
}
}
else
{
mechBroochInvBlink = 255;
}
#endregion
#region sword
if (mechSwordHit == true)
{
mechSwordHitWait++;
if (mechSwordHitWait >= 2)
{
mechSwordHitWait = 0;
mechSwordHit = false;
mechSwordHP -= (breathDmg + breathDmgBonus +
breathLV + breathDmgTreasure1 + breathDmgTreasure2);
}
}
if (mechSwordHP > 0)
{
if (mechSwordInvCT > 0)
{
mechSwordInvCT--;
if (mechSwordInvCT % 2 == 0)
{
mechSwordInvBlink = 0;
}
else
{
mechSwordInvBlink = 255;
}
}
else if (mechExhaustDamage >= 300)
{
mechSwordInvBlink = 0;
}
else
{
mechSwordInvBlink = 255;
}
}
else
{
mechSwordInvBlink = 255;
}
#endregion
#region staff
if (mechStaffHit == true)
{
mechStaffHitWait++;
if (mechStaffHitWait >= 2)
{
mechStaffHitWait = 0;
mechStaffHit = false;
mechStaffHP -= (breathDmg + breathDmgBonus +
breathLV + breathDmgTreasure1 + breathDmgTreasure2);
}
}
if (mechStaffHP > 0)
{
if (mechStaffInvCT > 0)
{
mechStaffInvCT--;
if (mechStaffInvCT % 2 == 0)
{
mechStaffInvBlink = 0;
}
else
{
mechStaffInvBlink = 255;
}
}
else if (mechExhaustDamage >= 300)
{
mechStaffInvBlink = 0;
}
else
{
mechStaffInvBlink = 255;
}
}
else
{
mechStaffInvBlink = 255;
}
#endregion
#region fist
if (mechFistHit == true)
{
mechFistHitWait++;
if (mechFistHitWait >= 2)
{
mechFistHitWait = 0;
mechFistHit = false;
mechFistHP -= (breathDmg + breathDmgBonus +
breathLV + breathDmgTreasure1 + breathDmgTreasure2);
}
}
if (mechFistHP > 0)
{
if (mechFistInvCT > 0)
{
mechFistInvCT--;
if (mechFistInvCT % 2 == 0)
{
mechFistInvBlink = 0;
}
else
{
mechFistInvBlink = 255;
}
}
else if (mechExhaustDamage >= 300)
{
mechFistInvBlink = 0;
}
else
{
mechFistInvBlink = 255;
}
}
else
{
mechFistInvBlink = 255;
}
#endregion
#region exhaust
if (mechExhaustHit == true)
{
mechExhaustHitWait++;
if (mechExhaustHitWait >= 2)
{
mechExhaustHitWait = 0;
mechExhaustHit = false;
mechExhaustHP -= (breathDmg + breathDmgBonus
+ breathLV + breathDmgTreasure1 + breathDmgTreasure2);
if (mechExhaustHP <= 0 && exp2On == false)
{
exhaustExplosion = true;
exp2On = true;
}
}
}
if (mechExhaustHP > 0)
{
if (mechExhaustInvCT > 0)
{
mechExhaustInvCT--;
if (mechExhaustInvCT % 2 == 0)
{
mechExhaustInvBlink = 0;
}
else
{
mechExhaustInvBlink = 255;
}
}
else
{
mechExhaustInvBlink = 255;
}
}
else
{
mechExhaustInvBlink = 255;
}
#endregion
#endregion
#region explosions
#region sword
if (mechSwordHP <= 0 && mechSwordFrame == 0)
{
if (exp5On == false)
{
exp5On = true;
swordExplosion = true;
}
}
#endregion
#region fist
if (mechPunchAttack == false && mechFistHP <= 0 &&
mechHandStatus == 0)
{
if (exp4On == false)
{
fistExplosion = true;
exp4On = true;
}
}
#endregion
#region staff
if (mechScepterAct == 0 && mechStaffHP <= 0)
{
if (exp3On == false)
{
staffExplosion = true;
exp3On = true;
}
}
#endregion
#region exhaust
if (mechExhaustHP <= 0 && exp2On == false &&
exhaustSmoke == false)
{
if (exp2On == false)
{
exhaustExplosion = true;
exp2On = true;
}
}
#endregion
#region brooch
if (mechBroochHP <= 0 && exp6On == false &&
mechBroochAct == 0)
{
if (exp6On == false)
{
broochExplosion = true;
exp6On = true;
}
}
#endregion
#endregion
#region damage ticker
if (exhaustSmoke == true)
{
mechExhaustDamage++;
}
if (mechSwordFrame == 1)
{
mechSwordDamage++;
}
if (mechHandStatus == 1)
{
mechFistDamage++;
}
if (mechScepterAct == 2)
{
mechStaffDamage++;
}
if (mechBroochAct == 5)
{
mechBroochDamage++;
}
#endregion
#region HP = 0
if (mechHeadHP <= 0)
{
mechDefeatExplosionCT++;
if (expSerial == false)
{
exp1On = true;
expSerial = true;
}
if (mechDefeatExplosionCT > 300)
{
{
if (whiteMatte == false)
{
whiteMatte = true;
musicFade = true;
drgnFire = false;
if (breathType == 0)
{
playFireSFX.pauseSFX();
}
if (breathType == 1)
{
playThunderSFX.pauseSFX();
}
if (breathType == 2)
{
playIceSFX.pauseSFX();
}
if (breathType == 3)
{
playAcidSFX.pauseSFX();
}
if (breathType == 4)
{
playMagicSFX.pauseSFX();
}
if (underwaterBreath == true)
{
playWaterSFX.pauseSFX();
}
}
if (whiteMatteOpacity >= 255)
{
if (drgnHPLV == 0)
{
achievements.UpdateAch(-1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1);
}
save.Data.gameClear = true;
save.Save();
fadedIn = false;
fadeWait = true;
toStory = true;
loopFireBreathAlt.pauseSFX();
loopLaser.pauseSFX();
storyEnd = true;
}
}
}
}
#endregion
}
#region laser SFX
if ((mechFireAttack == true && mechFireWait >= 2) ||
(mechThunderAttack == true && mechTeslaY <= -200) || (mechHeadLaserOn == true &&
mechLaserWait >= 60 && mechLaserAct == 0))
{
if (laser1 == false)
{
laser1 = true;
laserProx1 = true;
}
}
if (mechFireAttack == false && mechThunderAttack ==
false && (mechHeadLaserOn == false || mechLaserWait < 60 || mechLaserAct != 0))
{
if (laser1 == true)
{
laser1 = false;
laserProx1 = false;
}
}
if ((mechFireAttack == true && mechFireWait >= 2))
{
if (flame1 == false)
{
flame1 = true;
flameProx1 = true;
}
}
if (mechFireAttack == false)
{
if (flame1 == true)
{
flame1 = false;
flameProx1 = false;
}
}
if (mechThunderAttack == true && mechTeslaY <= -200)
{
if (mechThunderSFX == false)
{
mechThunderSFX = true;
loopThunderBlast.playSFX(sfxVolume, tempVolume,
pauseVolume);
}
}
else
{
if (mechThunderSFX == true)
{
mechThunderSFX = false;
loopThunderBlast.pauseSFX();
}
}
#endregion
#region ice storm
if (mechIceAttack == true)
{
if (snowOn == false)
{
snowOn = true;
}
loopIceBreathAlt.playSFX(sfxVolume, tempVolume,
pauseVolume);
}
else
{
if (snowOn == true)
{
snowOn = false;
loopIceBreathAlt.pauseSFX();
}
}
#endregion
}
#endregion
#endregion
#region idle script
#region idle == false
if (drgnIdle == false)
{
if (whistleRandom != -1)
{
whistleRandom = -1;
}
if (note1Measure != 0)
{
note1Measure = 0;
}
if (note2Measure != 0)
{
note2Measure = 0;
}
if (note3Measure != 0)
{
note3Measure = 0;
}
if (note4Measure != 0)
{
note4Measure = 0;
}
if (note1CT != 0)
{
note1CT = 0;
}
if (note2CT != 0)
{
note2CT = 0;
}
if (note3CT != 0)
{
note3CT = 0;
}
if (note4CT != 0)
{
note4CT = 0;
}
if (note1yVel != 2)
{
note1yVel = 2;
}
if (note2yVel != 2)
{
note2yVel = 2;
}
if (note3yVel != 2)
{
note3yVel = 2;
}
if (note4yVel != 2)
{
note4yVel = 2;
}
if (drgnFaceR == true)
{
if (note1xVel != 2)
{
note1xVel = 2;
}
}
if (drgnFaceR == false)
{
if (note1xVel != -2)
{
note1xVel = -2;
}
}
if (note1xPos != drgnX + 45)
{
note1xPos = drgnX + 45;
}
if (note1yPos != drgnY + 10)
{
note1yPos = drgnY + 10;
}
if (note2xPos != drgnX + 45)
{
note2xPos = drgnX + 45;
}
if (note2yPos != drgnY + 10)
{
note2yPos = drgnY + 10;
}
if (note3xPos != drgnX + 45)
{
note3xPos = drgnX + 45;
}
if (note3yPos != drgnY + 10)
{
note3yPos = drgnY + 10;
}
if (note4xPos != drgnX + 45)
{
note4xPos = drgnX + 45;
}
if (note4yPos != drgnY + 10)
{
note4yPos = drgnY + 10;
}
}
#endregion
#region idle == true
if (drgnIdle == true)
{
if (whistleRandom == 0)
{
if (whistle1 != 1)
{
whistle1 = 1;
}
}
if (whistleRandom == 3)
{
if (whistle2 != 1)
{
whistle2 = 1;
}
}
if (whistleRandom == 9)
{
if (whistle3 != 1)
{
whistle3 = 1;
}
}
achievements.UpdateAch((whistle1 + whistle2 + whistle3),
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
if (whistleRandom > -1)
{
note1CT++;
if (note1CT >= 6)
{
note1CT = 0;
if (note1yPos < drgnY + 10)
{
note1yVel++;
}
if (note1yPos > drgnY + 10)
{
note1yVel--;
}
if (note2yPos < drgnY + 10)
{
note2yVel++;
}
if (note2yPos > drgnY + 10)
{
note2yVel--;
}
if (note3yPos < drgnY + 10)
{
note3yVel++;
}
if (note3yPos > drgnY + 10)
{
note3yVel--;
}
if (note4yPos < drgnY + 10)
{
note4yVel++;
}
if (note4yPos > drgnY + 10)
{
note4yVel--;
}
}
note1xPos += note1xVel;
note1yPos += note1yVel;
if (note2CT >= 25)
{
note2xPos += note1xVel;
note2yPos += note2yVel;
}
else
{
note2CT++;
}
if (note3CT >= 50)
{
note3xPos += note1xVel;
note3yPos += note3yVel;
}
else
{
note3CT++;
}
if (note4CT >= 75)
{
note4xPos += note1xVel;
note4yPos += note4yVel;
}
else
{
note4CT++;
}
if (note1xPos <= drgnX - 180 || note1xPos >= drgnX +
262)
{
note1xPos = drgnX + 45;
note1yPos = drgnY + 10;
note1yVel = 2;
note1Measure++;
}
if (note2xPos <= drgnX - 180 || note2xPos >= drgnX +
262)
{
note2xPos = drgnX + 45;
note2yPos = drgnY + 10;
note2yVel = 2;
note2Measure++;
}
if (note3xPos <= drgnX - 180 || note3xPos >= drgnX +
262)
{
note3xPos = drgnX + 45;
note3yPos = drgnY + 10;
note3yVel = 2;
note3Measure++;
}
if (note4xPos <= drgnX - 180 || note4xPos >= drgnX +
262)
{
note4xPos = drgnX + 45;
note4yPos = drgnY + 10;
note4yVel = 2;
note4Measure++;
if (note4Measure >= 14)
{
drgnCT = 0;
drgnFrame = 0;
drgnAction = 0;
drgnIdle = false;
drgnWaitTimer = 0;
}
}
}
}
#endregion
#endregion
}
}
}
#endregion
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.Black);
Resolution.Pos = new Vector2((cameraX + drgnCamX), (cameraY +
drgnCamY));
spriteBatch.Begin(SpriteSortMode.FrontToBack,
BlendState.AlphaBlend,
null,
null,
null,
null,
Resolution.getTransformationMatrix(GraphicsDevice));
#region Load Mattes
Vector2 blackMatteLoc = new Vector2(drgnCamX - 50, drgnCamY - 90);
Vector2 whiteMatteLoc = new Vector2(drgnCamX - 50, drgnCamY - 90);
if (blackMatteOpacity > 0)
{
spriteBatch.Draw(blackMatteSS, new Rectangle(0, 0, 1380, 900), null,
new Color(blackMatteOpacity, blackMatteOpacity, blackMatteOpacity,
blackMatteOpacity), 0, -blackMatteLoc, SpriteEffects.None, 15);
}
if (whiteMatteOpacity > 0)
{
spriteBatch.Draw(whiteMatteSS, new Rectangle(0, 0, 1380, 900), null,
new Color(whiteMatteOpacity, whiteMatteOpacity, whiteMatteOpacity,
whiteMatteOpacity), 0, -whiteMatteLoc, SpriteEffects.None, 15);
}
#endregion
//Draw Title Screen
#region Title Screen Draw
if (titleScreen == true)
{
titlePointer = this.Content.Load<Texture2D>("Title/title_pointer");
Vector2 printTitleA = new Vector2((float)327, (float)(titleY -
resMod));
Vector2 printTitleB = new Vector2((float)612, (float)(titleY -
resMod));
Vector2 printPointer = new Vector2((float)pointerX, (float)
((pointerY - resMod) + (65 * pointerLoc)));
Rectangle BGFrame = new Rectangle(0, (titleFrame * 360) +
titleFrame, 640, 360);
Rectangle logoFrame = new Rectangle((titleFrameX * 285) +
titleFrameX, (titleFrameY * 325) + titleFrameY, 285, 325);
if (displayLogo == true)
{
drawTitle.DrawLogo(spriteBatch, opacity);
}
if (displayTitle == true)
{
drawTitle.DrawTitlecard(spriteBatch, opacity, logoFrame,
BGFrame, printTitleA, printTitleB);
if (titleFrameY > 2)
{
toggleTutorial++;
if (toggleTutorial >= 150)
{
toggleTutorial = 0;
if (tutorialPos == 1)
{
tutorialPos = 0;
}
else
{
tutorialPos = 1;
}
}
drawTitle.DrawInstructions(spriteBatch, opacity, assignKey,
tutorialPos, resMod);
if (assignKey == false)
{
drawTitle.DrawInst2(spriteBatch, opacity, tutorialPos,
resMod);
}
}
if (controlsLook == false)
{
if (titleFrameY > 2)
{
if (optionsLook == false)
{
spriteBatch.Draw(titlePointer, new Rectangle(0, 0,
102, 86), null, new Color(opacity, opacity, opacity, 255), 0, -printPointer,
SpriteEffects.None, 0);
}
drawTitle.DrawText(spriteBatch, opacity, languageType,
resMod, bonusOn, optionsLook);
}
}
}
if (optionsLook == true)
{
if (controlsLook == false)
{
spriteBatch.Draw(titlePointer, new Rectangle(0, 0, 102, 86),
null, new Color(opacity, opacity, opacity, 255), 0, new Vector2(-optionsPointerX, -
((optionsPointerY - resMod) + (65 * optionsPointerLoc))), SpriteEffects.None, 0);
drawTitle.DrawOptions(spriteBatch, opacity, languageType,
controlType, healthType, checkVolume, checkSFX, saveRes, resMod, bonusOn,
fontTypeOn, fontSetting);
if ((optionsPointerLoc == 1 && controlType == 1) ||
(optionsPointerLoc == 5 && resNow != saveRes) || (optionsPointerLoc == 0 &&
languageType != 2))
{
drawTitle.DrawPrompt(spriteBatch, opacity,
titleExtraFrame, optionsPointerLoc, resMod, bonusOn);
}
}
}
if (controlsLook == true)
{
if (controlsMenuPos <= 5)
{
spriteBatch.Draw(titlePointer, new Rectangle(0, 0, 102, 86),
null, new Color(opacity, opacity, opacity, 255), 0, new Vector2(-10, -(285 + (65 *
controlsMenuPos))), SpriteEffects.None, 0);
}
else if (controlsMenuPos >= 6)
{
spriteBatch.Draw(titlePointer, new Rectangle(0, 0, 102, 86),
null, new Color(opacity, opacity, opacity, 255), 0, new Vector2(-510, -(285 + (65 *
(controlsMenuPos - 6)))), SpriteEffects.None, 0);
}
drawTitle.DrawControl(spriteBatch, opacity, languageType,
jumpControlX, jumpControlY, clawControlX, clawControlY, breathControlX,
breathControlY, confControlX, confControlY, swlControlX, swlControlY, swrControlX,
swrControlY, leftControlX, leftControlY, rightControlX, rightControlY, upControlX,
upControlY, downControlX, downControlY);
}
}
#endregion
//Draw Title Screen END
#region Storybook Draw
if (storybook == true)
{
Vector2 pageLoc = new Vector2(0, 0);
Rectangle page1Frame = new Rectangle((storyFGFrameX1 * 640) +
storyFGFrameX1, (storyFGFrameY1 * 360) + storyFGFrameY1, 640, 360);
Rectangle page2Frame = new Rectangle((storyFGFrameX2 * 640) +
storyFGFrameX2, (storyFGFrameY2 * 360) + storyFGFrameY2, 640, 360);
Rectangle page3Frame = new Rectangle((storyFGFrameX3 * 640) +
storyFGFrameX3, (storyFGFrameY3 * 360) + storyFGFrameY3, 640, 360);
Rectangle page4Frame = new Rectangle((storyFGFrameX4 * 640) +
storyFGFrameX4, (storyFGFrameY4 * 360) + storyFGFrameY4, 640, 360);
Rectangle page5Frame = new Rectangle((storyFGFrameX5 * 640) +
storyFGFrameX5, (storyFGFrameY5 * 360) + storyFGFrameY5, 640, 360);
Rectangle page6Frame = new Rectangle((storyFGFrameX6 * 640) +
storyFGFrameX6, (storyFGFrameY6 * 360) + storyFGFrameY6, 640, 360);
Rectangle page7Frame = new Rectangle((storyFGFrameX7 * 640) +
storyFGFrameX7, (storyFGFrameY7 * 360) + storyFGFrameY7, 640, 360);
#region Story 1 Draw
if (story1 == true)
{
drawStory.Draw(spriteBatch, opacity, page1Frame, page2Frame,
page3Frame, page4Frame, page5Frame, page6Frame, page7Frame);
drawStory.DrawText(spriteBatch, storyOpacity, storyOpacity,
storyTextFrameY);
if (storyTextTotal == 0)
{
if (fadedIn == true)
{
drawStory.DrawInstructions(spriteBatch, tutorialPos,
storyOpacity, storyOpacity);
}
else
{
drawStory.DrawInstructions(spriteBatch, tutorialPos,
opacity, opacity);
}
}
}
#endregion
#region Story 1-2 Draw
if (story1_2pre == true)
{
drawStory.Draw(spriteBatch, opacity, page1Frame, page2Frame,
page3Frame, page4Frame, page5Frame, page6Frame, page7Frame);
drawStory.DrawText(spriteBatch, storyOpacity, storyOpacity,
storyTextFrameY);
}
#endregion
#region Story 1-B Draw
if (story1_Bpre == true)
{
drawStory.Draw(spriteBatch, opacity, page1Frame, page2Frame,
page3Frame, page4Frame, page5Frame, page6Frame, page7Frame);
drawStory.DrawText(spriteBatch, storyOpacity, storyOpacity,
storyTextFrameY);
}
if (story1_Bpost == true)
{
drawStory.Draw(spriteBatch, opacity, page1Frame, page2Frame,
page3Frame, page4Frame, page5Frame, page6Frame, page7Frame);
drawStory.DrawText(spriteBatch, storyOpacity, storyOpacity,
storyTextFrameY);
}
#endregion
}
#endregion
#region World Map Draw
if (worldMap == true)
{
#region Draw Sprites
Vector2 drawDragon = new Vector2(drgnX, drgnY);
Vector2 drawExit = new Vector2(drgnCamX + 171, drgnCamY + 122);
Rectangle mapDrgnFrame = new Rectangle(0, (45 * mapFrame) +
mapFrame, 62, 45);
Rectangle mapExitFrame = new Rectangle((exitFrame * 939) +
exitFrame, 0, 939, 275);
drawWorldMap.DrawBase(spriteBatch, mapDrgnFrame, drawDragon,
opacity, on1e2, on1e3, on1eB, on2e1, on2e2, on2e3, on2eB, on3e1, on3e2, on3e3,
on3eB, on4e1, on4e2, on4e4, on4eB, on5e1, on5e2, on5eB, on6e1, on6eB, on7eB);
drawWorldMap.DrawConfirm(spriteBatch, controlType + tutorialPos,
drgnCamX + 25, drgnCamY - 30, opacity, resMod);
drawWorldMap.DrawArrows(spriteBatch, worldMapFrame, drgnX, drgnY,
opacity, mapArrowUp, mapArrowRight, mapArrowDown, mapArrowLeft);
if (escMenu == true)
{
drawWorldMap.DrawExit(spriteBatch, mapExitFrame, drawExit,
opacity);
drawWorldMap.DrawPointer(spriteBatch, controlType + tutorialPos,
opacity, drgnCamX + 312 + worldMapPointerModX, drgnCamY + 279 +
worldMapPointerModY);
}
#endregion
#region Draw Names
#region World Map Home
if (mapGridX == 5 && mapGridY == 1) //home input
{
if (have01Hatchling == true && have02Smile == true &&
have03Crest == true && have04Underpants == true && have05Sollerets == true &&
have06Scepter == true && have07Momiji == true && have08Ninjato == true && have09Ring
== true && have10Sunset == true && have11Dreihander == true && have12Endeavour ==
true && have13Doll == true && have14Liqueur == true && have15Penultima == true &&
have16Leaf == true && have17HTTYD == true && have18Gust == true && have19Shirt ==
true && have20Deduction == true && have21Topaz == true && have22Sapphire == true &&
have23Garnet == true && have24Ruby == true && have25Diamond == true)
{
drawWorldMap.DrawClear(spriteBatch, drgnCamX + 25, drgnCamY
+ 690, opacity, resMod);
drawWorldMap.DrawName(spriteBatch, 3, 0, drgnCamX + 75,
drgnCamY + 690, opacity, resMod);
}
else
{
drawWorldMap.DrawName(spriteBatch, 3, 0, drgnCamX + 25,
drgnCamY + 690, opacity, resMod);
}
}
#endregion
//870, 285
#region World Map 1-1
if (mapGridX == 5 && mapGridY == 2) //stage 1-1 input
{
if (have01Hatchling == true && have21Topaz == true)
{
drawWorldMap.DrawClear(spriteBatch, drgnCamX + 25, drgnCamY
+ 690, opacity, resMod);
drawWorldMap.DrawName(spriteBatch, 0, 0, drgnCamX + 75,
drgnCamY + 690, opacity, resMod);
}
else
{
drawWorldMap.DrawName(spriteBatch, 0, 0, drgnCamX + 25,
drgnCamY + 690, opacity, resMod);
}
}
#endregion
//970, 360
#region World Map 1-2
if (mapGridX == 5 && mapGridY == 3)
{
drawWorldMap.DrawStory(spriteBatch, controlType + tutorialPos,
drgnCamX + 25, drgnCamY + 45, opacity, resMod);
if (have16Leaf == true)
{
drawWorldMap.DrawName(spriteBatch, 1, 0, drgnCamX + 75,
drgnCamY + 690, opacity, resMod);
drawWorldMap.DrawClear(spriteBatch, drgnCamX + 25, drgnCamY
+ 690, opacity, resMod);
}
else
{
drawWorldMap.DrawName(spriteBatch, 1, 0, drgnCamX + 25,
drgnCamY + 690, opacity, resMod);
}
}
#endregion
//1140, 380
#region World Map 1-3
if (mapGridX == 5 && mapGridY == 4) //stage 1-3 input
{
if (have07Momiji == true && have08Ninjato == true && on6e1 ==
true)
{
drawWorldMap.DrawName(spriteBatch, 2, 0, drgnCamX + 75,
drgnCamY + 690, opacity, resMod);
drawWorldMap.DrawClear(spriteBatch, drgnCamX + 25, drgnCamY
+ 690, opacity, resMod);
}
else
{
drawWorldMap.DrawName(spriteBatch, 2, 0, drgnCamX + 25,
drgnCamY + 690, opacity, resMod);
}
}
#endregion
//1300, 405
#region World Map 1-B
if (mapGridX == 5 && mapGridY == 5) //stage 1-B input
{
drawWorldMap.DrawStory(spriteBatch, controlType + tutorialPos,
drgnCamX + 25, drgnCamY + 45, opacity, resMod);
if (boss1Clear == true)
{
drawWorldMap.DrawName(spriteBatch, 0, 5, drgnCamX + 75,
drgnCamY + 690, opacity, resMod);
drawWorldMap.DrawClear(spriteBatch, drgnCamX + 25, drgnCamY
+ 690, opacity, resMod);
}
else
{
drawWorldMap.DrawName(spriteBatch, 0, 5, drgnCamX + 25,
drgnCamY + 690, opacity, resMod);
}
}
#endregion
//1100, 495
#region World Map 5-1
if (mapGridX == 5 && mapGridY == 0) //stage 5-1 input
{
if (on5e2 == true)
{
drawWorldMap.DrawName(spriteBatch, 0, 4, drgnCamX + 75,
drgnCamY + 690, opacity, resMod);
drawWorldMap.DrawClear(spriteBatch, drgnCamX + 25, drgnCamY
+ 690, opacity, resMod);
}
else
{
drawWorldMap.DrawName(spriteBatch, 0, 4, drgnCamX + 25,
drgnCamY + 690, opacity, resMod);
}
}
#endregion
//880, 470
#endregion
}
#endregion
#region Action Stage Draw
if (actionStage == true)
{
//ALWAYS DRAW
#region Always Draw During Action Stage
Vector2 printWhite = new Vector2(drgnCamX - 50, drgnCamY - 50);
Vector2 dragonsprite = new Vector2((float)drgnX, (float)drgnY);
Vector2 clawsprite = new Vector2((float)drgnX + clawX, (float)
drgnY);
Vector2 breathLoc1 = new Vector2((float)drgnX + breathX, (float)
drgnY + breathY);
Vector2 breathLoc2 = new Vector2((float)drgnX + breathX + 108,
(float)drgnY + breathY);
Vector2 HPBorderDraw = new Vector2((float)drgnCamX + 30, (float)
(drgnCamY - 10) + resMod);
Rectangle HPBorderFrame = new Rectangle(0, 0, 359, 74);
Vector2 HP1 = new Vector2((float)drgnCamX + 160, (float)(drgnCamY +
22) + resMod);
Rectangle HP1frame = new Rectangle((23 * hpPip1) + hpPip1, 0, 23,
23);
Vector2 HP2 = new Vector2((float)drgnCamX + 195, (float)(drgnCamY +
22) + resMod);
Rectangle HP2frame = new Rectangle((23 * hpPip2) + hpPip2, 0, 23,
23);
Vector2 HP3 = new Vector2((float)drgnCamX + 230, (float)(drgnCamY +
22) + resMod);
Rectangle HP3frame = new Rectangle((23 * hpPip3) + hpPip3, 0, 23,
23);
Vector2 HP4 = new Vector2((float)drgnCamX + 265, (float)(drgnCamY +
22) + resMod);
Rectangle HP4frame = new Rectangle((23 * hpPip4) + hpPip4, 0, 23,
23);
Vector2 HP5 = new Vector2((float)drgnCamX + 300, (float)(drgnCamY +
22) + resMod);
Rectangle HP5frame = new Rectangle((23 * hpPip5) + hpPip5, 0, 23,
23);
Vector2 HP6 = new Vector2((float)drgnCamX + 335, (float)(drgnCamY +
22) + resMod);
Rectangle HP6frame = new Rectangle((23 * hpPip6) + hpPip6, 0, 23,
23);
Vector2 elementPos = new Vector2((float)drgnCamX + 400, (float)
(drgnCamY - 10) + resMod);
Vector2 elementPosShadow = new Vector2((float)drgnCamX + 395,
(float)drgnCamY - 13);
Rectangle elementType = new Rectangle((201 * breathType) +
breathType, 0, 201, 73);
Vector2 BP1 = new Vector2((float)drgnCamX + 570, (float)(drgnCamY +
5) + resMod);
Rectangle BP1frame = new Rectangle((45 * breathPip1) + breathPip1,
0, 45, 25);
Vector2 BP2 = new Vector2((float)drgnCamX + 620, (float)(drgnCamY +
5) + resMod);
Rectangle BP2frame = new Rectangle((45 * breathPip2) + breathPip2,
0, 45, 25);
Vector2 BP3 = new Vector2((float)drgnCamX + 670, (float)(drgnCamY +
5) + resMod);
Rectangle BP3frame = new Rectangle((45 * breathPip3) + breathPip3,
0, 45, 25);
Vector2 BP4 = new Vector2((float)drgnCamX + 720, (float)(drgnCamY +
5) + resMod);
Rectangle BP4frame = new Rectangle((45 * breathPip4) + breathPip4,
0, 45, 25);
Vector2 BP5 = new Vector2((float)drgnCamX + 770, (float)(drgnCamY +
5) + resMod);
Rectangle BP5frame = new Rectangle((45 * breathPip5) + breathPip5,
0, 45, 25);
Vector2 BP6 = new Vector2((float)drgnCamX + 820, (float)(drgnCamY +
5) + resMod);
Rectangle BP6frame = new Rectangle((45 * breathPip6) + breathPip6,
0, 45, 25);
Vector2 BP7 = new Vector2((float)drgnCamX + 605, (float)(drgnCamY +
35) + resMod);
Rectangle BP7frame = new Rectangle((45 * breathPip7) + breathPip7,
0, 45, 25);
Vector2 BP8 = new Vector2((float)drgnCamX + 655, (float)(drgnCamY +
35) + resMod);
Rectangle BP8frame = new Rectangle((45 * breathPip8) + breathPip8,
0, 45, 25);
Vector2 BP9 = new Vector2((float)drgnCamX + 705, (float)(drgnCamY +
35) + resMod);
Rectangle BP9frame = new Rectangle((45 * breathPip9) + breathPip9,
0, 45, 25);
Vector2 BP10 = new Vector2((float)drgnCamX + 755, (float)(drgnCamY +
35) + resMod);
Rectangle BP10frame = new Rectangle((45 * breathPip10) +
breathPip10, 0, 45, 25);
Vector2 BP11 = new Vector2((float)drgnCamX + 805, (float)(drgnCamY +
35) + resMod);
Rectangle BP11frame = new Rectangle((45 * breathPip11) +
breathPip11, 0, 45, 25);
Vector2 BP12 = new Vector2((float)drgnCamX + 855, (float)(drgnCamY +
35) + resMod);
Rectangle BP12frame = new Rectangle((45 * breathPip12) +
breathPip12, 0, 45, 25);
Vector2 coinHUDLoc = new Vector2(drgnCamX + 910, (drgnCamY - 5) +
resMod);
Vector2 coinHUDLocShadow = new Vector2(drgnCamX + 905, drgnCamY -
8);
Rectangle coinHUDFrame = new Rectangle(0, 132, 65, 65);
Vector2 coinAmt = new Vector2(drgnCamX + 985, drgnCamY + resMod);
Vector2 coinAmtShadow = new Vector2(drgnCamX + 980, drgnCamY - 3);
loadDragon.DrawDragon(spriteBatch, drgnFrame, drgnAction, opacity,
drgnInvOpacity, dragonsprite, 0, drgnFaceR, drgnFlyNow, drgnFlyMax);
spriteBatch.Draw(HPBorder, new Rectangle(0, 0, 359, 74),
HPBorderFrame, new Color(opacity, opacity, opacity, 255), 0, -HPBorderDraw,
SpriteEffects.None, 9);
spriteBatch.Draw(breathHUD, new Rectangle(0, 0, 201, 73),
elementType, new Color(opacity, opacity, opacity, 255), 0, -elementPos,
SpriteEffects.None, 9);
if (healthType == 0)
{
spriteBatch.Draw(hudHP, new Rectangle(0, 0, 23, 23), HP1frame,
new Color(opacity, opacity, opacity, 255), 0, -HP1, SpriteEffects.None, 9);
spriteBatch.Draw(hudHP, new Rectangle(0, 0, 23, 23), HP2frame,
new Color(opacity, opacity, opacity, 255), 0, -HP2, SpriteEffects.None, 9);
spriteBatch.Draw(hudHP, new Rectangle(0, 0, 23, 23), HP3frame,
new Color(opacity, opacity, opacity, 255), 0, -HP3, SpriteEffects.None, 9);
spriteBatch.Draw(hudHP, new Rectangle(0, 0, 23, 23), HP4frame,
new Color(opacity, opacity, opacity, 255), 0, -HP4, SpriteEffects.None, 9);
spriteBatch.Draw(hudHP, new Rectangle(0, 0, 23, 23), HP5frame,
new Color(opacity, opacity, opacity, 255), 0, -HP5, SpriteEffects.None, 9);
spriteBatch.Draw(hudHP, new Rectangle(0, 0, 23, 23), HP6frame,
new Color(opacity, opacity, opacity, 255), 0, -HP6, SpriteEffects.None, 9);
}
if (healthType == 1)
{
spriteBatch.Draw(hpNumbers, new Rectangle(0, 0, 60, 60), new
Rectangle((60 * drgnHPNow) + drgnHPNow, 0, 60, 60), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(drgnCamX + 190), -(drgnCamY + 12 + resMod)),
SpriteEffects.None, 9);
spriteBatch.Draw(hpNumbers, new Rectangle(0, 0, 60, 60), new
Rectangle((60 * drgnHPMax) + drgnHPMax, 0, 60, 60), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(drgnCamX + 270), -(drgnCamY + 12 + resMod)),
SpriteEffects.None, 9);
spriteBatch.Draw(hpSlash, new Rectangle(0, 0, 61, 61), null, new
Color(opacity, opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 230), -(drgnCamY
+ 12 + resMod)), SpriteEffects.None, 9);
}
#region breath
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25), BP1frame,
new Color(opacity, opacity, opacity, 255), 0, -BP1, SpriteEffects.None, 9);
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25), BP2frame,
new Color(opacity, opacity, opacity, 255), 0, -BP2, SpriteEffects.None, 9);
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25), BP3frame,
new Color(opacity, opacity, opacity, 255), 0, -BP3, SpriteEffects.None, 9);
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25), BP4frame,
new Color(opacity, opacity, opacity, 255), 0, -BP4, SpriteEffects.None, 9);
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25), BP5frame,
new Color(opacity, opacity, opacity, 255), 0, -BP5, SpriteEffects.None, 9);
if (breathMax >= 361)
{
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25),
BP6frame, new Color(opacity, opacity, opacity, 255), 0, -BP6, SpriteEffects.None,
9);
}
if (breathMax >= 421)
{
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25),
BP7frame, new Color(opacity, opacity, opacity, 255), 0, -BP7, SpriteEffects.None,
9);
}
if (breathMax >= 481)
{
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25),
BP8frame, new Color(opacity, opacity, opacity, 255), 0, -BP8, SpriteEffects.None,
9);
}
if (breathMax >= 541)
{
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25),
BP9frame, new Color(opacity, opacity, opacity, 255), 0, -BP9, SpriteEffects.None,
9);
}
if (breathMax >= 601)
{
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25),
BP10frame, new Color(opacity, opacity, opacity, 255), 0, -BP10, SpriteEffects.None,
9);
}
if (breathMax >= 661)
{
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25),
BP11frame, new Color(opacity, opacity, opacity, 255), 0, -BP11, SpriteEffects.None,
9);
}
if (breathMax >= 720)
{
spriteBatch.Draw(hudBreath, new Rectangle(0, 0, 45, 25),
BP12frame, new Color(opacity, opacity, opacity, 255), 0, -BP12, SpriteEffects.None,
9);
}
#endregion
#region gold
spriteBatch.Draw(hudCurrency, new Rectangle(0, 0, 65, 65), null, new
Color(opacity, opacity, opacity, 255), 0, -coinHUDLoc, SpriteEffects.None, 9);
if (goldNow >= 100000)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0, 60, 60),
new Rectangle(0, (hundkNow * 60) + hundkNow, 60, 60), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(drgnCamX + 985), -(drgnCamY + resMod)),
SpriteEffects.None, 9);
}
if (goldNow >= 10000)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0, 60, 60),
new Rectangle(0, (tenkNow * 60) + tenkNow, 60, 60), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(drgnCamX + 1025), -(drgnCamY + resMod)),
SpriteEffects.None, 9);
}
if (goldNow >= 1000)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0, 60, 60),
new Rectangle(0, (thouNow * 60) + thouNow, 60, 60), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(drgnCamX + 1065), -(drgnCamY + resMod)),
SpriteEffects.None, 9);
}
if (goldNow >= 100)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0, 60, 60),
new Rectangle(0, (hundNow * 60) + hundNow, 60, 60), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(drgnCamX + 1105), -(drgnCamY + resMod)),
SpriteEffects.None, 9);
}
if (goldNow >= 10)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0, 60, 60),
new Rectangle(0, (tenNow * 60) + tenNow, 60, 60), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(drgnCamX + 1145), -(drgnCamY + resMod)),
SpriteEffects.None, 9);
}
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0, 60, 60), new
Rectangle(0, (oneNow * 60) + oneNow, 60, 60), new Color(opacity, opacity, opacity,
255), 0, new Vector2(-(drgnCamX + 1185), -(drgnCamY + resMod)), SpriteEffects.None,
9);
#endregion
#region attack
if (usingClaw == true)
{
loadDragon.DrawClaw(spriteBatch, Clawframe, opacity, clawsprite,
1);
}
if (drgnFire == true)
{
loadDragon.DrawBreath(spriteBatch, Breathframe, opacity,
breathLoc1, breathLoc2, 1);
}
#endregion
#region help
if (helpOpacity > 0)
{
spriteBatch.Draw(breathDesc, new Rectangle(0, 0, 600, 40), new
Rectangle(0, (breathType * 40) + breathType, 600, 40), new Color(helpOpacity,
helpOpacity, helpOpacity, helpOpacity), 0, new Vector2(-(drgnCamX + 20), -(drgnCamY
+ 710)), SpriteEffects.None, 10f);
}
#endregion
#region pause
if (actionStagePause == true)
{
if (showPause == true)
{
spriteBatch.Draw(pauseOn, new Rectangle(0, 0, 250, 100),
null, new Color(opacity, opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 515),
-(drgnCamY + 250)), SpriteEffects.None, 10f);
}
spriteBatch.Draw(pauseInstructions, new Rectangle(0, 0, 599,
39), new Rectangle(0, (39 * pausePos) + (pausePos * 2), 599, 39), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 460), -(drgnCamY + 375)),
SpriteEffects.None, 10f);
spriteBatch.Draw(pauseSwitch, new Rectangle(0, 0, 599, 39), new
Rectangle(0, (39 * tutorialPos) + (tutorialPos * 2), 599, 39), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 460), -(drgnCamY + 425)),
SpriteEffects.None, 10f);
if ((stage1e1 == true && on1e2 == true) || (stage1e2 == true &&
on1e3 == true) || (stage1e3 == true && on1eB == true) || (stage1eB == true &&
boss1Clear == true) || (stage2e1 == true && on2e2 == true) || (stage2e2 == true &&
on2e3 == true) || (stage2e3 == true && on2eB == true) || (stage2e4 == true && on2eB
== true) || (stage2eB == true && boss2Clear == true) || (stage3e1 == true && on3e2
== true) || (stage3e2 == true && on3e3 == true) || (stage3e3 == true && on3eB ==
true) || (stage3eB == true && boss3Clear == true) || (stage4e1 == true && on4e1 ==
true) || (stage4e2 == true && on4e2 == true) || (stage4e3 == true && on4e4 == true)
|| (stage4e4 == true && on4eB == true) || (stage4eB == true && boss4Clear == true)
|| (stage5e2 == true && on5eB == true) || (stage5eB == true && boss5Clear == true)
|| (stage6e1 == true && haveGanja == true) || (stage6eB == true && have15Penultima
== true))
{
spriteBatch.Draw(exitInstructions, new Rectangle(0, 0, 599,
39), new Rectangle(0, (39 * pausePos) + (pausePos * 2), 599, 39), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 460), -(drgnCamY + 525)),
SpriteEffects.None, 10f);
}
}
#endregion
#region idle
if (drgnIdle == true)
{
if (note1Measure < 14)
{
spriteBatch.Draw(whistle, new Rectangle(0, 0, 31, 31), new
Rectangle(((note1Measure * 4) * 31) + (note1Measure * 4), (whistleRandom * 31) +
whistleRandom, 31, 31), new Color(opacity, opacity, opacity, 255), 0, new Vector2(-
note1xPos, -note1yPos), SpriteEffects.None, -0.01f);
}
if (note2Measure < 14)
{
spriteBatch.Draw(whistle, new Rectangle(0, 0, 31, 31), new
Rectangle((((note2Measure * 4) + 1) * 31) + ((note2Measure * 4) + 1), (whistleRandom
* 31) + whistleRandom, 31, 31), new Color(opacity, opacity, opacity, 255), 0, new
Vector2(-note2xPos, -note2yPos), SpriteEffects.None, -0.01f);
}
if (note3Measure < 14)
{
spriteBatch.Draw(whistle, new Rectangle(0, 0, 31, 31), new
Rectangle((((note3Measure * 4) + 2) * 31) + ((note3Measure * 4) + 2), (whistleRandom
* 31) + whistleRandom, 31, 31), new Color(opacity, opacity, opacity, 255), 0, new
Vector2(-note3xPos, -note3yPos), SpriteEffects.None, -0.01f);
}
if (note4Measure < 14)
{
spriteBatch.Draw(whistle, new Rectangle(0, 0, 31, 31), new
Rectangle((((note4Measure * 4) + 3) * 31) + ((note4Measure * 4) + 3), (whistleRandom
* 31) + whistleRandom, 31, 31), new Color(opacity, opacity, opacity, 255), 0, new
Vector2(-note4xPos, -note4yPos), SpriteEffects.None, -0.01f);
}
}
#endregion
#endregion
//END ALWAYS DRAW
#region Draw Splash
if (splashIn == true)
{
spriteBatch.Draw(splashSS, new Rectangle(0, 0, 127, 144), new
Rectangle((splashInFrame * 127) + splashInFrame, 0, 127, 144), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-splashInLocX, -splashInLocY),
SpriteEffects.None, 1);
}
if (splashOut == true)
{
spriteBatch.Draw(splashSS, new Rectangle(0, 0, 127, 144), new
Rectangle((splashOutFrame * 127) + splashOutFrame, 145, 127, 144), new Color
(opacity, opacity, opacity, 255), 0, new Vector2(-splashOutLocX, -splashOutLocY),
SpriteEffects.None, 1);
}
#endregion
//STAGE HOME DRAW
#region Stage Home Draw
if (stageHome == true)
{
#region Stage Contact Boxes
Rectangle stairsHitbox1F = new Rectangle(293, 600, 50, 700);
Rectangle stairsHitbox2F = new Rectangle(160, 620, 50, 700);
#endregion
#region Draw Stage
Rectangle exitArea = new Rectangle(1340, 400, 20, 560);
drawHome.Draw(spriteBatch, opacity, (0 + drgnCamX - (drgnCamX /
200)), -200 + drgnCamY - (drgnCamY / 100), home1F, home2F, have01Hatchling,
have02Smile, have03Crest, have04Underpants, have05Sollerets, have06Scepter,
have07Momiji, have08Ninjato, have09Ring, have10Sunset, have11Dreihander,
have12Endeavour, have13Doll, have14Liqueur, have15Penultima, have16Leaf,
have17HTTYD, have18Gust, have19Shirt, have20Deduction, have21Topaz, have22Sapphire,
have23Garnet, have24Ruby, have25Diamond, hoardAmt, npc1Act, npc1VarAct, npc1Frame,
bonusOn, (haveTreasure1 + haveTreasure2 + haveTreasure3 + haveTreasure4 +
haveTreasure5 + haveTreasure6 + haveTreasure7 + haveTreasure8 + haveTreasure9 +
haveTreasure10 + haveTreasure11 + haveTreasure12 + haveTreasure13 + haveTreasure14 +
haveTreasure15 + haveTreasure16 + haveTreasure17 + haveTreasure18 + haveTreasure19 +
haveTreasure20 + haveTreasure21 + haveTreasure22 + haveTreasure23 + haveTreasure24 +
haveTreasure25 + haveTreasure26));
drawSky.DrawSkyA(spriteBatch, drgnCamX, -200 + drgnCamY -
(drgnCamY / 100), opacity);
#endregion
#region Draw Menu
if (levelUpMenu == true)
{
drawHome.LevelUp(spriteBatch, opacity, new Vector2(drgnCamX,
drgnCamY - 40 + resMod), new Vector2(drgnCamX + 640, drgnCamY - 40 + resMod), new
Vector2(drgnCamX, drgnCamY + 360 + resMod), new Vector2(drgnCamX + 640, drgnCamY +
360 + resMod), new Vector2(drgnCamX + 380 + levelPointerX, drgnCamY + levelPointerY
+ resMod), new Vector2(drgnCamX + 320, drgnCamY + 196 + resMod), new Vector2
(drgnCamX + 325, drgnCamY + 321 + resMod), new Vector2(drgnCamX + 320, drgnCamY +
435 + resMod), new Vector2(drgnCamX + 420, drgnCamY + 204 + resMod), new Vector2
(drgnCamX + 420, drgnCamY + 328 + resMod), new Vector2(drgnCamX + 420, drgnCamY +
439 + resMod), new Vector2(drgnCamX + 640, drgnCamY + 204 + resMod), new Vector2
(drgnCamX + 640, drgnCamY + 328 + resMod), new Vector2(drgnCamX + 640, drgnCamY +
439 + resMod), new Rectangle((atkLevel * 63) + atkLevel, 0, 63, 38), new Rectangle
((defLevel * 63) + defLevel, 39, 63, 38), new Rectangle((sptLevel * 63) + sptLevel,
78, 63, 38), new Rectangle(0, (atkLevel * 47) + atkLevel, 201, 47), new Rectangle
(202, (defLevel * 47) + defLevel, 201, 47), new Rectangle(404, (sptLevel * 47) +
sptLevel, 201, 47), new Rectangle(0, 132, 65, 65), new Rectangle((storyFGFrameX1 *
640) + storyFGFrameX1, (storyFGFrameY1 * 400) + storyFGFrameY1, 640, 400),
storyFGFrameX1, tutorialPos);
Vector2 printTotalGold = new Vector2(drgnCamX + 419,
drgnCamY + 569 + resMod);
Vector2 printTotalHP = new Vector2(drgnCamX + 980, drgnCamY
+ 174 + resMod);
Vector2 printDamageRes = new Vector2(drgnCamX + 980,
drgnCamY + 252 + resMod);
Vector2 printClawAttack = new Vector2(drgnCamX + 970,
drgnCamY + 484 + resMod);
Vector2 printBreathAttack = new Vector2(drgnCamX + 1150,
drgnCamY + 478 + resMod);
if (storyFGFrameX1 >= 2)
{
if (goldAvailable >= 100000)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (hundkTotal * 60) + hundkTotal, 60, 60), new Color
(opacity, opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 469), -(drgnCamY + 559
+ resMod)), SpriteEffects.None, 11);
}
if (goldAvailable >= 10000)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (tenkTotal * 60) + tenkTotal, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 609), -(drgnCamY + 559 +
resMod)), SpriteEffects.None, 11);
}
if (goldAvailable >= 1000)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (thouTotal * 60) + thouTotal, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 649), -(drgnCamY + 559 +
resMod)), SpriteEffects.None, 11);
}
if (goldAvailable >= 100)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (hundTotal * 60) + hundTotal, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 689), -(drgnCamY + 559 +
resMod)), SpriteEffects.None, 11);
}
if (goldAvailable >= 10)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (tenTotal * 60) + tenTotal, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 729), -(drgnCamY + 559 +
resMod)), SpriteEffects.None, 11);
}
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0, 60,
60), new Rectangle(0, (oneTotal * 60) + oneTotal, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 769), -(drgnCamY + 559 +
resMod)), SpriteEffects.None, 11);
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0, 60,
60), new Rectangle(0, (drgnDRTotal * 60) + drgnDRTotal, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 980), -(drgnCamY + 252 +
resMod)), SpriteEffects.None, 11);
if (printHPMax < 10)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (hpOne * 60) + hpOne, 60, 60), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(drgnCamX + 980), -(drgnCamY + 174 + resMod)),
SpriteEffects.None, 11);
}
else
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (hpTen * 60) + hpTen, 60, 60), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(drgnCamX + 980), -(drgnCamY + 174 + resMod)),
SpriteEffects.None, 11);
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (hpOne * 60) + hpOne, 60, 60), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(drgnCamX + 1020), -(drgnCamY + 174 + resMod)),
SpriteEffects.None, 11);
}
if (drgnClawTotal < 10)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (clawOne * 60) + clawOne, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 970), -(drgnCamY + 484 +
resMod)), SpriteEffects.None, 11);
}
else
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (clawTen * 60) + clawTen, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 955), -(drgnCamY + 484 +
resMod)), SpriteEffects.None, 11);
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (clawOne * 60) + clawOne, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 995), -(drgnCamY + 484 +
resMod)), SpriteEffects.None, 11);
}
if (drgnBreathTotal < 10)
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (breathOne * 60) + breathOne, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 1140), -(drgnCamY + 478 +
resMod)), SpriteEffects.None, 11);
}
else
{
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (breathTen * 60) + breathTen, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 1130), -(drgnCamY + 478 +
resMod)), SpriteEffects.None, 11);
spriteBatch.Draw(optionsNumbers, new Rectangle(0, 0,
60, 60), new Rectangle(0, (breathOne * 60) + breathOne, 60, 60), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 1170), -(drgnCamY + 478 +
resMod)), SpriteEffects.None, 11);
}
}
}
if (levelUpMenu == false)
{
drawHome.Prompt(spriteBatch, drgnCamX, drgnCamY, opacity,
tutorialPos, resMod);
}
#endregion
#region Stairs
if (home1F == true)
{
if (drgnhitboxHead.Intersects(stairsHitbox1F) &&
drgnOnGround == true && drgnFire == false && usingClaw == false && blackMatte ==
false)
{
if (pressUp == true)
{
if (drgnAction != 0)
{
drgnAction = 0;
drgnFrame = 0;
}
blackMatte = true;
pressUp = false;
}
}
}
if (home2F == true)
{
if (drgnhitboxHead.Intersects(stairsHitbox2F) &&
drgnOnGround == true && drgnFire == false && usingClaw == false && blackMatte ==
false)
{
if (pressUp == true)
{
if (drgnAction != 0)
{
drgnAction = 0;
drgnFrame = 0;
}
blackMatte = true;
pressUp = false;
}
}
}
#endregion
#region Arrow
if (home1F == true)
{
if (drgnhitboxHead.Intersects(stairsHitbox1F) &&
drgnOnGround == true)
{
if (opacity >= 250)
{
houseArrowCT++;
if (houseArrowCT >= 75 && houseArrowFrame == 0)
{
houseArrowCT = 0;
houseArrowFrame = 1;
}
if (houseArrowCT >= 30 && houseArrowFrame == 1)
{
houseArrowCT = 0;
houseArrowFrame = 0;
}
}
if (houseArrowFrame <= 0)
{
drawHome.DrawArrow(spriteBatch, drgnX + 49, drgnY -
49, opacity);
}
}
else
{
if (houseArrowCT != 0)
{
houseArrowCT = 0;
}
if (houseArrowFrame != 0)
{
houseArrowFrame = 0;
}
}
}
if (home2F == true)
{
if (drgnhitboxHead.Intersects(stairsHitbox2F) &&
drgnOnGround == true)
{
if (opacity >= 250)
{
houseArrowCT++;
if (houseArrowCT >= 75)
{
houseArrowCT = 0;
if (houseArrowFrame == 0)
{
houseArrowFrame = 1;
}
else if (houseArrowFrame == 1)
{
houseArrowFrame = 0;
}
}
}
if (houseArrowFrame <= 0)
{
drawHome.DrawArrow(spriteBatch, drgnX + 49, drgnY -
49, opacity);
}
}
else
{
if (houseArrowCT != 0)
{
houseArrowCT = 0;
}
if (houseArrowFrame != 0)
{
houseArrowFrame = 0;
}
}
}
#endregion
#region Stage Exit Hitboxes
if (drgnhitboxHead.Intersects(exitArea))
{
if (stageExit == false)
{
stageExit = true;
musicFade = true;
}
}
#endregion
}
#endregion
//END STAGE HOME DRAW
//STAGE 1-1 DRAW
#region Stage 1-1 Draw
if (stage1e1 == true)
{
#region Stage Contact Boxes
Rectangle exitArea = new Rectangle(5250, 0, 20, 2453);
Rectangle pitfall1 = new Rectangle(0, 2300, 5160, 200);
#endregion
#region Draw Campfire
Vector2 campfirePos = new Vector2(5270, 1247);
Rectangle campfireFrame = new Rectangle((fireFrame * 127) +
fireFrame, 0, 127, 72);
Vector2 smokePos = new Vector2(5225, 1027); //(-45, -220)
Rectangle smokeFr = new Rectangle((smokeFrame * 285) +
smokeFrame, 0, 285, 245);
spriteBatch.Draw(campfireSS, new Rectangle(0, 0, 127, 72),
campfireFrame, new Color(opacity, opacity, opacity, 255), 0, -campfirePos,
SpriteEffects.None, 0);
spriteBatch.Draw(smokeSS, new Rectangle(0, 0, 285, 245),
smokeFr, new Color(opacity, opacity, opacity, 255), 0, -smokePos,
SpriteEffects.None, -1);
#endregion
#region Draw Treasure
Vector2 treasure1pos = new Vector2(4635, 1263);
Rectangle treasure1frame = new Rectangle((treasureShineFrame *
75) + treasureShineFrame, 0, 75, 75);
Rectangle treasure1hitbox = new Rectangle(4650, 1278, 45, 45);
Vector2 treasure21pos = new Vector2(3248, 1702);
Rectangle treasure21frame = new Rectangle((treasureShineFrame *
75) + treasureShineFrame, 1520, 75, 75);
Rectangle treasure21hitbox = new Rectangle(3263, 1717, 45, 45);
if (have01Hatchling == false || pickUp1 == true)
{
spriteBatch.Draw(allTreasureSS, new Rectangle(0, 0, 75, 75),
treasure1frame, new Color(opacity, opacity, opacity, 255), 0, -treasure1pos,
SpriteEffects.None, 0.3f);
}
if (pickUp1 == true)
{
drawTreasureText.DrawText1(spriteBatch, treasureWindowFrame,
opacity, new Vector2(drgnCamX + treasureWindowX, drgnCamY + resMod));
}
if (have21Topaz == false || pickUp21 == true)
{
spriteBatch.Draw(allTreasureSS, new Rectangle(0, 0, 75, 75),
treasure21frame, new Color(opacity, opacity, opacity, 255), 0, -treasure21pos,
SpriteEffects.None, -1);
}
if (pickUp21 == true)
{
drawTreasureText.DrawText2(spriteBatch, treasureWindowFrame,
opacity, new Vector2(drgnCamX + treasureWindowX, drgnCamY + resMod));
}
#endregion
#region Draw Stage
Vector2 printWarp = new Vector2(2948, 1560);
Rectangle printWarpFrame = new Rectangle((warpFrame * 191) +
warpFrame, 0, 191, 217);
drawStages.Draw(spriteBatch, opacity, (0 + drgnCamX - (drgnCamX
/ 50)), (-50 + drgnCamY - (drgnCamY / 100)), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0);
drawSky.DrawSkyA(spriteBatch, drgnCamX, -50 + drgnCamY -
(drgnCamY / 100), opacity);
spriteBatch.Draw(warpSS, new Rectangle(0, 0, 191, 217),
printWarpFrame, new Color(opacity, opacity, opacity, 255), 0, -printWarp,
SpriteEffects.None, 2);
#endregion
#region Draw Enemies
//squire
#region e1
Vector2 e1coinPos = new Vector2(e1X + 33, e1Y + 79);
Rectangle e1coinSpin = new Rectangle((e1coinFrame * 65) +
e1coinFrame, (e1coinType * 65) + e1coinType, 65, 65);
Vector2 e1sparklePos = new Vector2(e1X + 33, e1Y + 44);
Rectangle e1sparkleFrame = new Rectangle((e1sparkleFr * 65) +
e1sparkleFr, 0, 65, 100);
Vector2 e1smokePos = new Vector2(e1X, e1Y);
Rectangle e1showSmoke = new Rectangle((e1smokeFrame * 127) +
e1smokeFrame, 0, 127, 144);
Rectangle e1hitbox = new Rectangle(e1X + 15, e1Y + 10, 112,
134);
Rectangle e1FreezeL = new Rectangle(e1X, e1Y + 5, 8, 144);
Rectangle e1FreezeTop = new Rectangle(e1X, e1Y + 20, 127, 15);
Rectangle e1FreezeR = new Rectangle(e1X + 119, e1Y + 5, 8, 144);
Rectangle e1coinhitbox = new Rectangle(e1X + 43, e1Y + 79, 55,
65);
if (e1HP > 0)
{
loadSquire.Draw(spriteBatch, new Rectangle((e1frame * 127) +
e1frame, ((e1act + e1facing) * 144) + (e1act + e1facing), 127, 144), e1FreezeColor,
opacity, e1invBlink, new Vector2(e1X, e1Y), 0);
}
if (e1coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e1coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e1coinPos,
SpriteEffects.None, 0);
}
if (e1smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e1showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e1smokePos,
SpriteEffects.None, 0);
}
if (e1sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e1sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e1sparklePos,
SpriteEffects.None, 2);
}
if (e1plinkOn == true && e1plinkFr < 4)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65), new
Rectangle((e1plinkFr * 65) + e1plinkFr, 0, 65, 65), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(e1X + 31), -(e1Y + 40)), SpriteEffects.None, 2);
}
#endregion
//squire short
#region e2
Vector2 e2coinPos = new Vector2(e2X + 33, e2Y + 79);
Rectangle e2coinSpin = new Rectangle((e2coinFrame * 65) +
e2coinFrame, (e2coinType * 65) + e2coinType, 65, 65);
Vector2 e2sparklePos = new Vector2(e2X + 33, e2Y + 44);
Rectangle e2sparkleFrame = new Rectangle((e2sparkleFr * 65) +
e2sparkleFr, 0, 65, 100);
Vector2 e2smokePos = new Vector2(e2X, e2Y);
Rectangle e2showSmoke = new Rectangle((e2smokeFrame * 127) +
e2smokeFrame, 0, 127, 144);
Rectangle e2hitbox = new Rectangle(e2X + 15, e2Y + 30, 112,
134);
Rectangle e2FreezeL = new Rectangle(e2X, e2Y + 5, 8, 144);
Rectangle e2FreezeTop = new Rectangle(e2X, e2Y + 20, 127, 15);
Rectangle e2FreezeR = new Rectangle(e2X + 119, e2Y + 5, 8, 144);
Rectangle e2coinhitbox = new Rectangle(e2X + 43, e2Y + 79, 55,
65);
if (e2HP > 0)
{
loadSquire.Draw(spriteBatch, new Rectangle((e2frame * 127) +
e2frame, ((e2act + e2facing) * 144) + (e2act + e2facing), 127, 144), e2FreezeColor,
opacity, e2invBlink, new Vector2(e2X, e2Y), 0);
}
if (e2coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e2coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e2coinPos,
SpriteEffects.None, 0);
}
if (e2smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e2showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e2smokePos,
SpriteEffects.None, 0);
}
if (e2sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e2sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e2sparklePos,
SpriteEffects.None, 2);
}
#endregion
//freestanding sheep
#region e3
Vector2 e3smokePos = new Vector2(e3X, e3Y);
Rectangle e3showSmoke = new Rectangle((e3smokeFrame * 127) +
e3smokeFrame, 0, 127, 144);
Rectangle e3hitbox = new Rectangle(e3X + 15, e3Y + 80, 112,
134);
if (e3HP > 0)
{
loadSheep.Draw(spriteBatch, new Rectangle((e3frame * 127) +
e3frame, ((e3act + e3facing) * 144) + (e3act + e3facing), 127, 144), e3FreezeColor,
opacity, e3invBlink, new Vector2(e3X, e3Y), 0);
}
if (e3smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e3showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e3smokePos,
SpriteEffects.None, 0);
}
#endregion
//squire
#region e4
Vector2 e4coinPos = new Vector2(e4X + 33, e4Y + 79);
Rectangle e4coinSpin = new Rectangle((e4coinFrame * 65) +
e4coinFrame, (e4coinType * 65) + e4coinType, 65, 65);
Vector2 e4sparklePos = new Vector2(e4X + 33, e4Y + 44);
Rectangle e4sparkleFrame = new Rectangle((e4sparkleFr * 65) +
e4sparkleFr, 0, 65, 100);
Vector2 e4smokePos = new Vector2(e4X, e4Y);
Rectangle e4showSmoke = new Rectangle((e4smokeFrame * 127) +
e4smokeFrame, 0, 127, 144);
Rectangle e4hitbox = new Rectangle(e4X + 15, e4Y + 10, 112,
134);
Rectangle e4FreezeL = new Rectangle(e4X, e4Y + 5, 8, 144);
Rectangle e4FreezeTop = new Rectangle(e4X, e4Y, 127, 15);
Rectangle e4FreezeR = new Rectangle(e4X + 119, e4Y + 5, 8, 144);
Rectangle e4coinhitbox = new Rectangle(e4X + 43, e4Y + 79, 55,
65);
if (e4HP > 0)
{
loadSquire.Draw(spriteBatch, new Rectangle((e4frame * 127) +
e4frame, ((e4act + e4facing) * 144) + (e4act + e4facing), 127, 144), e4FreezeColor,
opacity, e4invBlink, new Vector2(e4X, e4Y), 0);
}
if (e4coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e4coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e4coinPos,
SpriteEffects.None, 0);
}
if (e4smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e4showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e4smokePos,
SpriteEffects.None, 0);
}
if (e4sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e4sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e4sparklePos,
SpriteEffects.None, 2);
}
#endregion
//non-combat sheep
#region e5
Vector2 e5smokePos = new Vector2(e5X, e5Y);
Rectangle e5showSmoke = new Rectangle((e5smokeFrame * 127) +
e5smokeFrame, 0, 127, 144);
Rectangle e5hitbox = new Rectangle(e5X + 15, e5Y + 80, 112,
134);
if (e5HP > 0)
{
loadSheep.Draw(spriteBatch, new Rectangle((e5frame * 127) +
e5frame, ((e5act + e5facing) * 144) + (e5act + e5facing), 127, 144), e5FreezeColor,
opacity, e5invBlink, new Vector2(e5X, e5Y), 0);
}
if (e5smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e5showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e5smokePos,
SpriteEffects.None, 0);
}
#endregion
//ram
#region e6
Vector2 e6smokePos = new Vector2(e6X, e6Y);
Rectangle e6showSmoke = new Rectangle((e6smokeFrame * 127) +
e6smokeFrame, 0, 127, 144);
Vector2 e6plinkPos = new Vector2(e6X + 31, e6Y + 40);
Rectangle e6plinkFrame = new Rectangle((e6plinkFr * 65) +
e6plinkFr, 0, 65, 65);
Rectangle e6hitbox = new Rectangle(e6X + 15, e6Y + 10, 112,
134);
Rectangle e6FreezeL = new Rectangle(e6X, e6Y + 65, 8, 144);
Rectangle e6FreezeTop = new Rectangle(e6X, e6Y + 60, 127, 15);
Rectangle e6FreezeTopIn = new Rectangle(e6X, e6Y + 61, 127, 15);
Rectangle e6FreezeR = new Rectangle(e6X + 119, e6Y + 65, 8,
144);
Rectangle e6coinhitbox = new Rectangle(e6X + 43, e6Y + 79, 55,
65);
if (e6HP > 0)
{
loadRam.Draw(spriteBatch, new Rectangle((e6frame * 127) +
e6frame, ((e6act + e6facing) * 144) + (e6act + e6facing), 127, 144), e6FreezeColor,
opacity, e6invBlink, new Vector2(e6X, e6Y), 0);
}
if (e6plinkOn == true && e6plinkFr < 4)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65),
e6plinkFrame, new Color(opacity, opacity, opacity, 255), 0, -e6plinkPos,
SpriteEffects.None, 2);
}
if (e6smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e6showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e6smokePos,
SpriteEffects.None, 0);
}
#endregion
#endregion
#region Draw Guide
if (on1e2 == false)
{
spriteBatch.Draw(guidePause, new Rectangle(0, 0, 599, 39),
new Rectangle(0, (39 * pausePos) + (pausePos * 2), 599, 39), new Color(opacity,
opacity, opacity, 255), 0, new Vector2(-(drgnCamX + 660), -(drgnCamY + 710 -
resMod)), SpriteEffects.None, 9);
if (drgnX >= 967 && drgnX < 1376)
{
if (drgnFaceR == true)
{
spriteBatch.Draw(guideBubble, new Rectangle(0, 0,
150, 135), new Rectangle(302, (135 * (controlType + tutorialPos)) + controlType +
tutorialPos, 150, 135), new Color(opacity, opacity, opacity, 255), 0, new Vector2(-
(drgnX + 88), -(drgnY - 118)), SpriteEffects.None, -0.1f);
}
else
{
spriteBatch.Draw(guideBubble, new Rectangle(0, 0,
150, 135), new Rectangle(302, (135 * (controlType + tutorialPos)) + controlType +
tutorialPos, 150, 135), new Color(opacity, opacity, opacity, 255), 0, new Vector2(-
(drgnX + 68), -(drgnY - 118)), SpriteEffects.None, -0.1f);
}
}
if (drgnX >= 1486 && drgnX < 1904)
{
if (drgnFaceR == true)
{
spriteBatch.Draw(guideBubble, new Rectangle(0, 0,
150, 135), new Rectangle(0, (135 * (controlType + tutorialPos)) + controlType +
tutorialPos, 150, 135), new Color(opacity, opacity, opacity, 255), 0, new Vector2(-
(drgnX + 88), -(drgnY - 118)), SpriteEffects.None, -0.1f);
}
else
{
spriteBatch.Draw(guideBubble, new Rectangle(0, 0,
150, 135), new Rectangle(0, (135 * (controlType + tutorialPos)) + controlType +
tutorialPos, 150, 135), new Color(opacity, opacity, opacity, 255), 0, new Vector2(-
(drgnX + 68), -(drgnY - 118)), SpriteEffects.None, -0.1f);
}
}
if (drgnX >= 2004 && drgnX < 2666)
{
if (drgnFaceR == true)
{
spriteBatch.Draw(guideBubble, new Rectangle(0, 0,
150, 135), new Rectangle(151, (135 * (controlType + tutorialPos)) + controlType +
tutorialPos, 150, 135), new Color(opacity, opacity, opacity, 255), 0, new Vector2(-
(drgnX + 88), -(drgnY - 118)), SpriteEffects.None, -0.1f);
}
else
{
spriteBatch.Draw(guideBubble, new Rectangle(0, 0,
150, 135), new Rectangle(151, (135 * (controlType + tutorialPos)) + controlType +
tutorialPos, 150, 135), new Color(opacity, opacity, opacity, 255), 0, new Vector2(-
(drgnX + 68), -(drgnY - 118)), SpriteEffects.None, -0.1f);
}
}
if (drgnX >= 3231 && drgnX < 4246)
{
if (drgnFaceR == true)
{
spriteBatch.Draw(guideBubble, new Rectangle(0, 0,
150, 135), new Rectangle(453, (135 * (controlType + tutorialPos)) + controlType +
tutorialPos, 150, 135), new Color(opacity, opacity, opacity, 255), 0, new Vector2(-
(drgnX + 88), -(drgnY - 118)), SpriteEffects.None, -0.1f);
}
else
{
spriteBatch.Draw(guideBubble, new Rectangle(0, 0,
150, 135), new Rectangle(151, (135 * (controlType + tutorialPos)) + controlType +
tutorialPos, 150, 135), new Color(opacity, opacity, opacity, 255), 0, new Vector2(-
(drgnX + 68), -(drgnY - 118)), SpriteEffects.None, -0.1f);
}
}
}
#endregion
#region Stage Exit Hitboxes
if (drgnhitboxHead.Intersects(exitArea))
{
if (on1e2 == false)
{
on1e2 = true;
}
endOfStage = true;
}
if (drgnhitboxHead.Intersects(pitfall1))
{
drgnHPNow = 0;
}
#endregion
#region Treasure Hitboxes
if (have01Hatchling == false)
{
if (drgnhitboxHead.Intersects(treasure1hitbox) ||
(drgnhitbox.Intersects(treasure1hitbox)))
{
have01Hatchling = true;
pickUp1 = true;
if (treasurePickUp == false)
{
treasureWindowFrame = 0;
treasureWindowCT = 0;
treasurePickUp = true;
treasureWindowUp = true;
}
}
}
if (have21Topaz == false)
{
if (drgnhitboxHead.Intersects(treasure21hitbox) ||
(drgnhitbox.Intersects(treasure21hitbox)))
{
have21Topaz = true;
pickUp21 = true;
if (treasurePickUp == false)
{
treasureWindowFrame = 0;
treasureWindowCT = 0;
treasurePickUp = true;
treasureWindowUp = true;
}
}
}
#endregion
#region 1-1 Enemy Hitboxes
//squire
#region e1
if (e1spawn == true)
{
if (e1frozen == true && e1HP > 0)
{
if (drgnpipDL.Intersects(e1FreezeR) ||
drgnpipCL.Intersects(e1FreezeR) || drgnpipUL.Intersects(e1FreezeR))
{
touchLe1 = true;
}
else
{
touchLe1 = false;
}
if (drgnpipDR.Intersects(e1FreezeL) ||
drgnpipCR.Intersects(e1FreezeL) || drgnpipUR.Intersects(e1FreezeL))
{
touchRe1 = true;
}
else
{
touchRe1 = false;
}
if (e1frozen == true && e1HP > 0 &&
(drgnpipDL.Intersects(e1FreezeTop) || drgnpipDC.Intersects(e1FreezeTop) ||
drgnpipDR.Intersects(e1FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e1Y + 20 - 143;
e1stand = true;
}
else
{
e1stand = false;
}
}
if (drgnInvulnerable == false && e1HP > 0 &&
((drgnhitboxHead.Intersects(e1hitbox)) || (drgnhitbox.Intersects(e1hitbox))) &&
e1peaceful == false && e1frozen == false)
{
damageCheck = e1Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e1coins == true && (drgnhitboxHead.Intersects
(e1coinhitbox) || (drgnhitbox.Intersects(e1coinhitbox))))
{
e1coins = false;
e1coinTouch = true;
}
if (e1hitbox.Intersects(ClawHitbox) && e1HP > 0 &&
e1invulnerable == false && usingClaw == true && e1peaceful == false && e1frozen ==
false)
{
e1clawhit = true;
}
if (e1hitbox.Intersects(BreathHitbox) && e1HP > 0 &&
e1invulnerable == false && drgnFire == true && e1peaceful == false && e1frozen ==
false)
{
e1breathhit = true;
}
}
#endregion
#region e2
if (e2spawn == true)
{
if (e2frozen == true && e2HP > 0)
{
if (drgnpipDL.Intersects(e2FreezeR) ||
drgnpipCL.Intersects(e2FreezeR) || drgnpipUL.Intersects(e2FreezeR))
{
touchLe2 = true;
}
else
{
touchLe2 = false;
}
if (drgnpipDR.Intersects(e2FreezeL) ||
drgnpipCR.Intersects(e2FreezeL) || drgnpipUR.Intersects(e2FreezeL))
{
touchRe2 = true;
}
else
{
touchRe2 = false;
}
if (e2frozen == true && e2HP > 0 &&
(drgnpipDL.Intersects(e2FreezeTop) || drgnpipDC.Intersects(e2FreezeTop) ||
drgnpipDR.Intersects(e2FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e2Y + 20 - 143;
e2stand = true;
}
else
{
e2stand = false;
}
}
if (drgnInvulnerable == false && e2HP > 0 &&
(drgnhitboxHead.Intersects(e2hitbox) || (drgnhitbox.Intersects(e2hitbox))) &&
e2peaceful == false && e2frozen == false)
{
damageCheck = e2Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e2coins == true && (drgnhitboxHead.Intersects
(e2coinhitbox) || (drgnhitbox.Intersects(e2coinhitbox))))
{
e2coins = false;
e2coinTouch = true;
}
if (e2hitbox.Intersects(ClawHitbox) && e2HP > 0 &&
e2invulnerable == false && usingClaw == true && e2peaceful == false && e2frozen ==
false)
{
e2clawhit = true;
}
if (e2hitbox.Intersects(BreathHitbox) && e2HP > 0 &&
e2invulnerable == false && drgnFire == true && e2peaceful == false && e2frozen ==
false)
{
e2breathhit = true;
}
}
#endregion
//freestanding sheep
#region e3
if (e3spawn == true)
{
if (e3hitbox.Intersects(ClawHitbox) && e3HP > 0 &&
e3invulnerable == false && usingClaw == true && e3peaceful == false && e3frozen ==
false)
{
e3clawhit = true;
}
if (e3hitbox.Intersects(BreathHitbox) && e3HP > 0 &&
e3invulnerable == false && drgnFire == true && e3peaceful == false && e3frozen ==
false)
{
e3breathhit = true;
}
}
#endregion
#region e4
if (e4spawn == true)
{
if (e4frozen == true && e4HP > 0)
{
if (drgnpipDL.Intersects(e4FreezeR) ||
drgnpipCL.Intersects(e4FreezeR) || drgnpipUL.Intersects(e4FreezeR))
{
touchLe4 = true;
}
else
{
touchLe4 = false;
}
if (drgnpipDR.Intersects(e4FreezeL) ||
drgnpipCR.Intersects(e4FreezeL) || drgnpipUR.Intersects(e4FreezeL))
{
touchRe4 = true;
}
else
{
touchRe4 = false;
}
if (e4frozen == true && e4HP > 0 &&
(drgnpipDL.Intersects(e4FreezeTop) || drgnpipDC.Intersects(e4FreezeTop) ||
drgnpipDR.Intersects(e4FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e4Y + 20 - 143;
e4stand = true;
}
else
{
e4stand = false;
}
}
if (drgnInvulnerable == false && e4HP > 0 &&
(drgnhitboxHead.Intersects(e4hitbox) || (drgnhitbox.Intersects(e4hitbox))) &&
e4peaceful == false && e4frozen == false)
{
damageCheck = e4Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e4coins == true && (drgnhitboxHead.Intersects
(e4coinhitbox) || (drgnhitbox.Intersects(e4coinhitbox))))
{
e4coins = false;
e4coinTouch = true;
}
if (e4hitbox.Intersects(ClawHitbox) && e4HP > 0 &&
e4invulnerable == false && usingClaw == true && e4peaceful == false && e4frozen ==
false)
{
e4clawhit = true;
}
if (e4hitbox.Intersects(BreathHitbox) && e4HP > 0 &&
e4invulnerable == false && drgnFire == true && e4peaceful == false && e4frozen ==
false)
{
e4breathhit = true;
}
}
#endregion
#region e5
if (e5spawn == true)
{
if (e5hitbox.Intersects(ClawHitbox) && e5HP > 0 &&
e5invulnerable == false && usingClaw == true && e5peaceful == false && e5frozen ==
false)
{
e5clawhit = true;
}
if (e5hitbox.Intersects(BreathHitbox) && e5HP > 0 &&
e5invulnerable == false && drgnFire == true && e5peaceful == false && e5frozen ==
false)
{
e5breathhit = true;
}
}
#endregion
//ram
#region e6
if (e6spawn == true)
{
if (e6HP > 0)
{
if (drgnpipDL.Intersects(e6FreezeR) ||
drgnpipCL.Intersects(e6FreezeR) || drgnpipUL.Intersects(e6FreezeR))
{
touchLe6 = true;
}
else
{
touchLe6 = false;
}
if (drgnpipDR.Intersects(e6FreezeL) ||
drgnpipCR.Intersects(e6FreezeL) || drgnpipUR.Intersects(e6FreezeL))
{
touchRe6 = true;
}
else
{
touchRe6 = false;
}
if (e6HP > 0 && (drgnpipDL.Intersects(e6FreezeTop) ||
drgnpipDC.Intersects(e6FreezeTop) || drgnpipDR.Intersects(e6FreezeTop)) && drgnYvel
>= 0)
{
drgnYvel = 0;
drgnOnGround = true;
e6stand = true;
if (drgnpipDL.Intersects(e6FreezeTopIn) ||
drgnpipDC.Intersects(e6FreezeTopIn) || drgnpipDR.Intersects(e6FreezeTopIn))
{
drgnY = e6Y - 83;
}
}
else
{
if (e6stand == true)
{
e6stand = false;
}
}
}
if (e6hitbox.Intersects(ClawHitbox) && e6HP > 0 &&
e6invulnerable == false && usingClaw == true && e6peaceful == false && e6frozen ==
false)
{
e6clawhit = true;
}
if (e6hitbox.Intersects(BreathHitbox) && e6HP > 0 &&
e6invulnerable == false && drgnFire == true && e6peaceful == false && e6frozen ==
false)
{
e6breathhit = true;
}
#endregion
}
//END 1-1 ENEMY HITBOXES
#endregion
}
#endregion
//END STAGE 1-1 DRAW
//STAGE 1-2 DRAW
#region Stage 1-2 Draw
if (stage1e2 == true)
{
#region Load Stage Sprites
Vector2 printFarBG = new Vector2(0, 0);
#endregion
#region Stage Contact Boxes
Rectangle pitfall1 = new Rectangle(6430, 2270, 5000, 20);
Rectangle exitArea = new Rectangle(10828, 0, 20, 2276);
Rectangle barrier1 = new Rectangle(7100, 0, 20, 2276);
Rectangle barrier2 = new Rectangle(10370, 0, 20, 2276);
Rectangle event1 = new Rectangle(5142, 0, 20, 2276);
Rectangle event2 = new Rectangle(7618, 0, 20, 2276);
#endregion
#region Draw Treasure
Vector2 treasure16Pos = new Vector2(1119, 1294);
Rectangle treasure16Frame = new Rectangle((treasureShineFrame *
75) + treasureShineFrame, 1140, 75, 75);
Rectangle treasure16Hitbox = new Rectangle(1134, 1309, 45, 45);
if (have16Leaf == false || pickUp16 == true)
{
spriteBatch.Draw(allTreasureSS, new Rectangle(0, 0, 75, 75),
treasure16Frame, new Color(opacity, opacity, opacity, 255), 0, -treasure16Pos,
SpriteEffects.None, -1);
}
if (pickUp16 == true)
{
drawTreasureText.DrawText1(spriteBatch, treasureWindowFrame,
opacity, new Vector2(drgnCamX + treasureWindowX, drgnCamY + resMod));
}
#endregion
#region Draw Stage
drawStages.Draw(spriteBatch, opacity, (-150 + drgnCamX -
(drgnCamX / 50)), (-170 + drgnCamY - (drgnCamY / 100)), 0, 0, 0, 0, 0, 0, 1, 1, 0,
0, 0, 0, 0, 0, 0, 0);
drawSky.DrawSkyA(spriteBatch, drgnCamX, -170 + drgnCamY -
(drgnCamY / 100), opacity);
#endregion
#region Draw Enemies
//Stampede type a
#region e1
Vector2 e1pos = new Vector2(e1X, e1Y + 36);
Rectangle e1framepos = new Rectangle((e1frame * 498) + e1frame,
((e1act + e1facing) * 252) + (e1act + e1facing), 498, 252);
Rectangle e1hitbox = new Rectangle(e1X + 37, e1Y + 170, 450,
118);
if (e1HP > 0)
{
loadStampede.Draw(spriteBatch, e1framepos, e1FreezeColor,
opacity, e1invBlink, e1pos, 0);
}
#endregion
//Archer
#region e2
Vector2 e2pos = new Vector2(e2X, e2Y);
Rectangle e2framepos = new Rectangle((e2frame * 127) + e2frame,
(e2act * 144) + e2act, 127, 144);
Vector2 e2coinPos = new Vector2(e2X + 33, e2Y + 79);
Rectangle e2coinSpin = new Rectangle((e2coinFrame * 65) +
e2coinFrame, (e2coinType * 65) + e2coinType, 65, 65);
Vector2 e2sparklePos = new Vector2(e2X + 33, e2Y + 44);
Rectangle e2sparkleFrame = new Rectangle((e2sparkleFr * 65) +
e2sparkleFr, 0, 65, 100);
Vector2 e2smokePos = new Vector2(e2X, e2Y);
Rectangle e2showSmoke = new Rectangle((e2smokeFrame * 127) +
e2smokeFrame, 0, 127, 144);
Rectangle e2FreezeL = new Rectangle(e2X, e2Y + 5, 8, 144);
Rectangle e2FreezeTop = new Rectangle(e2X, e2Y + 20, 127, 15);
Rectangle e2FreezeR = new Rectangle(e2X + 119, e2Y + 5, 8, 144);
Rectangle e2coinhitbox = new Rectangle(e2X + 43, e2Y + 79, 55,
65);
if (e2HP > 0)
{
loadArcher.Draw(spriteBatch, e2framepos, e2FreezeColor,
opacity, e2invBlink, e2pos, 0, e2facing);
}
if (e2coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e2coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e2coinPos,
SpriteEffects.None, 0);
}
if (e2smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e2showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e2smokePos,
SpriteEffects.None, 0);
}
if (e2sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e2sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e2sparklePos,
SpriteEffects.None, 2);
}
Vector2 e2projAPos = new Vector2(e2projA_X, e2projA_Y);
Rectangle e2projAFrame = new Rectangle((e2projA_frame * 96) +
e2projA_frame, (e2projA_dir * 80) + e2projA_dir, 96, 80);
if (e2projectile == true)
{
loadArcher.Arrow(spriteBatch, e2projAFrame, opacity,
e2projAPos, -1);
}
Rectangle e2hitbox = new Rectangle(e2X + 45, e2Y + 20, 62, 124);
Rectangle e2projHitbox = new Rectangle(e2projA_X + e2projOrigX,
e2projA_Y + e2projOrigY, e2projWidth, e2projHeight);
#endregion
//Heavy XX
#region e3
Vector2 e3pos = new Vector2(e3X, e3Y);
Vector2 e3shadowPos = new Vector2(e3X - 12, e3Y);
Rectangle e3framepos = new Rectangle((e3frame * 127) + e3frame,
((e3act + e3facing) * 144) + (e3act + e3facing), 127, 144);
Vector2 e3coinPos = new Vector2(e3X + 33, e3Y + 79);
Rectangle e3coinSpin = new Rectangle((e3coinFrame * 65) +
e3coinFrame, (e3coinType * 65) + e3coinType, 65, 65);
Vector2 e3sparklePos = new Vector2(e3X + 33, e3Y + 44);
Rectangle e3sparkleFrame = new Rectangle((e3sparkleFr * 65) +
e3sparkleFr, 0, 65, 100);
Vector2 e3smokePos = new Vector2(e3X, e3Y);
Rectangle e3showSmoke = new Rectangle((e3smokeFrame * 127) +
e3smokeFrame, 0, 127, 144);
Rectangle e3hitbox = new Rectangle(e3X + 30, e3Y + 10, 82, 134);
Rectangle e3shieldboxL = new Rectangle(e3X - 5, e3Y + 10, 10,
134);
Rectangle e3shieldboxR = new Rectangle(e3X + 127, e3Y + 10, 10,
134);
Rectangle e3FreezeL = new Rectangle(e3X, e3Y + 5, 8, 144);
Rectangle e3FreezeTop = new Rectangle(e3X, e3Y + 20, 127, 15);
Rectangle e3FreezeR = new Rectangle(e3X + 119, e3Y + 5, 8, 144);
Rectangle e3coinhitbox = new Rectangle(e3X + 43, e3Y + 79, 55,
65);
if (e3HP > 0)
{
loadCD.Draw(spriteBatch, e3framepos, e3FreezeColor, opacity,
e3invBlink, e3pos, 0);
}
if (e3coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e3coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e3coinPos,
SpriteEffects.None, 0);
}
if (e3smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e3showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e3smokePos,
SpriteEffects.None, 0);
}
if (e3sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e3sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e3sparklePos,
SpriteEffects.None, 2);
}
if (e3plinkOn == true && e3plinkFr < 4)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65), new
Rectangle((e3plinkFr * 65) + e3plinkFr, 0, 65, 65), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(e3X + 31), -(e3Y + 40)), SpriteEffects.None, 2);
}
#endregion
//Heavy XX
#region e4
Vector2 e4pos = new Vector2(e4X, e4Y);
Vector2 e4shadowPos = new Vector2(e4X - 12, e4Y);
Rectangle e4framepos = new Rectangle((e4frame * 127) + e4frame,
((e4act + e4facing) * 144) + (e4act + e4facing), 127, 144);
Vector2 e4coinPos = new Vector2(e4X + 33, e4Y + 79);
Rectangle e4coinSpin = new Rectangle((e4coinFrame * 65) +
e4coinFrame, (e4coinType * 65) + e4coinType, 65, 65);
Vector2 e4sparklePos = new Vector2(e4X + 33, e4Y + 44);
Rectangle e4sparkleFrame = new Rectangle((e4sparkleFr * 65) +
e4sparkleFr, 0, 65, 100);
Vector2 e4smokePos = new Vector2(e4X, e4Y);
Rectangle e4showSmoke = new Rectangle((e4smokeFrame * 127) +
e4smokeFrame, 0, 127, 144);
Rectangle e4hitbox = new Rectangle(e4X + 30, e4Y + 10, 82, 134);
Rectangle e4shieldboxL = new Rectangle(e4X - 5, e4Y + 10, 10,
134);
Rectangle e4shieldboxR = new Rectangle(e4X + 127, e4Y + 10, 10,
134);
Rectangle e4FreezeL = new Rectangle(e4X, e4Y + 5, 8, 144);
Rectangle e4FreezeTop = new Rectangle(e4X, e4Y + 20, 127, 15);
Rectangle e4FreezeR = new Rectangle(e4X + 119, e4Y + 5, 8, 144);
Rectangle e4coinhitbox = new Rectangle(e4X + 43, e4Y + 79, 55,
65);
if (e4HP > 0)
{
loadCD.Draw(spriteBatch, e4framepos, e4FreezeColor, opacity,
e4invBlink, e4pos, 0);
}
if (e4coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e4coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e4coinPos,
SpriteEffects.None, 0);
}
if (e4smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e4showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e4smokePos,
SpriteEffects.None, 0);
}
if (e4sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e4sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e4sparklePos,
SpriteEffects.None, 2);
}
if (e4plinkOn == true && e4plinkFr < 4)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65), new
Rectangle((e4plinkFr * 65) + e3plinkFr, 0, 65, 65), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(e4X + 31), -(e4Y + 40)), SpriteEffects.None, 2);
}
#endregion
//Squire
#region e5
Vector2 e5pos = new Vector2(e5X, e5Y);
Vector2 e5shadowPos = new Vector2(e5X - 10, e5Y);
Rectangle e5framepos = new Rectangle((e5frame * 127) + e5frame,
((e5act + e5facing) * 144) + (e5act + e5facing), 127, 144);
Vector2 e5coinPos = new Vector2(e5X + 33, e5Y + 79);
Rectangle e5coinSpin = new Rectangle((e5coinFrame * 65) +
e5coinFrame, (e5coinType * 65) + e5coinType, 65, 65);
Vector2 e5sparklePos = new Vector2(e5X + 33, e5Y + 44);
Rectangle e5sparkleFrame = new Rectangle((e5sparkleFr * 65) +
e5sparkleFr, 0, 65, 100);
Vector2 e5smokePos = new Vector2(e5X, e5Y);
Rectangle e5showSmoke = new Rectangle((e5smokeFrame * 127) +
e5smokeFrame, 0, 127, 144);
Rectangle e5hitbox = new Rectangle(e5X + 15, e5Y + 10, 112,
134);
Rectangle e5FreezeL = new Rectangle(e5X, e5Y + 5, 8, 144);
Rectangle e5FreezeTop = new Rectangle(e5X, e5Y + 20, 127, 15);
Rectangle e5FreezeR = new Rectangle(e5X + 119, e5Y + 5, 8, 144);
Rectangle e5coinhitbox = new Rectangle(e5X + 43, e5Y + 79, 55,
65);
if (e5HP > 0)
{
loadSquire.Draw(spriteBatch, e5framepos, e5FreezeColor,
opacity, e5invBlink, e5pos, 0);
}
if (e5coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e5coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e5coinPos,
SpriteEffects.None, 0);
}
if (e5smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e5showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e5smokePos,
SpriteEffects.None, 0);
}
if (e5sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e5sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e5sparklePos,
SpriteEffects.None, 2);
}
#endregion
//Archer
#region e7
Vector2 e7pos = new Vector2(e7X, e7Y);
Vector2 e7shadowPos = new Vector2(e7X - 10, e7Y);
Rectangle e7framepos = new Rectangle((e7frame * 127) + e7frame,
((e7act) * 144) + (e7act), 127, 144);
Vector2 e7coinPos = new Vector2(e7X + 33, e7Y + 79);
Rectangle e7coinSpin = new Rectangle((e7coinFrame * 65) +
e7coinFrame, (e7coinType * 65) + e7coinType, 65, 65);
Vector2 e7sparklePos = new Vector2(e7X + 33, e7Y + 44);
Rectangle e7sparkleFrame = new Rectangle((e7sparkleFr * 65) +
e7sparkleFr, 0, 65, 100);
Vector2 e7smokePos = new Vector2(e7X, e7Y);
Rectangle e7showSmoke = new Rectangle((e7smokeFrame * 127) +
e7smokeFrame, 0, 127, 144);
Rectangle e7FreezeL = new Rectangle(e7X, e7Y + 5, 8, 144);
Rectangle e7FreezeTop = new Rectangle(e7X, e7Y + 20, 127, 15);
Rectangle e7FreezeR = new Rectangle(e7X + 119, e7Y + 5, 8, 144);
Rectangle e7coinhitbox = new Rectangle(e7X + 43, e7Y + 79, 55,
65);
if (e7HP > 0)
{
loadArcher.Draw(spriteBatch, e7framepos, e7FreezeColor,
opacity, e7invBlink, e7pos, 0, 1);
}
if (e7smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e7showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e7smokePos,
SpriteEffects.None, 0);
}
Vector2 e7projAPos = new Vector2(e7projA_X, e7projA_Y);
Rectangle e7projAFrame = new Rectangle((e7projA_frame * 96) +
e7projA_frame, (e7projA_dir * 80) + e7projA_dir, 96, 80);
if (e7projectile == true)
{
loadArcher.Arrow(spriteBatch, e7projAFrame, opacity,
e7projAPos, -1);
}
Rectangle e7hitbox = new Rectangle(e7X + 25, e7Y + 20, 102,
124);
Rectangle e7projHitbox = new Rectangle(e7projA_X + e7projOrigX,
e7projA_Y + e7projOrigY, e7projWidth, e7projHeight);
#endregion
//Stampede type b
#region e6
Vector2 e6pos = new Vector2(e6X, e6Y + 36);
Vector2 e6shadowPos = new Vector2(e6X - 10, e6Y);
Rectangle e6framepos = new Rectangle((e6frame * 498) + e6frame,
((e6act + e6facing) * 252) + (e6act + e6facing), 498, 252);
Rectangle e6hitbox = new Rectangle(e6X, 0, 418, 2246);
if (e6spawn == true)
{
loadStampede.Draw(spriteBatch, e6framepos, e6FreezeColor,
opacity, e6invBlink, e6pos, 0);
}
#endregion
#endregion
#region Draw NPC
npc1e2.Draw(spriteBatch, npc1Frame, npc1Act, opacity);
Rectangle farmerHitbox = new Rectangle(3440, 1474, 127, 100);
if ((usingClaw == true && ClawHitbox.Intersects(farmerHitbox))
|| (drgnFire == true && BreathHitbox.Intersects(farmerHitbox)))
{
if (npc1Act != 1)
{
npc1Frame = 0;
npc1CT = 0;
npc1Act = 1;
}
}
#endregion
#region Stage Exit Hitboxes
if (drgnhitboxHead.Intersects(exitArea))
{
if (on1e3 == false)
{
on1e3 = true;
}
endOfStage = true;
}
if (drgnhitboxHead.Intersects(pitfall1))
{
drgnHPNow = 0;
}
#endregion
#region Treasure Hitboxes
if (have16Leaf == false)
{
if (drgnhitboxHead.Intersects(treasure16Hitbox) ||
drgnhitbox.Intersects(treasure16Hitbox))
{
have16Leaf = true;
pickUp16 = true;
if (treasurePickUp == false)
{
treasureWindowFrame = 0;
treasureWindowCT = 0;
treasurePickUp = true;
treasureWindowUp = true;
}
}
}
#endregion
#region Event
#region Event 1
if ((drgnhitboxHead.Intersects(event1) || drgnhitbox.Intersects
(event1)) && seenEvent1 == false)
{
if (runEvent == false)
{
runEvent = true;
eventXVel = 4;
e6spawn = true;
e6X = 3942;
e6Y = 990;
e6CT = 0;
e6timer = 0;
e6HP = 30;
e6armor = 0;
e6act = 1;
e6facing = 3;
e6frame = 0;
e6Opacity = 255;
e6invTimer = 0;
e6knockbackTimer = 0;
e6hitTimer = 0;
e6invBlink = 255;
e6Attack = 30;
e6FireVul = 0;
e6BoltVul = 0;
e6AcidVul = 0;
e6faceR = true;
e6invulnerable = false;
e6knockback = false;
e6knockbackRes = false;
e6onGround = true;
e6proximity = false;
e6touchWallL = false;
e6touchWallR = false;
e6breathhit = false;
e6clawhit = false;
e6frozen = false;
e6peaceful = false;
e6frRes = false;
e6BurnVul = false;
e6ShockVul = false;
e6peaceRes = false;
e6coins = false;
e6smoke = false;
e6smokeCT = 0;
e6coinValue = 0;
e6coinType = 0;
e6altAnimCT = 0;
e6FrameHalf = 4;
}
if (dragonDash == false)
{
dragonDash = true;
}
if (drgnOnGround == true)
{
eventWait++;
if (eventWait <= 60)
{
drgnAction = 0;
}
if (eventWait > 60 && eventWait < 180)
{
drgnFaceR = false;
drgnFacingDir = 13;
drgnAction = 7;
}
else if (eventWait >= 220)
{
drgnFaceR = true;
drgnFacingDir = 0;
drgnAction = 0;
}
if (e6X < 4190)
{
e6X = e6X + eventXVel;
}
if (e6X >= 4190)
{
e6X = 4190;
if (eventWait > 180)
{
seenEvent1 = true;
runEvent = false;
eventWait = 0;
}
}
}
}
#endregion
#region Event 2
if ((drgnhitboxHead.Intersects(event2) || drgnhitbox.Intersects
(event2)) && seenEvent2 == false)
{
if (runEvent == false)
{
runEvent = true;
e6X = 6818;
e6Y = 0;
eventYVel = 5;
eventXVel = 5;
}
if (e6Y < 1099)
{
e6Y = e6Y + eventYVel;
}
if (e6Y >= 1099)
{
e6Y = 1099;
if (eventYVel > 0)
{
eventYVel = 0;
drgnOnGround = false;
drgnAction = 7;
drgnYvel = -4;
}
}
if (dragonDash == false)
{
dragonDash = true;
}
if (drgnOnGround == true)
{
eventWait++;
if (eventWait < 20)
{
drgnAction = 0;
}
if (eventWait > 180)
{
if (e6Y >= 1099)
{
seenEvent2 = true;
runEvent = false;
eventWait = 0;
}
}
}
}
#endregion
#endregion
#region 1-2 Enemy Hitboxes
//stampede A
#region e1
if (e1spawn == true)
{
if (drgnInvulnerable == false && e1HP > 0 &&
(drgnhitboxHead.Intersects(e1hitbox) || (drgnhitbox.Intersects(e1hitbox))) &&
e1peaceful == false && e1frozen == false)
{
damageCheck = e1Attack;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
//archer
#region e2
if (e2spawn == true)
{
if (e2frozen == true && e2HP > 0)
{
if (drgnpipDL.Intersects(e2FreezeR) ||
drgnpipCL.Intersects(e2FreezeR) || drgnpipUL.Intersects(e2FreezeR))
{
touchLe2 = true;
}
else
{
touchLe2 = false;
}
if (drgnpipDR.Intersects(e2FreezeL) ||
drgnpipCR.Intersects(e2FreezeL) || drgnpipUR.Intersects(e2FreezeL))
{
touchRe2 = true;
}
else
{
touchRe2 = false;
}
if (e2frozen == true && e2HP > 0 &&
(drgnpipDL.Intersects(e2FreezeTop) || drgnpipDC.Intersects(e2FreezeTop) ||
drgnpipDR.Intersects(e2FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e2Y + 20 - 143;
e2stand = true;
}
else
{
e2stand = false;
}
}
if (drgnInvulnerable == false && e2HP > 0 &&
(drgnhitboxHead.Intersects(e2hitbox) || (drgnhitbox.Intersects(e2hitbox))) &&
e2peaceful == false && e2frozen == false)
{
damageCheck = e2Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e2coins == true && (drgnhitboxHead.Intersects
(e2coinhitbox) || (drgnhitbox.Intersects(e2coinhitbox))))
{
e2coins = false;
e2coinTouch = true;
}
if (e2hitbox.Intersects(ClawHitbox) && e2HP > 0 &&
e2invulnerable == false && usingClaw == true && e2peaceful == false && e2frozen ==
false)
{
e2clawhit = true;
}
if (e2hitbox.Intersects(BreathHitbox) && e2HP > 0 &&
e2invulnerable == false && drgnFire == true && e2peaceful == false && e2frozen ==
false)
{
if (breathType == 0 && e2burn == false)
{
e2burn = true;
e2burnTimer = 0;
e2burnCT = 0;
e2burnFrame = 0;
}
e2breathhit = true;
}
}
if (e2projectile == true)
{
if (drgnInvulnerable == false && (drgnhitboxHead.Intersects
(e2projHitbox) || (drgnhitbox.Intersects(e2projHitbox))))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
//Heavy XX
#region e3
if (e3spawn == true)
{
if (e3frozen == true && e3HP > 0)
{
if (drgnpipDL.Intersects(e3FreezeR) ||
drgnpipCL.Intersects(e3FreezeR) || drgnpipUL.Intersects(e3FreezeR))
{
touchLe3 = true;
}
else
{
touchLe3 = false;
}
if (drgnpipDR.Intersects(e3FreezeL) ||
drgnpipCR.Intersects(e3FreezeL) || drgnpipUR.Intersects(e3FreezeL))
{
touchRe3 = true;
}
else
{
touchRe3 = false;
}
if (e3frozen == true && e3HP > 0 &&
(drgnpipDL.Intersects(e3FreezeTop) || drgnpipDC.Intersects(e3FreezeTop) ||
drgnpipDR.Intersects(e3FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e3Y + 20 - 143;
e3stand = true;
}
else
{
e3stand = false;
}
}
if (e3peaceful == false)
{
if (drgnpipDL.Intersects(e3shieldboxR) ||
drgnpipCL.Intersects(e3shieldboxR) || drgnpipUL.Intersects(e3shieldboxR))
{
touchLe3 = true;
}
else
{
touchLe3 = false;
}
if (drgnpipDR.Intersects(e3shieldboxL) ||
drgnpipCR.Intersects(e3shieldboxL) || drgnpipUR.Intersects(e3shieldboxL))
{
touchRe3 = true;
}
else
{
touchRe3 = false;
}
}
else
{
touchLe3 = false;
touchRe3 = false;
}
if (drgnInvulnerable == false && e3HP > 0 &&
(drgnhitboxHead.Intersects(e3hitbox) || (drgnhitbox.Intersects(e3hitbox))) &&
e3peaceful == false && e3frozen == false)
{
damageCheck = e3Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e3coins == true && (drgnhitboxHead.Intersects
(e3coinhitbox) || (drgnhitbox.Intersects(e3coinhitbox))))
{
e3coins = false;
e3coinTouch = true;
}
if (e3hitbox.Intersects(ClawHitbox) && e3HP > 0 &&
e3invulnerable == false && usingClaw == true && e3peaceful == false && e3frozen ==
false)
{
e3clawhit = true;
}
if (e3hitbox.Intersects(BreathHitbox) && e3HP > 0 &&
e3invulnerable == false && drgnFire == true && e3peaceful == false && e3frozen ==
false)
{
e3breathhit = true;
}
}
#endregion
//Heavy XX
#region e4
if (e4spawn == true)
{
if (e4frozen == true && e4HP > 0)
{
if (drgnpipDL.Intersects(e4FreezeR) ||
drgnpipCL.Intersects(e4FreezeR) || drgnpipUL.Intersects(e4FreezeR))
{
touchLe4 = true;
}
else
{
touchLe4 = false;
}
if (drgnpipDR.Intersects(e4FreezeL) ||
drgnpipCR.Intersects(e4FreezeL) || drgnpipUR.Intersects(e4FreezeL))
{
touchRe4 = true;
}
else
{
touchRe4 = false;
}
if (e4frozen == true && e4HP > 0 &&
(drgnpipDL.Intersects(e4FreezeTop) || drgnpipDC.Intersects(e4FreezeTop) ||
drgnpipDR.Intersects(e4FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e4Y + 20 - 143;
e4stand = true;
}
else
{
e4stand = false;
}
}
if (e4peaceful == false)
{
if (drgnpipDL.Intersects(e4shieldboxR) ||
drgnpipCL.Intersects(e4shieldboxR) || drgnpipUL.Intersects(e4shieldboxR))
{
touchLe4 = true;
}
else
{
touchLe4 = false;
}
if (drgnpipDR.Intersects(e4shieldboxL) ||
drgnpipCR.Intersects(e4shieldboxL) || drgnpipUR.Intersects(e4shieldboxL))
{
touchRe4 = true;
}
else
{
touchRe4 = false;
}
}
else
{
touchRe4 = false;
touchLe4 = false;
}
if (drgnInvulnerable == false && e4HP > 0 &&
(drgnhitboxHead.Intersects(e4hitbox) || (drgnhitbox.Intersects(e4hitbox))) &&
e4peaceful == false && e4frozen == false)
{
damageCheck = e4Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e4hitbox.Intersects(ClawHitbox) && e4HP > 0 &&
e4invulnerable == false && usingClaw == true && e4peaceful == false && e4frozen ==
false)
{
e4clawhit = true;
}
if (e4hitbox.Intersects(BreathHitbox) && e4HP > 0 &&
e4invulnerable == false && drgnFire == true && e4peaceful == false && e4frozen ==
false)
{
e4breathhit = true;
}
}
#endregion
//Squire
#region e5
if (e5spawn == true)
{
if (e5frozen == true && e5HP > 0)
{
if (drgnpipDL.Intersects(e5FreezeR) ||
drgnpipCL.Intersects(e5FreezeR) || drgnpipUL.Intersects(e5FreezeR))
{
touchLe5 = true;
}
else
{
touchLe5 = false;
}
if (drgnpipDR.Intersects(e5FreezeL) ||
drgnpipCR.Intersects(e5FreezeL) || drgnpipUR.Intersects(e5FreezeL))
{
touchRe5 = true;
}
else
{
touchRe5 = false;
}
if (e5frozen == true && e5HP > 0 &&
(drgnpipDL.Intersects(e5FreezeTop) || drgnpipDC.Intersects(e5FreezeTop) ||
drgnpipDR.Intersects(e5FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e5Y - 143;
}
}
if (drgnInvulnerable == false && e5HP > 0 &&
((drgnhitboxHead.Intersects(e5hitbox)) || (drgnhitbox.Intersects(e5hitbox))) &&
e5peaceful == false && e5frozen == false)
{
damageCheck = e5Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e5coins == true && (drgnhitboxHead.Intersects
(e5coinhitbox) || (drgnhitbox.Intersects(e5coinhitbox))))
{
e5coins = false;
e5coinTouch = true;
}
if (e5hitbox.Intersects(ClawHitbox) && e5HP > 0 &&
e5invulnerable == false && usingClaw == true && e5peaceful == false && e5frozen ==
false)
{
e5clawhit = true;
}
if (e5hitbox.Intersects(BreathHitbox) && e5HP > 0 &&
e5invulnerable == false && drgnFire == true && e5peaceful == false && e5frozen ==
false)
{
e5breathhit = true;
}
}
#endregion
//Archer
#region e7
if (e7spawn == true)
{
if (e7frozen == true && e7HP > 0)
{
if (drgnpipDL.Intersects(e7FreezeR) ||
drgnpipCL.Intersects(e7FreezeR) || drgnpipUL.Intersects(e7FreezeR))
{
touchLe7 = true;
}
else
{
touchLe7 = false;
}
if (drgnpipDR.Intersects(e7FreezeL) ||
drgnpipCR.Intersects(e7FreezeL) || drgnpipUR.Intersects(e7FreezeL))
{
touchRe7 = true;
}
else
{
touchRe7 = false;
}
if (e7frozen == true && e7HP > 0 &&
(drgnpipDL.Intersects(e7FreezeTop) || drgnpipDC.Intersects(e7FreezeTop) ||
drgnpipDR.Intersects(e7FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e7Y - 143;
}
}
if (drgnInvulnerable == false && e7HP > 0 &&
(drgnhitboxHead.Intersects(e7hitbox) || (drgnhitbox.Intersects(e7hitbox))) &&
e7peaceful == false && e7frozen == false)
{
damageCheck = e7Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e7hitbox.Intersects(ClawHitbox) && e7HP > 0 &&
e7invulnerable == false && usingClaw == true && e7peaceful == false && e7frozen ==
false)
{
e7clawhit = true;
}
if (e7hitbox.Intersects(BreathHitbox) && e7HP > 0 &&
e7invulnerable == false && drgnFire == true && e7peaceful == false && e7frozen ==
false)
{
if (breathType == 0 && e7burn == false)
{
e7burn = true;
e7burnTimer = 0;
e7burnCT = 0;
e7burnFrame = 0;
}
e7breathhit = true;
}
}
if (e7projectile == true)
{
if (drgnInvulnerable == false && (drgnhitboxHead.Intersects
(e7projHitbox) || (drgnhitbox.Intersects(e7projHitbox))))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
//stampede B
#region e6
if (e6spawn == true)
{
if (drgnhitboxHead.Intersects(e6hitbox) ||
drgnhitbox.Intersects(e6hitbox))
{
damageCheck = e6Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e4hitbox.Intersects(e6hitbox))
{
if (e4HP > 0)
{
e4HP = 0;
e4smoke = true;
e4smokeCT = 0;
e4smokeFrame = 0;
}
}
if (e5hitbox.Intersects(e6hitbox))
{
if (e5HP > 0)
{
e5HP = 0;
e5smoke = true;
e5smokeCT = 0;
e5smokeFrame = 0;
}
}
}
#endregion
#endregion
}
#endregion
//END STAGE 1-2 DRAW
//STAGE 1-3 DRAW
#region Stage 1-3 Draw
if (stage1e3 == true)
{
#region Stage Contact Boxes
//WALL L
Rectangle exitArea = new Rectangle(11887, 0, 1000, 5500);
Rectangle pitfall1 = new Rectangle(0, 3000, 4000, 1000);
#endregion
#region Draw Treasures
Vector2 treasure7Pos = new Vector2(3179, 1087);
Rectangle treasure7Frame = new Rectangle((treasureShineFrame *
75) + treasureShineFrame, 456, 75, 75);
Rectangle treasure7Hitbox = new Rectangle(3194, 1102, 45, 45);
if (have07Momiji == false || pickUp7 == true)
{
spriteBatch.Draw(allTreasureSS, new Rectangle(0, 0, 75, 75),
treasure7Frame, new Color(opacity, opacity, opacity, 255), 0, -treasure7Pos,
SpriteEffects.None, 0.1f);
}
if (pickUp7 == true)
{
drawTreasureText.DrawText1(spriteBatch, treasureWindowFrame,
opacity, new Vector2(drgnCamX + treasureWindowX, drgnCamY + resMod));
}
Vector2 treasure8Pos = new Vector2(6350, 2973);
Rectangle treasure8Frame = new Rectangle((treasureShineFrame *
75) + treasureShineFrame, 532, 75, 75);
Rectangle treasure8Hitbox = new Rectangle(6365, 2988, 45, 45);
if (have08Ninjato == false || pickUp8 == true)
{
spriteBatch.Draw(allTreasureSS, new Rectangle(0, 0, 75, 75),
treasure8Frame, new Color(opacity, opacity, opacity, 255), 0, -treasure8Pos,
SpriteEffects.None, 2.1f);
}
if (pickUp8 == true)
{
drawTreasureText.DrawText2(spriteBatch, treasureWindowFrame,
opacity, new Vector2(drgnCamX + treasureWindowX, drgnCamY + resMod));
}
#endregion
#region Draw Stage
drawStages.Draw(spriteBatch, opacity, (-210 + drgnCamX -
(drgnCamX / 50)), (-230 + drgnCamY - (drgnCamY / 100)), (850 + drgnCamX + (drgnCamX
/ 12)), (350 + drgnCamY - (drgnCamY / 7)), (-1430 + drgnCamX + (drgnCamX / 12)),
(500 + drgnCamY - (drgnCamY / 5)), 9007, (1900 + (drgnCamY / 2)), 1, 0, 0, 0, 0, 0,
0, 0, 0, 0);
drawSky.DrawSkyA(spriteBatch, drgnCamX, -230 + drgnCamY -
(drgnCamY / 100), opacity);
#endregion
#region Draw Warp
Rectangle warpHitbox = new Rectangle(7911, 507, 11, 30);
spriteBatch.Draw(warpSS, new Rectangle(0, 0, 191, 217), new
Rectangle((warpFrame * 191) + warpFrame, 0, 191, 217), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-7846, -307), SpriteEffects.None, 2);
if (drgnY >= 381 && drgnOnGround == true)
{
if (drgnpipDC.Intersects(warpHitbox))
{
if (endOfStage == false)
{
endOfStage = true;
on6e1 = true;
}
}
}
#endregion
#region Draw Enemies
//Squire
#region e1
Vector2 e1pos = new Vector2(e1X, e1Y);
Vector2 e1shadowPos = new Vector2(e1X - 10, e1Y);
Rectangle e1framepos = new Rectangle((e1frame * 127) + e1frame,
((e1act + e1facing) * 144) + (e1act + e1facing), 127, 144);
Vector2 e1coinPos = new Vector2(e1X + 33, e1Y + 79);
Rectangle e1coinSpin = new Rectangle((e1coinFrame * 65) +
e1coinFrame, (e1coinType * 65) + e1coinType, 65, 65);
Vector2 e1sparklePos = new Vector2(e1X + 33, e1Y + 44);
Rectangle e1sparkleFrame = new Rectangle((e1sparkleFr * 65) +
e1sparkleFr, 0, 65, 100);
Vector2 e1smokePos = new Vector2(e1X, e1Y);
Rectangle e1showSmoke = new Rectangle((e1smokeFrame * 127) +
e1smokeFrame, 0, 127, 144);
Rectangle e1hitbox = new Rectangle(e1X + 15, e1Y + 10, 112,
134);
Rectangle e1FreezeL = new Rectangle(e1X, e1Y + 5, 8, 144);
Rectangle e1FreezeTop = new Rectangle(e1X, e1Y + 20, 127, 15);
Rectangle e1FreezeR = new Rectangle(e1X + 119, e1Y + 5, 8, 144);
Rectangle e1coinhitbox = new Rectangle(e1X + 43, e1Y + 79, 55,
65);
if (e1HP > 0)
{
loadSquire.Draw(spriteBatch, e1framepos, e1FreezeColor,
opacity, e1invBlink, e1pos, 0);
}
if (e1coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e1coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e1coinPos,
SpriteEffects.None, 0);
}
if (e1smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e1showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e1smokePos,
SpriteEffects.None, 0);
}
if (e1sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e1sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e1sparklePos,
SpriteEffects.None, 2);
}
#endregion
//Archer
#region e2
Vector2 e2pos = new Vector2(e2X, e2Y);
Vector2 e2shadowPos = new Vector2(e2X - 10, e2Y);
Rectangle e2framepos = new Rectangle((e2frame * 127) + e2frame,
(e2act * 144) + e2act, 127, 144);
Vector2 e2coinPos = new Vector2(e2X + 33, e2Y + 79);
Rectangle e2coinSpin = new Rectangle((e2coinFrame * 65) +
e2coinFrame, (e2coinType * 65) + e2coinType, 65, 65);
Vector2 e2sparklePos = new Vector2(e2X + 33, e2Y + 44);
Rectangle e2sparkleFrame = new Rectangle((e2sparkleFr * 65) +
e2sparkleFr, 0, 65, 100);
Vector2 e2smokePos = new Vector2(e2X, e2Y);
Rectangle e2showSmoke = new Rectangle((e2smokeFrame * 127) +
e2smokeFrame, 0, 127, 144);
Rectangle e2FreezeL = new Rectangle(e2X, e2Y + 5, 8, 144);
Rectangle e2FreezeTop = new Rectangle(e2X, e2Y + 20, 127, 15);
Rectangle e2FreezeR = new Rectangle(e2X + 119, e2Y + 5, 8, 144);
Rectangle e2coinhitbox = new Rectangle(e2X + 43, e2Y + 79, 55,
65);
if (e2HP > 0)
{
loadArcher.Draw(spriteBatch, e2framepos, e2FreezeColor,
opacity, e2invBlink, e2pos, 0, e2facing);
}
if (e2coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e2coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e2coinPos,
SpriteEffects.None, 0);
}
if (e2smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e2showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e2smokePos,
SpriteEffects.None, 0);
}
if (e2sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e2sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e2sparklePos,
SpriteEffects.None, 2);
}
Vector2 e2projAPos = new Vector2(e2projA_X, e2projA_Y);
Rectangle e2projAFrame = new Rectangle((e2projA_frame * 96) +
e2projA_frame, (e2projA_dir * 80) + e2projA_dir, 96, 80);
if (e2projectile == true)
{
loadArcher.Arrow(spriteBatch, e2projAFrame, opacity,
e2projAPos, -1);
}
Rectangle e2hitbox = new Rectangle(e2X + 45, e2Y + 20, 62, 124);
Rectangle e2projHitbox = new Rectangle(e2projA_X + e2projOrigX,
e2projA_Y + e2projOrigY, e2projWidth, e2projHeight);
#endregion
//Heavy XX
#region e3
Vector2 e3pos = new Vector2(e3X, e3Y);
Vector2 e3shadowPos = new Vector2(e3X - 12, e3Y);
Rectangle e3framepos = new Rectangle((e3frame * 127) + e3frame,
((e3act + e3facing) * 144) + (e3act + e3facing), 127, 144);
Vector2 e3coinPos = new Vector2(e3X + 33, e3Y + 79);
Rectangle e3coinSpin = new Rectangle((e3coinFrame * 65) +
e3coinFrame, (e3coinType * 65) + e3coinType, 65, 65);
Vector2 e3sparklePos = new Vector2(e3X + 33, e3Y + 44);
Rectangle e3sparkleFrame = new Rectangle((e3sparkleFr * 65) +
e3sparkleFr, 0, 65, 100);
Vector2 e3smokePos = new Vector2(e3X, e3Y);
Rectangle e3showSmoke = new Rectangle((e3smokeFrame * 127) +
e3smokeFrame, 0, 127, 144);
Rectangle e3hitbox = new Rectangle(e3X + 25, e3Y + 10, 87, 134);
Rectangle e3shieldboxL = new Rectangle(e3X - 5, e3Y + 10, 10,
134);
Rectangle e3shieldboxR = new Rectangle(e3X + 127, e3Y + 10, 10,
134);
Rectangle e3FreezeL = new Rectangle(e3X, e3Y + 5, 8, 144);
Rectangle e3FreezeTop = new Rectangle(e3X, e3Y + 20, 127, 15);
Rectangle e3FreezeR = new Rectangle(e3X + 119, e3Y + 5, 8, 144);
Rectangle e3coinhitbox = new Rectangle(e3X + 43, e3Y + 79, 55,
65);
if (e3HP > 0)
{
loadCD.Draw(spriteBatch, e3framepos, e3FreezeColor, opacity,
e3invBlink, e3pos, 0);
}
if (e3coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e3coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e3coinPos,
SpriteEffects.None, 0);
}
if (e3smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e3showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e3smokePos,
SpriteEffects.None, 0);
}
if (e3sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e3sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e3sparklePos,
SpriteEffects.None, 2);
}
if (e3plinkOn == true && e3plinkFr < 4)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65), new
Rectangle((e3plinkFr * 65) + e3plinkFr, 0, 65, 65), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(e3X + 31), -(e3Y + 40)), SpriteEffects.None, 2);
}
#endregion
//Squire
#region e4
Vector2 e4pos = new Vector2(e4X, e4Y);
Vector2 e4shadowPos = new Vector2(e4X - 10, e4Y);
Rectangle e4framepos = new Rectangle((e4frame * 127) + e4frame,
((e4act) * 144) + (e4act), 127, 144);
Vector2 e4coinPos = new Vector2(e4X + 33, e4Y + 79);
Rectangle e4coinSpin = new Rectangle((e4coinFrame * 65) +
e4coinFrame, (e4coinType * 65) + e4coinType, 65, 65);
Vector2 e4sparklePos = new Vector2(e4X + 33, e4Y + 44);
Rectangle e4sparkleFrame = new Rectangle((e4sparkleFr * 65) +
e4sparkleFr, 0, 65, 100);
Vector2 e4smokePos = new Vector2(e4X, e4Y);
Rectangle e4showSmoke = new Rectangle((e4smokeFrame * 127) +
e4smokeFrame, 0, 127, 144);
Rectangle e4hitbox = new Rectangle(e4X + 15, e4Y + 10, 112,
134);
Rectangle e4FreezeL = new Rectangle(e4X, e4Y + 5, 8, 144);
Rectangle e4FreezeTop = new Rectangle(e4X, e4Y + 20, 127, 15);
Rectangle e4FreezeR = new Rectangle(e4X + 119, e4Y + 5, 8, 144);
Rectangle e4coinhitbox = new Rectangle(e4X + 43, e4Y + 79, 55,
65);
if (e4HP > 0)
{
loadSquire.Draw(spriteBatch, e4framepos, e4FreezeColor,
opacity, e4invBlink, e4pos, 0);
}
if (e4coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e4coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e4coinPos,
SpriteEffects.None, 0);
}
if (e4smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e4showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e4smokePos,
SpriteEffects.None, 0);
}
if (e4sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e4sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e4sparklePos,
SpriteEffects.None, 2);
}
#endregion
//Archer
#region e5
Vector2 e5pos = new Vector2(e5X, e5Y);
Vector2 e5shadowPos = new Vector2(e5X - 10, e5Y);
Rectangle e5framepos = new Rectangle((e5frame * 127) + e5frame,
((e5act) * 144) + (e5act), 127, 144);
Vector2 e5coinPos = new Vector2(e5X + 33, e5Y + 79);
Rectangle e5coinSpin = new Rectangle((e5coinFrame * 65) +
e5coinFrame, (e5coinType * 65) + e5coinType, 65, 65);
Vector2 e5sparklePos = new Vector2(e5X + 33, e5Y + 44);
Rectangle e5sparkleFrame = new Rectangle((e5sparkleFr * 65) +
e5sparkleFr, 0, 65, 100);
Vector2 e5smokePos = new Vector2(e5X, e5Y);
Rectangle e5showSmoke = new Rectangle((e5smokeFrame * 127) +
e5smokeFrame, 0, 127, 144);
Rectangle e5FreezeL = new Rectangle(e5X, e5Y + 5, 8, 144);
Rectangle e5FreezeTop = new Rectangle(e5X, e5Y + 20, 127, 15);
Rectangle e5FreezeR = new Rectangle(e5X + 119, e5Y + 5, 8, 144);
Rectangle e5coinhitbox = new Rectangle(e5X + 43, e5Y + 79, 55,
65);
if (e5HP > 0)
{
loadArcher.Draw(spriteBatch, e5framepos, e5FreezeColor,
opacity, e5invBlink, e5pos, 0, e5facing);
}
if (e5coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e5coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e5coinPos,
SpriteEffects.None, 0);
}
if (e5smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e5showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e5smokePos,
SpriteEffects.None, 0);
}
if (e5sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e5sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e5sparklePos,
SpriteEffects.None, 2);
}
Vector2 e5projAPos = new Vector2(e5projA_X, e5projA_Y);
Rectangle e5projAFrame = new Rectangle((e5projA_frame * 96) +
e5projA_frame, (e5projA_dir * 80) + e5projA_dir, 96, 80);
if (e5projectile == true)
{
loadArcher.Arrow(spriteBatch, e5projAFrame, opacity,
e5projAPos, -1);
}
Rectangle e5hitbox = new Rectangle(e5X + 45, e5Y + 20, 62, 124);
Rectangle e5projHitbox = new Rectangle(e5projA_X + e5projOrigX,
e5projA_Y + e5projOrigY, e5projWidth, e5projHeight);
#endregion
//Archer
#region e6
Vector2 e6pos = new Vector2(e6X, e6Y);
Vector2 e6shadowPos = new Vector2(e6X - 10, e6Y);
Rectangle e6framepos = new Rectangle((e6frame * 127) + e6frame,
((e6act) * 144) + (e6act), 127, 144);
Vector2 e6coinPos = new Vector2(e6X + 33, e6Y + 79);
Rectangle e6coinSpin = new Rectangle((e6coinFrame * 65) +
e6coinFrame, (e6coinType * 65) + e6coinType, 65, 65);
Vector2 e6sparklePos = new Vector2(e6X + 33, e6Y + 44);
Rectangle e6sparkleFrame = new Rectangle((e6sparkleFr * 65) +
e6sparkleFr, 0, 65, 100);
Vector2 e6smokePos = new Vector2(e6X, e6Y);
Rectangle e6showSmoke = new Rectangle((e6smokeFrame * 127) +
e6smokeFrame, 0, 127, 144);
Rectangle e6FreezeL = new Rectangle(e6X, e6Y + 5, 8, 144);
Rectangle e6FreezeTop = new Rectangle(e6X, e6Y + 20, 127, 15);
Rectangle e6FreezeR = new Rectangle(e6X + 119, e6Y + 5, 8, 144);
Rectangle e6coinhitbox = new Rectangle(e6X + 43, e6Y + 79, 55,
65);
if (e6HP > 0)
{
loadArcher.Draw(spriteBatch, e6framepos, e6FreezeColor,
opacity, e6invBlink, e6pos, 0, e6facing);
}
if (e6coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e6coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e6coinPos,
SpriteEffects.None, 0);
}
if (e6smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e6showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e6smokePos,
SpriteEffects.None, 0);
}
if (e6sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e6sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e6sparklePos,
SpriteEffects.None, 2);
}
Vector2 e6projAPos = new Vector2(e6projA_X, e6projA_Y);
Rectangle e6projAFrame = new Rectangle((e6projA_frame * 96) +
e6projA_frame, (e6projA_dir * 80) + e6projA_dir, 96, 80);
if (e6projectile == true)
{
loadArcher.Arrow(spriteBatch, e6projAFrame, opacity,
e6projAPos, -1);
}
Rectangle e6hitbox = new Rectangle(e6X + 45, e6Y + 20, 62, 124);
Rectangle e6projHitbox = new Rectangle(e6projA_X + e6projOrigX,
e6projA_Y + e6projOrigY, e6projWidth, e6projHeight);
#endregion
//Archer
#region e7
Vector2 e7pos = new Vector2(e7X, e7Y);
Vector2 e7shadowPos = new Vector2(e7X - 10, e7Y);
Rectangle e7framepos = new Rectangle((e7frame * 127) + e7frame,
((e7act) * 144) + (e7act), 127, 144);
Vector2 e7coinPos = new Vector2(e7X + 33, e7Y + 79);
Rectangle e7coinSpin = new Rectangle((e7coinFrame * 65) +
e7coinFrame, (e7coinType * 65) + e7coinType, 65, 65);
Vector2 e7sparklePos = new Vector2(e7X + 33, e7Y + 44);
Rectangle e7sparkleFrame = new Rectangle((e7sparkleFr * 65) +
e7sparkleFr, 0, 65, 100);
Vector2 e7smokePos = new Vector2(e7X, e7Y);
Rectangle e7showSmoke = new Rectangle((e7smokeFrame * 127) +
e7smokeFrame, 0, 127, 144);
Rectangle e7FreezeL = new Rectangle(e7X, e7Y + 5, 8, 144);
Rectangle e7FreezeTop = new Rectangle(e7X, e7Y + 20, 127, 15);
Rectangle e7FreezeR = new Rectangle(e7X + 119, e7Y + 5, 8, 144);
Rectangle e7coinhitbox = new Rectangle(e7X + 43, e7Y + 79, 55,
65);
if (e7HP > 0)
{
loadArcher.Draw(spriteBatch, e7framepos, e7FreezeColor,
opacity, e7invBlink, e7pos, 0, e7facing);
}
if (e7coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e7coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e7coinPos,
SpriteEffects.None, 0);
}
if (e7smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e7showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e7smokePos,
SpriteEffects.None, 0);
}
if (e7sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e7sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e7sparklePos,
SpriteEffects.None, 2);
}
Vector2 e7projAPos = new Vector2(e7projA_X, e7projA_Y);
Rectangle e7projAFrame = new Rectangle((e7projA_frame * 96) +
e7projA_frame, (e7projA_dir * 80) + e7projA_dir, 96, 80);
if (e7projectile == true)
{
loadArcher.Arrow(spriteBatch, e7projAFrame, opacity,
e7projAPos, -1);
}
Rectangle e7hitbox = new Rectangle(e7X + 45, e7Y + 20, 62, 124);
Rectangle e7projHitbox = new Rectangle(e7projA_X + e7projOrigX,
e7projA_Y + e7projOrigY, e7projWidth, e7projHeight);
#endregion
//Archer
#region e8
Vector2 e8pos = new Vector2(e8X, e8Y);
Vector2 e8shadowPos = new Vector2(e8X - 10, e8Y);
Rectangle e8framepos = new Rectangle((e8frame * 127) + e8frame,
((e8act) * 144) + (e8act), 127, 144);
Vector2 e8coinPos = new Vector2(e8X + 33, e8Y + 79);
Rectangle e8coinSpin = new Rectangle((e8coinFrame * 65) +
e8coinFrame, (e8coinType * 65) + e8coinType, 65, 65);
Vector2 e8sparklePos = new Vector2(e8X + 33, e8Y + 44);
Rectangle e8sparkleFrame = new Rectangle((e8sparkleFr * 65) +
e8sparkleFr, 0, 65, 100);
Vector2 e8smokePos = new Vector2(e8X, e8Y);
Rectangle e8showSmoke = new Rectangle((e8smokeFrame * 127) +
e8smokeFrame, 0, 127, 144);
Rectangle e8FreezeL = new Rectangle(e8X, e8Y + 5, 8, 144);
Rectangle e8FreezeTop = new Rectangle(e8X, e8Y + 20, 127, 15);
Rectangle e8FreezeR = new Rectangle(e8X + 119, e8Y + 5, 8, 144);
Rectangle e8coinhitbox = new Rectangle(e8X + 43, e8Y + 79, 55,
65);
if (e8HP > 0)
{
loadArcher.Draw(spriteBatch, e8framepos, e8FreezeColor,
opacity, e8invBlink, e8pos, 0, e8facing);
}
if (e8coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e8coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e8coinPos,
SpriteEffects.None, 0);
}
if (e8smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e8showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e8smokePos,
SpriteEffects.None, 0);
}
if (e8sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e8sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e8sparklePos,
SpriteEffects.None, 2);
}
Vector2 e8projAPos = new Vector2(e8projA_X, e8projA_Y);
Rectangle e8projAFrame = new Rectangle((e8projA_frame * 96) +
e8projA_frame, (e8projA_dir * 80) + e8projA_dir, 96, 80);
if (e8projectile == true)
{
loadArcher.Arrow(spriteBatch, e8projAFrame, opacity,
e8projAPos, -1);
}
Rectangle e8hitbox = new Rectangle(e8X + 45, e8Y + 20, 62, 124);
Rectangle e8projHitbox = new Rectangle(e8projA_X + e8projOrigX,
e8projA_Y + e8projOrigY, e8projWidth, e8projHeight);
#endregion
//Heavy XX
#region e9
Vector2 e9pos = new Vector2(e9X, e9Y);
Vector2 e9shadowPos = new Vector2(e9X - 12, e9Y);
Rectangle e9framepos = new Rectangle((e9frame * 127) + e9frame,
((e9act + e9facing) * 144) + (e9act + e9facing), 127, 144);
Vector2 e9coinPos = new Vector2(e9X + 33, e9Y + 79);
Rectangle e9coinSpin = new Rectangle((e9coinFrame * 65) +
e9coinFrame, (e9coinType * 65) + e9coinType, 65, 65);
Vector2 e9sparklePos = new Vector2(e9X + 33, e9Y + 44);
Rectangle e9sparkleFrame = new Rectangle((e9sparkleFr * 65) +
e9sparkleFr, 0, 65, 100);
Vector2 e9smokePos = new Vector2(e9X, e9Y);
Rectangle e9showSmoke = new Rectangle((e9smokeFrame * 127) +
e9smokeFrame, 0, 127, 144);
Rectangle e9hitbox = new Rectangle(e9X + 25, e9Y + 10, 87, 134);
Rectangle e9shieldboxL = new Rectangle(e9X - 7, e9Y + 10, 10,
134);
Rectangle e9shieldboxR = new Rectangle(e9X + 127, e9Y + 10, 10,
134);
Rectangle e9FreezeL = new Rectangle(e9X, e9Y + 5, 8, 144);
Rectangle e9FreezeTop = new Rectangle(e9X, e9Y + 20, 127, 15);
Rectangle e9FreezeR = new Rectangle(e9X + 119, e9Y + 5, 8, 144);
Rectangle e9coinhitbox = new Rectangle(e9X + 43, e9Y + 79, 55,
65);
if (e9HP > 0)
{
loadCD.Draw(spriteBatch, e9framepos, e9FreezeColor, opacity,
e9invBlink, e9pos, 0);
}
if (e9coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e9coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e9coinPos,
SpriteEffects.None, 0);
}
if (e9smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e9showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e9smokePos,
SpriteEffects.None, 0);
}
if (e9sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e9sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e9sparklePos,
SpriteEffects.None, 2);
}
if (e9plinkOn == true && e9plinkFr < 4)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65), new
Rectangle((e9plinkFr * 65) + e9plinkFr, 0, 65, 65), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(e9X + 31), -(e9Y + 40)), SpriteEffects.None, 2);
}
#endregion
//Squire
#region e10
Vector2 e10pos = new Vector2(e10X, e10Y);
Vector2 e10shadowPos = new Vector2(e10X - 10, e10Y);
Rectangle e10framepos = new Rectangle((e10frame * 127) +
e10frame, ((e10act + e10facing) * 144) + (e10act + e10facing), 127, 144);
Vector2 e10coinPos = new Vector2(e10X + 33, e10Y + 79);
Rectangle e10coinSpin = new Rectangle((e10coinFrame * 65) +
e10coinFrame, (e10coinType * 65) + e10coinType, 65, 65);
Vector2 e10sparklePos = new Vector2(e10X + 33, e10Y + 44);
Rectangle e10sparkleFrame = new Rectangle((e10sparkleFr * 65) +
e10sparkleFr, 0, 65, 100);
Vector2 e10smokePos = new Vector2(e10X, e10Y);
Rectangle e10showSmoke = new Rectangle((e10smokeFrame * 127) +
e10smokeFrame, 0, 127, 144);
Rectangle e10hitbox = new Rectangle(e10X + 15, e10Y + 10, 112,
134);
Rectangle e10FreezeL = new Rectangle(e10X, e10Y + 5, 8, 144);
Rectangle e10FreezeTop = new Rectangle(e10X, e10Y + 20, 127,
15);
Rectangle e10FreezeR = new Rectangle(e10X + 119, e10Y + 5, 8,
144);
Rectangle e10coinhitbox = new Rectangle(e10X + 43, e10Y + 79,
55, 65);
if (e10HP > 0)
{
loadSquire.Draw(spriteBatch, e10framepos, e10FreezeColor,
opacity, e10invBlink, e10pos, 0);
}
if (e10coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e10coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e10coinPos,
SpriteEffects.None, 0);
}
if (e10smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e10showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e10smokePos,
SpriteEffects.None, 0);
}
if (e10sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e10sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e10sparklePos,
SpriteEffects.None, 2);
}
#endregion
#region e11
Vector2 e11pos = new Vector2(e11X, e11Y);
Vector2 e11shadowPos = new Vector2(e11X - 10, e11Y);
Rectangle e11framepos = new Rectangle((e11frame * 127) +
e11frame, (e11act * 144) + e11act, 127, 144);
Vector2 e11coinPos = new Vector2(e11X + 33, e11Y + 79);
Rectangle e11coinSpin = new Rectangle((e11coinFrame * 65) +
e11coinFrame, (e11coinType * 65) + e11coinType, 65, 65);
Vector2 e11sparklePos = new Vector2(e11X + 33, e11Y + 44);
Rectangle e11sparkleFrame = new Rectangle((e11sparkleFr * 65) +
e11sparkleFr, 0, 65, 100);
Vector2 e11smokePos = new Vector2(e11X, e11Y);
Rectangle e11showSmoke = new Rectangle((e11smokeFrame * 127) +
e11smokeFrame, 0, 127, 144);
Rectangle e11FreezeL = new Rectangle(e11X, e11Y + 5, 8, 144);
Rectangle e11FreezeTop = new Rectangle(e11X, e11Y + 20, 127,
15);
Rectangle e11FreezeR = new Rectangle(e11X + 119, e11Y + 5, 8,
144);
Rectangle e11coinhitbox = new Rectangle(e11X + 43, e11Y + 79,
55, 65);
if (e11HP > 0)
{
loadArcher.Draw(spriteBatch, e11framepos, e11FreezeColor,
opacity, e11invBlink, e11pos, 0, e11facing);
}
if (e11coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e11coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e11coinPos,
SpriteEffects.None, 0);
}
if (e11smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e11showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e11smokePos,
SpriteEffects.None, 0);
}
if (e11sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e11sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e11sparklePos,
SpriteEffects.None, 2);
}
Vector2 e11projAPos = new Vector2(e11projA_X, e11projA_Y);
Rectangle e11projAFrame = new Rectangle((e11projA_frame * 96) +
e11projA_frame, (e11projA_dir * 80) + e11projA_dir, 96, 80);
if (e11projectile == true)
{
loadArcher.Arrow(spriteBatch, e11projAFrame, opacity,
e11projAPos, -1);
}
Rectangle e11hitbox = new Rectangle(e11X + 45, e11Y + 20, 62,
124);
Rectangle e11projHitbox = new Rectangle(e11projA_X +
e11projOrigX, e11projA_Y + e11projOrigY, e11projWidth, e11projHeight);
#endregion
#region e12
Vector2 e12pos = new Vector2(e12X, e12Y);
Vector2 e12shadowPos = new Vector2(e12X - 10, e12Y);
Rectangle e12framepos = new Rectangle((e12frame * 127) +
e12frame, (e12act * 144) + e12act, 127, 144);
Vector2 e12coinPos = new Vector2(e12X + 33, e12Y + 79);
Rectangle e12coinSpin = new Rectangle((e12coinFrame * 65) +
e12coinFrame, (e12coinType * 65) + e12coinType, 65, 65);
Vector2 e12sparklePos = new Vector2(e12X + 33, e12Y + 44);
Rectangle e12sparkleFrame = new Rectangle((e12sparkleFr * 65) +
e12sparkleFr, 0, 65, 100);
Vector2 e12smokePos = new Vector2(e12X, e12Y);
Rectangle e12showSmoke = new Rectangle((e12smokeFrame * 127) +
e12smokeFrame, 0, 127, 144);
Rectangle e12FreezeL = new Rectangle(e12X, e12Y + 5, 8, 144);
Rectangle e12FreezeTop = new Rectangle(e12X, e12Y + 20, 127,
15);
Rectangle e12FreezeR = new Rectangle(e12X + 119, e12Y + 5, 8,
144);
Rectangle e12coinhitbox = new Rectangle(e12X + 43, e12Y + 79,
55, 65);
if (e12HP > 0)
{
loadArcher.Draw(spriteBatch, e12framepos, e12FreezeColor,
opacity, e12invBlink, e12pos, 0, e12facing);
}
if (e12coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e12coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e12coinPos,
SpriteEffects.None, 0);
}
if (e12smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e12showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e12smokePos,
SpriteEffects.None, 0);
}
if (e12sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e12sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e12sparklePos,
SpriteEffects.None, 2);
}
Vector2 e12projAPos = new Vector2(e12projA_X, e12projA_Y);
Rectangle e12projAFrame = new Rectangle((e12projA_frame * 96) +
e12projA_frame, (e12projA_dir * 80) + e12projA_dir, 96, 80);
if (e12projectile == true)
{
loadArcher.Arrow(spriteBatch, e12projAFrame, opacity,
e12projAPos, -1);
}
Rectangle e12hitbox = new Rectangle(e12X + 45, e12Y + 20, 62,
124);
Rectangle e12projHitbox = new Rectangle(e12projA_X +
e12projOrigX, e12projA_Y + e12projOrigY, e12projWidth, e12projHeight);
#endregion
#region e13
Vector2 e13pos = new Vector2(e13X, e13Y);
Vector2 e13shadowPos = new Vector2(e13X - 10, e13Y);
Rectangle e13framepos = new Rectangle((e13frame * 127) +
e13frame, (e13act * 144) + e13act, 127, 144);
Vector2 e13coinPos = new Vector2(e13X + 33, e13Y + 79);
Rectangle e13coinSpin = new Rectangle((e13coinFrame * 65) +
e13coinFrame, (e13coinType * 65) + e13coinType, 65, 65);
Vector2 e13sparklePos = new Vector2(e13X + 33, e13Y + 44);
Rectangle e13sparkleFrame = new Rectangle((e13sparkleFr * 65) +
e13sparkleFr, 0, 65, 100);
Vector2 e13smokePos = new Vector2(e13X, e13Y);
Rectangle e13showSmoke = new Rectangle((e13smokeFrame * 127) +
e13smokeFrame, 0, 127, 144);
Rectangle e13FreezeL = new Rectangle(e13X, e13Y + 5, 8, 144);
Rectangle e13FreezeTop = new Rectangle(e13X, e13Y + 20, 127,
15);
Rectangle e13FreezeR = new Rectangle(e13X + 119, e13Y + 5, 8,
144);
Rectangle e13coinhitbox = new Rectangle(e13X + 43, e13Y + 79,
55, 65);
if (e13HP > 0)
{
loadArcher.Draw(spriteBatch, e13framepos, e13FreezeColor,
opacity, e13invBlink, e13pos, 0, e13facing);
}
if (e13coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e13coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e13coinPos,
SpriteEffects.None, 0);
}
if (e13smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e13showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e13smokePos,
SpriteEffects.None, 0);
}
if (e13sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e13sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e13sparklePos,
SpriteEffects.None, 2);
}
Vector2 e13projAPos = new Vector2(e13projA_X, e13projA_Y);
Rectangle e13projAFrame = new Rectangle((e13projA_frame * 96) +
e13projA_frame, (e13projA_dir * 80) + e13projA_dir, 96, 80);
if (e13projectile == true)
{
loadArcher.Arrow(spriteBatch, e13projAFrame, opacity,
e13projAPos, -1);
}
Rectangle e13hitbox = new Rectangle(e13X + 45, e13Y + 20, 62,
124);
Rectangle e13projHitbox = new Rectangle(e13projA_X +
e13projOrigX, e13projA_Y + e13projOrigY, e13projWidth, e13projHeight);
#endregion
#region e14
Vector2 e14pos = new Vector2(e14X, e14Y);
Vector2 e14shadowPos = new Vector2(e14X - 10, e14Y);
Rectangle e14framepos = new Rectangle((e14frame * 127) +
e14frame, (e14act * 144) + e14act, 127, 144);
Vector2 e14coinPos = new Vector2(e14X + 33, e14Y + 79);
Rectangle e14coinSpin = new Rectangle((e14coinFrame * 65) +
e14coinFrame, (e14coinType * 65) + e14coinType, 65, 65);
Vector2 e14sparklePos = new Vector2(e14X + 33, e14Y + 44);
Rectangle e14sparkleFrame = new Rectangle((e14sparkleFr * 65) +
e14sparkleFr, 0, 65, 100);
Vector2 e14smokePos = new Vector2(e14X, e14Y);
Rectangle e14showSmoke = new Rectangle((e14smokeFrame * 127) +
e14smokeFrame, 0, 127, 144);
Rectangle e14FreezeL = new Rectangle(e14X, e14Y + 5, 8, 144);
Rectangle e14FreezeTop = new Rectangle(e14X, e14Y + 20, 127,
15);
Rectangle e14FreezeR = new Rectangle(e14X + 119, e14Y + 5, 8,
144);
Rectangle e14coinhitbox = new Rectangle(e14X + 43, e14Y + 79,
55, 65);
if (e14HP > 0)
{
loadArcher.Draw(spriteBatch, e14framepos, e14FreezeColor,
opacity, e14invBlink, e14pos, 0, e14facing);
}
if (e14coins == true)
{
spriteBatch.Draw(coinSS, new Rectangle(0, 0, 65, 65),
e14coinSpin, new Color(opacity, opacity, opacity, 255), 0, -e14coinPos,
SpriteEffects.None, 0);
}
if (e14smoke == true)
{
spriteBatch.Draw(puffSS, new Rectangle(0, 0, 127, 144),
e14showSmoke, new Color(opacity, opacity, opacity, 255), 0, -e14smokePos,
SpriteEffects.None, 0);
}
if (e14sparkleOn == true)
{
spriteBatch.Draw(sparkleSS, new Rectangle(0, 0, 65, 100),
e14sparkleFrame, new Color(opacity, opacity, opacity, 255), 0, -e14sparklePos,
SpriteEffects.None, 2);
}
Vector2 e14projAPos = new Vector2(e14projA_X, e14projA_Y);
Rectangle e14projAFrame = new Rectangle((e14projA_frame * 96) +
e14projA_frame, (e14projA_dir * 80) + e14projA_dir, 96, 80);
if (e14projectile == true)
{
loadArcher.Arrow(spriteBatch, e14projAFrame, opacity,
e14projAPos, -1);
}
Rectangle e14hitbox = new Rectangle(e14X + 45, e14Y + 20, 62,
124);
Rectangle e14projHitbox = new Rectangle(e14projA_X +
e14projOrigX, e14projA_Y + e14projOrigY, e14projWidth, e14projHeight);
#endregion
#endregion
#region Draw NPC
npc1e3.DrawBoa(spriteBatch, npc1Frame, npc1Act, opacity);
npc1e3.DrawAdar(spriteBatch, npc2Frame, npc2Act, opacity);
npc1e3.DrawKaioni(spriteBatch, npc3Frame, npc3Act, opacity);
#endregion
#region Draw Event
Vector2 printTruck = new Vector2(truckX, 2763);
Rectangle showTruckFrame = new Rectangle((680 * truckAct) +
truckAct, (272 * truckFrame) + truckFrame, 680, 272);
Vector2 printSmog = new Vector2(6197, 2658);
Rectangle showSmogFrame = new Rectangle((250 * truckSmokeFrame)
+ truckSmokeFrame, 0, 250, 150);
Rectangle truckHitbox = new Rectangle(6142, 2918, 75, 75);
if (truckSpawn == true)
{
puzzleTruck.Draw(spriteBatch, showTruckFrame, opacity,
printTruck, 2, puzzle1Opacity);
if (BreathHitbox.Intersects(truckHitbox) && drgnFire ==
true)
{
if (breathType == 1)
{
truckCharge++;
}
else if (breathType != 1 && truckCharge < 60)
{
if (e1plinkOn == false)
{
if (plinkPlay == false)
{
plinkPlay = true;
}
e1plinkOn = true;
}
if (truckCharge < 60)
{
truckCharge = 0;
}
}
}
else
{
if (truckCharge < 60)
{
truckCharge = 0;
}
}
}
if (e1plinkOn == true)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65), new
Rectangle((e1plinkFr * 65) + e1plinkFr, 0, 65, 65), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-6152, -2928), SpriteEffects.None, 3);
}
#endregion
#region Draw Campfire
Vector2 campfirePos = new Vector2(11907, 4590);
Rectangle campfireFrame = new Rectangle((fireFrame * 127) +
fireFrame, 0, 127, 72);
Vector2 smokePos = new Vector2(11862, 4370); //(-45, -220)
Rectangle smokeFr = new Rectangle((smokeFrame * 285) +
smokeFrame, 0, 285, 245);
spriteBatch.Draw(campfireSS, new Rectangle(0, 0, 127, 72),
campfireFrame, new Color(opacity, opacity, opacity, 255), 0, -campfirePos,
SpriteEffects.None, 0);
spriteBatch.Draw(smokeSS, new Rectangle(0, 0, 285, 245),
smokeFr, new Color(opacity, opacity, opacity, 255), 0, -smokePos,
SpriteEffects.None, -1);
#endregion
#region Exit Area
if (drgnhitboxHead.Intersects(exitArea))
{
if (on1eB == false)
{
on1eB = true;
}
endOfStage = true;
}
if (drgnhitboxHead.Intersects(pitfall1))
{
drgnHPNow = 0;
}
#endregion
#region Treasure Hitboxes
if (have07Momiji == false)
{
if (drgnhitboxHead.Intersects(treasure7Hitbox) ||
drgnhitbox.Intersects(treasure7Hitbox))
{
have07Momiji = true;
pickUp7 = true;
if (treasurePickUp == false)
{
treasureWindowFrame = 0;
treasureWindowCT = 0;
treasurePickUp = true;
treasureWindowUp = true;
}
}
}
if (have08Ninjato == false)
{
if (drgnhitboxHead.Intersects(treasure8Hitbox) ||
drgnhitbox.Intersects(treasure8Hitbox))
{
have08Ninjato = true;
pickUp8 = true;
if (treasurePickUp == false)
{
treasureWindowFrame = 0;
treasureWindowCT = 0;
treasurePickUp = true;
treasureWindowUp = true;
}
}
}
#endregion
#region Enemy Hitboxes
//Puzzle Squire
#region e1
if (e1spawn == true)
{
if (e1frozen == true && e1HP > 0)
{
if (drgnpipDL.Intersects(e1FreezeR) ||
drgnpipCL.Intersects(e1FreezeR) || drgnpipUL.Intersects(e1FreezeR))
{
touchLe1 = true;
}
else
{
touchLe1 = false;
}
if (drgnpipDR.Intersects(e1FreezeL) ||
drgnpipCR.Intersects(e1FreezeL) || drgnpipUR.Intersects(e1FreezeL))
{
touchRe1 = true;
}
else
{
touchRe1 = false;
}
if (e1frozen == true && e1HP > 0 &&
(drgnpipDL.Intersects(e1FreezeTop) || drgnpipDC.Intersects(e1FreezeTop) ||
drgnpipDR.Intersects(e1FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e1Y + 20 - 143;
e1stand = true;
}
else
{
e1stand = false;
}
}
if (drgnInvulnerable == false && e1HP > 0 &&
(drgnhitboxHead.Intersects(e1hitbox) || (drgnhitbox.Intersects(e1hitbox))) &&
e1peaceful == false && e1frozen == false)
{
damageCheck = e1Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e1coins == true && (drgnhitboxHead.Intersects
(e1coinhitbox) || (drgnhitbox.Intersects(e1coinhitbox))))
{
e1coins = false;
e1coinTouch = true;
}
if (e1hitbox.Intersects(ClawHitbox) && e1HP > 0 &&
e1invulnerable == false && usingClaw == true && e1peaceful == false && e1frozen ==
false)
{
e1clawhit = true;
}
if (e1hitbox.Intersects(BreathHitbox) && e1HP > 0 &&
e1invulnerable == false && drgnFire == true && e1peaceful == false && e1frozen ==
false)
{
e1breathhit = true;
}
}
#endregion
//Archer (Defended R)
#region e2
if (e2spawn == true)
{
if (e2frozen == true && e2HP > 0)
{
if (drgnpipDL.Intersects(e2FreezeR) ||
drgnpipCL.Intersects(e2FreezeR) || drgnpipUL.Intersects(e2FreezeR))
{
touchLe2 = true;
}
else
{
touchLe2 = false;
}
if (drgnpipDR.Intersects(e2FreezeL) ||
drgnpipCR.Intersects(e2FreezeL) || drgnpipUR.Intersects(e2FreezeL))
{
touchRe2 = true;
}
else
{
touchRe2 = false;
}
if (e2frozen == true && e2HP > 0 &&
(drgnpipDL.Intersects(e2FreezeTop) || drgnpipDC.Intersects(e2FreezeTop) ||
drgnpipDR.Intersects(e2FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e2Y + 20 - 143;
e2stand = true;
}
else
{
e2stand = false;
}
}
if (drgnInvulnerable == false && e2HP > 0 &&
(drgnhitboxHead.Intersects(e2hitbox) || (drgnhitbox.Intersects(e2hitbox))) &&
e2peaceful == false && e2frozen == false)
{
damageCheck = e2Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e2coins == true && (drgnhitboxHead.Intersects
(e2coinhitbox) || (drgnhitbox.Intersects(e2coinhitbox))))
{
e2coins = false;
e2coinTouch = true;
}
if (e3spawn == true && drgnX >= e3X + 50 && e3peaceful ==
false)
{
}
else
{
if (e2hitbox.Intersects(ClawHitbox) && e2HP > 0 &&
e2invulnerable == false && usingClaw == true && e2peaceful == false && e2frozen ==
false)
{
e2clawhit = true;
}
if (e2hitbox.Intersects(BreathHitbox) && e2HP > 0 &&
e2invulnerable == false && drgnFire == true && e2peaceful == false && e2frozen ==
false)
{
if (breathType == 0 && e2burn == false)
{
e2burn = true;
e2burnTimer = 0;
e2burnCT = 0;
e2burnFrame = 0;
}
e2breathhit = true;
}
}
}
if (e2projectile == true)
{
if (drgnInvulnerable == false && (drgnhitboxHead.Intersects
(e2projHitbox) || (drgnhitbox.Intersects(e2projHitbox))))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
//Heavy XX
#region e3
if (e3spawn == true)
{
if (e3frozen == true && e3HP > 0)
{
if (drgnpipDL.Intersects(e3FreezeR) ||
drgnpipCL.Intersects(e3FreezeR) || drgnpipUL.Intersects(e3FreezeR))
{
touchLe3 = true;
}
else
{
touchLe3 = false;
}
if (drgnpipDR.Intersects(e3FreezeL) ||
drgnpipCR.Intersects(e3FreezeL) || drgnpipUR.Intersects(e3FreezeL))
{
touchRe3 = true;
}
else
{
touchRe3 = false;
}
if (e3frozen == true && e3HP > 0 &&
(drgnpipDL.Intersects(e3FreezeTop) || drgnpipDC.Intersects(e3FreezeTop) ||
drgnpipDR.Intersects(e3FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e3Y + 20 - 143;
e3stand = true;
}
else
{
e3stand = false;
}
}
if (e3peaceful == false)
{
if (drgnpipDL.Intersects(e3shieldboxR) ||
drgnpipCL.Intersects(e3shieldboxR) || drgnpipUL.Intersects(e3shieldboxR))
{
touchLe3 = true;
}
else
{
touchLe3 = false;
}
if (drgnpipDR.Intersects(e3shieldboxL) ||
drgnpipCR.Intersects(e3shieldboxL) || drgnpipUR.Intersects(e3shieldboxL))
{
touchRe3 = true;
}
else
{
touchRe3 = false;
}
}
else
{
touchLe3 = false;
touchRe3 = false;
}
if (drgnInvulnerable == false && e3HP > 0 &&
(drgnhitboxHead.Intersects(e3hitbox) || (drgnhitbox.Intersects(e3hitbox))) &&
e3peaceful == false && e3frozen == false)
{
damageCheck = e3Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e3coins == true && (drgnhitboxHead.Intersects
(e3coinhitbox) || (drgnhitbox.Intersects(e3coinhitbox))))
{
e3coins = false;
e3coinTouch = true;
}
if (e3hitbox.Intersects(ClawHitbox) && e3HP > 0 &&
e3invulnerable == false && usingClaw == true && e3peaceful == false && e3frozen ==
false)
{
e3clawhit = true;
}
if (e3hitbox.Intersects(BreathHitbox) && e3HP > 0 &&
e3invulnerable == false && drgnFire == true && e3peaceful == false && e3frozen ==
false)
{
e3breathhit = true;
}
}
if (e3HP <= 0)
{
touchLe3 = false;
touchRe3 = false;
}
#endregion
//Squire
#region e4
if (e4spawn == true)
{
if (e4frozen == true && e4HP > 0)
{
if (drgnpipDL.Intersects(e4FreezeR) ||
drgnpipCL.Intersects(e4FreezeR) || drgnpipUL.Intersects(e4FreezeR))
{
touchLe4 = true;
}
else
{
touchLe4 = false;
}
if (drgnpipDR.Intersects(e4FreezeL) ||
drgnpipCR.Intersects(e4FreezeL) || drgnpipUR.Intersects(e4FreezeL))
{
touchRe4 = true;
}
else
{
touchRe4 = false;
}
if (e4frozen == true && e4HP > 0 &&
(drgnpipDL.Intersects(e4FreezeTop) || drgnpipDC.Intersects(e4FreezeTop) ||
drgnpipDR.Intersects(e4FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e4Y + 20 - 143;
e4stand = true;
}
else
{
e4stand = false;
}
}
if (drgnInvulnerable == false && e4HP > 0 &&
(drgnhitboxHead.Intersects(e4hitbox) || (drgnhitbox.Intersects(e4hitbox))) &&
e4peaceful == false && e4frozen == false)
{
damageCheck = e4Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e4coins == true && (drgnhitboxHead.Intersects
(e4coinhitbox) || (drgnhitbox.Intersects(e4coinhitbox))))
{
e4coins = false;
e4coinTouch = true;
}
if (e4hitbox.Intersects(ClawHitbox) && e4HP > 0 &&
e4invulnerable == false && usingClaw == true && e4peaceful == false && e4frozen ==
false)
{
e4clawhit = true;
}
if (e4hitbox.Intersects(BreathHitbox) && e4HP > 0 &&
e4invulnerable == false && drgnFire == true && e4peaceful == false && e4frozen ==
false)
{
e4breathhit = true;
}
}
#endregion
//Archer
#region e5
if (e5spawn == true)
{
if (e5frozen == true && e5HP > 0)
{
if (drgnpipDL.Intersects(e5FreezeR) ||
drgnpipCL.Intersects(e5FreezeR) || drgnpipUL.Intersects(e5FreezeR))
{
touchLe5 = true;
}
else
{
touchLe5 = false;
}
if (drgnpipDR.Intersects(e5FreezeL) ||
drgnpipCR.Intersects(e5FreezeL) || drgnpipUR.Intersects(e5FreezeL))
{
touchRe5 = true;
}
else
{
touchRe5 = false;
}
if (e5frozen == true && e5HP > 0 &&
(drgnpipDL.Intersects(e5FreezeTop) || drgnpipDC.Intersects(e5FreezeTop) ||
drgnpipDR.Intersects(e5FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e5Y + 20 - 143;
e5stand = true;
}
else
{
e5stand = false;
}
}
if (drgnInvulnerable == false && e5HP > 0 &&
(drgnhitboxHead.Intersects(e5hitbox) || (drgnhitbox.Intersects(e5hitbox))) &&
e5peaceful == false && e5frozen == false)
{
damageCheck = e5Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e5coins == true && (drgnhitboxHead.Intersects
(e5coinhitbox) || (drgnhitbox.Intersects(e5coinhitbox))))
{
e5coins = false;
e5coinTouch = true;
}
if (e5hitbox.Intersects(ClawHitbox) && e5HP > 0 &&
e5invulnerable == false && usingClaw == true && e5peaceful == false && e5frozen ==
false)
{
e5clawhit = true;
}
if (e5hitbox.Intersects(BreathHitbox) && e5HP > 0 &&
e5invulnerable == false && drgnFire == true && e5peaceful == false && e5frozen ==
false)
{
if (breathType == 0 && e5burn == false)
{
e5burn = true;
e5burnTimer = 0;
e5burnCT = 0;
e5burnFrame = 0;
}
e5breathhit = true;
}
}
if (e5projectile == true)
{
if (drgnInvulnerable == false && (drgnhitboxHead.Intersects
(e5projHitbox) || (drgnhitbox.Intersects(e5projHitbox))))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
//Archer
#region e6
if (e6spawn == true)
{
if (e6frozen == true && e6HP > 0)
{
if (drgnpipDL.Intersects(e6FreezeR) ||
drgnpipCL.Intersects(e6FreezeR) || drgnpipUL.Intersects(e6FreezeR))
{
touchLe6 = true;
}
else
{
touchLe6 = false;
}
if (drgnpipDR.Intersects(e6FreezeL) ||
drgnpipCR.Intersects(e6FreezeL) || drgnpipUR.Intersects(e6FreezeL))
{
touchRe6 = true;
}
else
{
touchRe6 = false;
}
if (e6frozen == true && e6HP > 0 &&
(drgnpipDL.Intersects(e6FreezeTop) || drgnpipDC.Intersects(e6FreezeTop) ||
drgnpipDR.Intersects(e6FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e6Y + 20 - 143;
e6stand = true;
}
else
{
e6stand = false;
}
}
if (drgnInvulnerable == false && e6HP > 0 &&
(drgnhitboxHead.Intersects(e6hitbox) || (drgnhitbox.Intersects(e6hitbox))) &&
e6peaceful == false && e6frozen == false)
{
damageCheck = e6Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e6coins == true && (drgnhitboxHead.Intersects
(e6coinhitbox) || (drgnhitbox.Intersects(e6coinhitbox))))
{
e6coins = false;
e6coinTouch = true;
}
if (e6hitbox.Intersects(ClawHitbox) && e6HP > 0 &&
e6invulnerable == false && usingClaw == true && e6peaceful == false && e6frozen ==
false)
{
e6clawhit = true;
}
if (e6hitbox.Intersects(BreathHitbox) && e6HP > 0 &&
e6invulnerable == false && drgnFire == true && e6peaceful == false && e6frozen ==
false)
{
if (breathType == 0 && e6burn == false)
{
e6burn = true;
e6burnTimer = 0;
e6burnCT = 0;
e6burnFrame = 0;
}
e6breathhit = true;
}
}
if (e6projectile == true)
{
if (drgnInvulnerable == false && (drgnhitboxHead.Intersects
(e6projHitbox) || (drgnhitbox.Intersects(e6projHitbox))))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
//Archer (Defended L)
#region e7
if (e7spawn == true)
{
if (e7frozen == true && e7HP > 0)
{
if (drgnpipDL.Intersects(e7FreezeR) ||
drgnpipCL.Intersects(e7FreezeR) || drgnpipUL.Intersects(e7FreezeR))
{
touchLe7 = true;
}
else
{
touchLe7 = false;
}
if (drgnpipDR.Intersects(e7FreezeL) ||
drgnpipCR.Intersects(e7FreezeL) || drgnpipUR.Intersects(e7FreezeL))
{
touchRe7 = true;
}
else
{
touchRe7 = false;
}
if (e7frozen == true && e7HP > 0 &&
(drgnpipDL.Intersects(e7FreezeTop) || drgnpipDC.Intersects(e7FreezeTop) ||
drgnpipDR.Intersects(e7FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e7Y + 20 - 143;
e7stand = true;
}
else
{
e7stand = false;
}
}
if (drgnInvulnerable == false && e7HP > 0 &&
(drgnhitboxHead.Intersects(e7hitbox) || (drgnhitbox.Intersects(e7hitbox))) &&
e7peaceful == false && e7frozen == false)
{
damageCheck = e7Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e7coins == true && (drgnhitboxHead.Intersects
(e7coinhitbox) || (drgnhitbox.Intersects(e7coinhitbox))))
{
e7coins = false;
e7coinTouch = true;
}
if (e7hitbox.Intersects(ClawHitbox) && e7HP > 0 &&
e7invulnerable == false && usingClaw == true && e7peaceful == false && e7frozen ==
false)
{
e7clawhit = true;
}
if (e7hitbox.Intersects(BreathHitbox) && e7HP > 0 &&
e7invulnerable == false && drgnFire == true && e7peaceful == false && e7frozen ==
false)
{
if (breathType == 0 && e7burn == false)
{
e7burn = true;
e7burnTimer = 0;
e7burnCT = 0;
e7burnFrame = 0;
}
e7breathhit = true;
}
}
if (e7projectile == true)
{
if (drgnInvulnerable == false && (drgnhitboxHead.Intersects
(e7projHitbox) || (drgnhitbox.Intersects(e7projHitbox))))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
//Archer
#region e8
if (e8spawn == true)
{
if (e8frozen == true && e8HP > 0)
{
if (drgnpipDL.Intersects(e8FreezeR) ||
drgnpipCL.Intersects(e8FreezeR) || drgnpipUL.Intersects(e8FreezeR))
{
touchLe8 = true;
}
else
{
touchLe8 = false;
}
if (drgnpipDR.Intersects(e8FreezeL) ||
drgnpipCR.Intersects(e8FreezeL) || drgnpipUR.Intersects(e8FreezeL))
{
touchRe8 = true;
}
else
{
touchRe8 = false;
}
if (e8frozen == true && e8HP > 0 &&
(drgnpipDL.Intersects(e8FreezeTop) || drgnpipDC.Intersects(e8FreezeTop) ||
drgnpipDR.Intersects(e8FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e8Y + 20 - 143;
e8stand = true;
}
else
{
e8stand = false;
}
}
if (drgnInvulnerable == false && e8HP > 0 &&
(drgnhitboxHead.Intersects(e8hitbox) || drgnhitbox.Intersects(e8hitbox)) &&
e8peaceful == false && e8frozen == false)
{
damageCheck = e8Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e8coins == true && (drgnhitboxHead.Intersects
(e8coinhitbox) || (drgnhitbox.Intersects(e8coinhitbox))))
{
e8coins = false;
e8coinTouch = true;
}
if (e9spawn == true && drgnX < e9X - 30 && e9peaceful ==
false)
{
}
else
{
if (e8hitbox.Intersects(ClawHitbox) && e8HP > 0 &&
e8invulnerable == false && usingClaw == true && e8peaceful == false && e8frozen ==
false)
{
e8clawhit = true;
}
if (e8hitbox.Intersects(BreathHitbox) && e8HP > 0 &&
e8invulnerable == false && drgnFire == true && e8peaceful == false && e8frozen ==
false)
{
if (breathType == 0 && e8burn == false)
{
e8burn = true;
e8burnTimer = 0;
e8burnCT = 0;
e8burnFrame = 0;
}
e8breathhit = true;
}
}
}
if (e8projectile == true)
{
if (drgnInvulnerable == false && (drgnhitboxHead.Intersects
(e8projHitbox) || (drgnhitbox.Intersects(e8projHitbox))))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
//Heavy XX
#region e9
if (e9spawn == true)
{
if (e9frozen == true && e9HP > 0)
{
if (drgnpipDL.Intersects(e9FreezeR) ||
drgnpipCL.Intersects(e9FreezeR) || drgnpipUL.Intersects(e9FreezeR))
{
touchLe9 = true;
}
else
{
touchLe9 = false;
}
if (drgnpipDR.Intersects(e9FreezeL) ||
drgnpipCR.Intersects(e9FreezeL) || drgnpipUR.Intersects(e9FreezeL))
{
touchRe9 = true;
}
else
{
touchRe9 = false;
}
if (e9frozen == true && e9HP > 0 &&
(drgnpipDL.Intersects(e9FreezeTop) || drgnpipDC.Intersects(e9FreezeTop) ||
drgnpipDR.Intersects(e9FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e9Y + 20 - 143;
e9stand = true;
}
else
{
e9stand = false;
}
}
if (e9peaceful == false)
{
if (drgnpipDL.Intersects(e9shieldboxR) ||
drgnpipCL.Intersects(e9shieldboxR) || drgnpipUL.Intersects(e9shieldboxR))
{
touchLe9 = true;
}
else
{
touchLe9 = false;
}
if (drgnpipDR.Intersects(e9shieldboxL) ||
drgnpipCR.Intersects(e9shieldboxL) || drgnpipUR.Intersects(e9shieldboxL))
{
touchRe9 = true;
}
else
{
touchRe9 = false;
}
}
else
{
touchLe9 = false;
touchRe9 = false;
}
if (drgnInvulnerable == false && e9HP > 0 &&
(drgnhitboxHead.Intersects(e9hitbox) || (drgnhitbox.Intersects(e9hitbox))) &&
e9peaceful == false && e9frozen == false)
{
damageCheck = e9Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e9coins == true && (drgnhitboxHead.Intersects
(e9coinhitbox) || (drgnhitbox.Intersects(e9coinhitbox))))
{
e9coins = false;
e9coinTouch = true;
}
if (e9hitbox.Intersects(ClawHitbox) && e9HP > 0 &&
e9invulnerable == false && usingClaw == true && e9peaceful == false && e9frozen ==
false)
{
e9clawhit = true;
}
if (e9hitbox.Intersects(BreathHitbox) && e9HP > 0 &&
e9invulnerable == false && drgnFire == true && e9peaceful == false && e9frozen ==
false)
{
e9breathhit = true;
}
}
if (e9HP <= 0)
{
touchLe9 = false;
touchRe9 = false;
}
#endregion
//Squire
#region e10
if (e10spawn == true)
{
if (e10frozen == true && e10HP > 0)
{
if (drgnpipDL.Intersects(e10FreezeR) ||
drgnpipCL.Intersects(e10FreezeR) || drgnpipUL.Intersects(e10FreezeR))
{
touchLe10 = true;
}
else
{
touchLe10 = false;
}
if (drgnpipDR.Intersects(e10FreezeL) ||
drgnpipCR.Intersects(e10FreezeL) || drgnpipUR.Intersects(e10FreezeL))
{
touchRe10 = true;
}
else
{
touchRe10 = false;
}
if (e10frozen == true && e10HP > 0 &&
(drgnpipDL.Intersects(e10FreezeTop) || drgnpipDC.Intersects(e10FreezeTop) ||
drgnpipDR.Intersects(e10FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e10Y + 20 - 143;
e10stand = true;
}
else
{
e10stand = false;
}
}
if (drgnInvulnerable == false && e10HP > 0 &&
(drgnhitboxHead.Intersects(e10hitbox) || (drgnhitbox.Intersects(e10hitbox))) &&
e10peaceful == false && e10frozen == false)
{
damageCheck = e10Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e10coins == true && (drgnhitboxHead.Intersects
(e10coinhitbox) || (drgnhitbox.Intersects(e10coinhitbox))))
{
e10coins = false;
e10coinTouch = true;
}
if (e10hitbox.Intersects(ClawHitbox) && e10HP > 0 &&
e10invulnerable == false && usingClaw == true && e10peaceful == false && e10frozen
== false)
{
e10clawhit = true;
}
if (e10hitbox.Intersects(BreathHitbox) && e10HP > 0 &&
e10invulnerable == false && drgnFire == true && e10peaceful == false && e10frozen ==
false)
{
e10breathhit = true;
}
}
#endregion
//Archers
#region e11
if (e11spawn == true)
{
if (e11frozen == true && e11HP > 0)
{
if (drgnpipDL.Intersects(e11FreezeR) ||
drgnpipCL.Intersects(e11FreezeR) || drgnpipUL.Intersects(e11FreezeR))
{
touchLe11 = true;
}
else
{
touchLe11 = false;
}
if (drgnpipDR.Intersects(e11FreezeL) ||
drgnpipCR.Intersects(e11FreezeL) || drgnpipUR.Intersects(e11FreezeL))
{
touchRe11 = true;
}
else
{
touchRe11 = false;
}
if (e11frozen == true && e11HP > 0 &&
(drgnpipDL.Intersects(e11FreezeTop) || drgnpipDC.Intersects(e11FreezeTop) ||
drgnpipDR.Intersects(e11FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e11Y + 20 - 143;
e11stand = true;
}
else
{
e11stand = false;
}
}
if (drgnInvulnerable == false && e11HP > 0 &&
(drgnhitboxHead.Intersects(e11hitbox) || (drgnhitbox.Intersects(e11hitbox))) &&
e11peaceful == false && e11frozen == false)
{
damageCheck = e11Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e11coins == true && (drgnhitboxHead.Intersects
(e11coinhitbox) || (drgnhitbox.Intersects(e11coinhitbox))))
{
e11coins = false;
e11coinTouch = true;
}
if (e11hitbox.Intersects(ClawHitbox) && e11HP > 0 &&
e11invulnerable == false && usingClaw == true && e11peaceful == false && e11frozen
== false)
{
e11clawhit = true;
}
if (e11hitbox.Intersects(BreathHitbox) && e11HP > 0 &&
e11invulnerable == false && drgnFire == true && e11peaceful == false && e11frozen ==
false)
{
if (breathType == 0 && e11burn == false)
{
e11burn = true;
e11burnTimer = 0;
e11burnCT = 0;
e11burnFrame = 0;
}
e11breathhit = true;
}
}
if (e11projectile == true)
{
if (drgnInvulnerable == false && (drgnhitboxHead.Intersects
(e11projHitbox) || (drgnhitbox.Intersects(e11projHitbox))))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
#region e12
if (e12spawn == true)
{
if (e12frozen == true && e12HP > 0)
{
if (drgnpipDL.Intersects(e12FreezeR) ||
drgnpipCL.Intersects(e12FreezeR) || drgnpipUL.Intersects(e12FreezeR))
{
touchLe12 = true;
}
else
{
touchLe12 = false;
}
if (drgnpipDR.Intersects(e12FreezeL) ||
drgnpipCR.Intersects(e12FreezeL) || drgnpipUR.Intersects(e12FreezeL))
{
touchRe12 = true;
}
else
{
touchRe12 = false;
}
if (e12frozen == true && e12HP > 0 &&
(drgnpipDL.Intersects(e12FreezeTop) || drgnpipDC.Intersects(e12FreezeTop) ||
drgnpipDR.Intersects(e12FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e12Y + 20 - 143;
e12stand = true;
}
else
{
e12stand = false;
}
}
if (drgnInvulnerable == false && e12HP > 0 &&
(drgnhitboxHead.Intersects(e12hitbox) || (drgnhitbox.Intersects(e12hitbox))) &&
e12peaceful == false && e12frozen == false)
{
damageCheck = e12Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e12coins == true && (drgnhitboxHead.Intersects
(e12coinhitbox) || (drgnhitbox.Intersects(e12coinhitbox))))
{
e12coins = false;
e12coinTouch = true;
}
if (e12hitbox.Intersects(ClawHitbox) && e12HP > 0 &&
e12invulnerable == false && usingClaw == true && e12peaceful == false && e12frozen
== false)
{
e12clawhit = true;
}
if (e12hitbox.Intersects(BreathHitbox) && e12HP > 0 &&
e12invulnerable == false && drgnFire == true && e12peaceful == false && e12frozen ==
false)
{
if (breathType == 0 && e12burn == false)
{
e12burn = true;
e12burnTimer = 0;
e12burnCT = 0;
e12burnFrame = 0;
}
e12breathhit = true;
}
}
if (e12projectile == true)
{
if (drgnInvulnerable == false && (drgnhitboxHead.Intersects
(e12projHitbox) || (drgnhitbox.Intersects(e12projHitbox))))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
#region e13
if (e13spawn == true)
{
if (e13frozen == true && e13HP > 0)
{
if (drgnpipDL.Intersects(e13FreezeR) ||
drgnpipCL.Intersects(e13FreezeR) || drgnpipUL.Intersects(e13FreezeR))
{
touchLe13 = true;
}
else
{
touchLe13 = false;
}
if (drgnpipDR.Intersects(e13FreezeL) ||
drgnpipCR.Intersects(e13FreezeL) || drgnpipUR.Intersects(e13FreezeL))
{
touchRe13 = true;
}
else
{
touchRe13 = false;
}
if (e13frozen == true && e13HP > 0 &&
(drgnpipDL.Intersects(e13FreezeTop) || drgnpipDC.Intersects(e13FreezeTop) ||
drgnpipDR.Intersects(e13FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e13Y + 20 - 143;
e13stand = true;
}
else
{
e13stand = false;
}
}
if (drgnInvulnerable == false && e13HP > 0 &&
(drgnhitboxHead.Intersects(e13hitbox) || (drgnhitbox.Intersects(e13hitbox))) &&
e13peaceful == false && e13frozen == false)
{
damageCheck = e13Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e13coins == true && (drgnhitboxHead.Intersects
(e13coinhitbox) || (drgnhitbox.Intersects(e13coinhitbox))))
{
e13coins = false;
e13coinTouch = true;
}
if (e13hitbox.Intersects(ClawHitbox) && e13HP > 0 &&
e13invulnerable == false && usingClaw == true && e13peaceful == false && e13frozen
== false)
{
e13clawhit = true;
}
if (e13hitbox.Intersects(BreathHitbox) && e13HP > 0 &&
e13invulnerable == false && drgnFire == true && e13peaceful == false && e13frozen ==
false)
{
if (breathType == 0 && e13burn == false)
{
e13burn = true;
e13burnTimer = 0;
e13burnCT = 0;
e13burnFrame = 0;
}
e13breathhit = true;
}
}
if (e13projectile == true)
{
if (drgnInvulnerable == false && (drgnhitboxHead.Intersects
(e13projHitbox) || (drgnhitbox.Intersects(e13projHitbox))))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
#region e14
if (e14spawn == true)
{
if (e14frozen == true && e14HP > 0)
{
if (drgnpipDL.Intersects(e14FreezeR) ||
drgnpipCL.Intersects(e14FreezeR) || drgnpipUL.Intersects(e14FreezeR))
{
touchLe14 = true;
}
else
{
touchLe14 = false;
}
if (drgnpipDR.Intersects(e14FreezeL) ||
drgnpipCR.Intersects(e14FreezeL) || drgnpipUR.Intersects(e14FreezeL))
{
touchRe14 = true;
}
else
{
touchRe14 = false;
}
if (e14frozen == true && e14HP > 0 &&
(drgnpipDL.Intersects(e14FreezeTop) || drgnpipDC.Intersects(e14FreezeTop) ||
drgnpipDR.Intersects(e14FreezeTop)) && drgnYvel >= 0)
{
drgnYvel = 0;
drgnOnGround = true;
drgnY = e14Y + 20 - 143;
e14stand = true;
}
else
{
e14stand = false;
}
}
if (drgnInvulnerable == false && e14HP > 0 &&
(drgnhitboxHead.Intersects(e14hitbox) || (drgnhitbox.Intersects(e14hitbox))) &&
e14peaceful == false && e14frozen == false)
{
damageCheck = e14Attack;
drgnHit = true; drgnInvulnerable = true;
}
if (e14coins == true && (drgnhitboxHead.Intersects
(e14coinhitbox) || (drgnhitbox.Intersects(e14coinhitbox))))
{
e14coins = false;
e14coinTouch = true;
}
if (e14hitbox.Intersects(ClawHitbox) && e14HP > 0 &&
e14invulnerable == false && usingClaw == true && e14peaceful == false && e14frozen
== false)
{
e14clawhit = true;
}
if (e14hitbox.Intersects(BreathHitbox) && e14HP > 0 &&
e14invulnerable == false && drgnFire == true && e14peaceful == false && e14frozen ==
false)
{
if (breathType == 0 && e14burn == false)
{
e14burn = true;
e14burnTimer = 0;
e14burnCT = 0;
e14burnFrame = 0;
}
e14breathhit = true;
}
}
if (e14projectile == true)
{
if (drgnInvulnerable == false && (drgnhitboxHead.Intersects
(e14projHitbox) || (drgnhitbox.Intersects(e14projHitbox))))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
#endregion
#endregion
}
#endregion
//END STAGE 1-3 DRAW
//STAGE 1-B DRAW
#region Stage 1-B Draw
if (stage1eB == true)
{
#region Draw Stage
drawStages.Draw(spriteBatch, opacity, (-240 + drgnCamX -
(drgnCamX / 50)), (-300 + drgnCamY - (drgnCamY / 100)), 989, dragonLookY, mogLookX,
602, 50, ninjaLookY, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
drawSky.DrawSkyA(spriteBatch, drgnCamX, -300 + drgnCamY -
(drgnCamY / 100), opacity);
#endregion
#region Draw Boss
Vector2 drawBoss1 = new Vector2(boss1X, boss1Y);
Rectangle boss1Hitbox = new Rectangle(boss1X + 10, boss1Y + 30,
107, 110);
loadBoss1.Draw(spriteBatch, new Rectangle((boss1Frame * 127) +
boss1Frame, ((boss1Act) * 144) + boss1Act, 127, 144), boss1Opacity, boss1invBlink,
new Vector2(boss1X, boss1Y), 2, boss1Facing);
if (e1plinkOn == true && e1plinkFr < 4)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65), new
Rectangle((e1plinkFr * 65) + e1plinkFr, 0, 65, 65), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(boss1X + 31), -(boss1Y + 40)), SpriteEffects.None,
2);
}
if (boss1Act == 12 && boss1HP >= 15)
{
if (boss1FaceL == true)
{
spriteBatch.Draw(hintBubble, new Rectangle(0, 0, 150,
135), new Rectangle(0, 0, 150, 135), new Color(opacity, opacity, opacity, 255), 0,
new Vector2(-(boss1X - 68), -(boss1Y - 118)), SpriteEffects.None, -0.1f);
}
else
{
spriteBatch.Draw(hintBubble, new Rectangle(0, 0, 150,
135), new Rectangle(0, 136, 150, 135), new Color(opacity, opacity, opacity, 255), 0,
new Vector2(-(boss1X + 88), -(boss1Y - 118)), SpriteEffects.None, -0.1f);
}
}
#region Draw Thunderbolt
Rectangle boltUpHitbox = new Rectangle(boltUpX + 15, boltUpY +
25, 366, 96);
Rectangle boltDnHitbox = new Rectangle(boltDnX + 15, boltDnY +
25, 366, 96);
if (boltUp == true)
{
loadBoss1.Bolt(spriteBatch, new Rectangle((boss1AttackFrame
* 396) + boss1AttackFrame, 0, 396, 146), opacity, new Vector2(boltUpX, boltUpY), 1);
}
if (boltDn == true)
{
loadBoss1.Bolt(spriteBatch, new Rectangle((boss1AttackFrame
* 396) + boss1AttackFrame, 0, 396, 146), opacity, new Vector2(boltDnX, boltDnY), 1);
}
#endregion
#region Draw Thundercloud
Rectangle cloud1HitboxA = new Rectangle(cloud1X + 20, cloudY +
10, 25, 49);
Rectangle cloud1HitboxB = new Rectangle(cloud1X + 33, cloudY +
10, 33, 140);
Rectangle cloud1HitboxC = new Rectangle(cloud1X + 33, cloudY +
151, 33, 140);
Rectangle cloud2HitboxA = new Rectangle(cloud2X + 20, cloudY +
10, 25, 49);
Rectangle cloud2HitboxB = new Rectangle(cloud2X + 33, cloudY +
10, 33, 140);
Rectangle cloud2HitboxC = new Rectangle(cloud2X + 33, cloudY +
151, 33, 140);
Rectangle cloud3HitboxA = new Rectangle(cloud3X + 20, cloudY +
10, 25, 49);
Rectangle cloud3HitboxB = new Rectangle(cloud3X + 33, cloudY +
10, 33, 140);
Rectangle cloud3HitboxC = new Rectangle(cloud3X + 33, cloudY +
151, 33, 140);
Rectangle cloud4HitboxA = new Rectangle(cloud4X + 20, cloudY +
10, 25, 49);
Rectangle cloud4HitboxB = new Rectangle(cloud4X + 33, cloudY +
10, 33, 140);
Rectangle cloud4HitboxC = new Rectangle(cloud4X + 33, cloudY +
151, 33, 140);
if (attackThundercloud == true)
{
loadBoss1.Cloud(spriteBatch, new Rectangle((attackFrame *
99) + attackFrame, (attackAct * 291) + attackAct, 99, 291), opacity, new Vector2
(cloud1X, cloudY), 1);
loadBoss1.Cloud(spriteBatch, new Rectangle((attackFrame *
99) + attackFrame, (attackAct * 291) + attackAct, 99, 291), opacity, new Vector2
(cloud2X, cloudY), 1);
loadBoss1.Cloud(spriteBatch, new Rectangle((attackFrame *
99) + attackFrame, (attackAct * 291) + attackAct, 99, 291), opacity, new Vector2
(cloud3X, cloudY), 1);
loadBoss1.Cloud(spriteBatch, new Rectangle((attackFrame *
99) + attackFrame, (attackAct * 291) + attackAct, 99, 291), opacity, new Vector2
(cloud4X, cloudY), 1);
}
#endregion
#region Draw Thunderslash
#region Hitboxes
Rectangle slash1LeftHitboxA = new Rectangle(266, slashOddY + 10,
20, 70);
Rectangle slash1LeftHitboxB = new Rectangle(266, slashOddY + 54,
20, 60);
Rectangle slash2LeftHitboxA = new Rectangle(288, slashOddY +
114, 53, 20);
Rectangle slash2LeftHitboxB = new Rectangle(341, slashOddY +
114, 53, 20);
Rectangle slash3LeftHitboxB = new Rectangle(484, slashOddY + 10,
20, 70);
Rectangle slash3LeftHitboxA = new Rectangle(484, slashOddY + 54,
20, 60);
Rectangle slash4LeftHitboxA = new Rectangle(506, slashOddY + 10,
53, 20);
Rectangle slash4LeftHitboxB = new Rectangle(559, slashOddY + 10,
53, 20);
Rectangle slash5LeftHitboxA = new Rectangle(702, slashOddY + 10,
20, 70);
Rectangle slash5LeftHitboxB = new Rectangle(702, slashOddY + 54,
20, 60);
Rectangle slash6LeftHitboxA = new Rectangle(714, slashOddY +
114, 53, 20);
Rectangle slash6LeftHitboxB = new Rectangle(767, slashOddY +
114, 53, 20);
Rectangle slash7LeftHitboxB = new Rectangle(920, slashOddY + 10,
20, 70);
Rectangle slash7LeftHitboxA = new Rectangle(920, slashOddY + 54,
20, 60);
Rectangle slash8LeftHitboxA = new Rectangle(942, slashOddY + 10,
53, 20);
Rectangle slash8LeftHitboxB = new Rectangle(995, slashOddY + 10,
53, 20);
Rectangle slash1RightHitboxA = new Rectangle(942, slashOddY +
10, 20, 70);
Rectangle slash1RightHitboxB = new Rectangle(942, slashOddY +
54, 20, 60);
Rectangle slash2RightHitboxA = new Rectangle(886, slashOddY +
114, 53, 20);
Rectangle slash2RightHitboxB = new Rectangle(833, slashOddY +
114, 53, 20);
Rectangle slash3RightHitboxB = new Rectangle(724, slashOddY +
10, 20, 70);
Rectangle slash3RightHitboxA = new Rectangle(724, slashOddY +
54, 20, 60);
Rectangle slash4RightHitboxA = new Rectangle(668, slashOddY +
10, 53, 20);
Rectangle slash4RightHitboxB = new Rectangle(615, slashOddY +
10, 53, 20);
Rectangle slash5RightHitboxA = new Rectangle(506, slashOddY +
10, 20, 70);
Rectangle slash5RightHitboxB = new Rectangle(506, slashOddY +
54, 20, 60);
Rectangle slash6RightHitboxA = new Rectangle(450, slashOddY +
114, 53, 20);
Rectangle slash6RightHitboxB = new Rectangle(397, slashOddY +
114, 53, 20);
Rectangle slash7RightHitboxB = new Rectangle(288, slashOddY +
10, 20, 70);
Rectangle slash7RightHitboxA = new Rectangle(288, slashOddY +
54, 20, 60);
Rectangle slash8RightHitboxA = new Rectangle(232, slashOddY +
10, 53, 20);
Rectangle slash8RightHitboxB = new Rectangle(179, slashOddY +
10, 53, 20);
#endregion
if (boss1FaceL == false)
{
if (slash1 == true)
{
loadBoss1.SlashDn(spriteBatch, new Rectangle((127 *
slash1Frame) + slash1Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(169, slashOddY), 2);
}
if (slash2 == true)
{
loadBoss1.SlashLo(spriteBatch, new Rectangle((127 *
slash2Frame) + slash2Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(278, slashOddY), 2);
}
if (slash3 == true)
{
loadBoss1.SlashUp(spriteBatch, new Rectangle((127 *
slash3Frame) + slash3Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(387, slashOddY), 2);
}
if (slash4 == true)
{
loadBoss1.SlashHi(spriteBatch, new Rectangle((127 *
slash4Frame) + slash4Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(496, slashOddY), 2);
}
if (slash5 == true)
{
loadBoss1.SlashDn(spriteBatch, new Rectangle((127 *
slash5Frame) + slash5Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(605, slashOddY), 2);
}
if (slash6 == true)
{
loadBoss1.SlashLo(spriteBatch, new Rectangle((127 *
slash6Frame) + slash6Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(714, slashOddY), 2);
}
if (slash7 == true)
{
loadBoss1.SlashUp(spriteBatch, new Rectangle((127 *
slash7Frame) + slash7Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(823, slashOddY), 2);
}
if (slash8 == true)
{
loadBoss1.SlashHi(spriteBatch, new Rectangle((127 *
slash8Frame) + slash8Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(932, slashOddY), 2);
}
}
if (boss1FaceL == true)
{
if (slash1 == true)
{
loadBoss1.SlashDn(spriteBatch, new Rectangle((127 *
slash1Frame) + slash1Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(932, slashOddY), 2);
}
if (slash2 == true)
{
loadBoss1.SlashLo(spriteBatch, new Rectangle((127 *
slash2Frame) + slash2Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(823, slashOddY), 2);
}
if (slash3 == true)
{
loadBoss1.SlashUp(spriteBatch, new Rectangle((127 *
slash3Frame) + slash3Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(714, slashOddY), 2);
}
if (slash4 == true)
{
loadBoss1.SlashHi(spriteBatch, new Rectangle((127 *
slash4Frame) + slash4Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(605, slashOddY), 2);
}
if (slash5 == true)
{
loadBoss1.SlashDn(spriteBatch, new Rectangle((127 *
slash5Frame) + slash5Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(496, slashOddY), 2);
}
if (slash6 == true)
{
loadBoss1.SlashLo(spriteBatch, new Rectangle((127 *
slash6Frame) + slash6Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(387, slashOddY), 2);
}
if (slash7 == true)
{
loadBoss1.SlashUp(spriteBatch, new Rectangle((127 *
slash7Frame) + slash7Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(278, slashOddY), 2);
}
if (slash8 == true)
{
loadBoss1.SlashHi(spriteBatch, new Rectangle((127 *
slash8Frame) + slash8Frame, (144 * slashFacing) + slashFacing, 127, 144), opacity,
new Vector2(169, slashOddY), 2);
}
}
#endregion
#region Draw Thunderblast
Rectangle thunderblastHitbox = new Rectangle(thunderBlastX, 555,
1144, 130);
if (attackThunderblast == true && boss1Act == 4)
{
loadBoss1.Blast(spriteBatch, new Rectangle(0, (170 *
attackFrame) + attackFrame, 1144, 170), opacity, new Vector2(thunderBlastX, 535), 2,
attackAct);
}
#endregion
#region Draw Counter
Rectangle counterLeftHitbox = new Rectangle(285, 570, 20, 140);
Rectangle counterRightHitbox = new Rectangle(975, 570, 20, 140);
if (boss1Counter == true)
{
if (boss1FaceL == false)
{
loadBoss1.SlashUp(spriteBatch, new Rectangle((127 *
counterFrame) + counterFrame, 0, 127, 144), opacity, new Vector2(188, 560), 2);
}
if (boss1FaceL == true)
{
loadBoss1.SlashUp(spriteBatch, new Rectangle((127 *
counterFrame) + counterFrame, 145, 127, 144), opacity, new Vector2(965, 560), 2);
}
}
#endregion
#endregion
#region Enemy Hitboxes
if (boss1HP > 0)
{
#region Thunder Bolt
if (attackThunderbolt == true)
{
if (boltUp == true)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(boltUpHitbox) || drgnhitbox.Intersects(boltUpHitbox)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (boltDn == true)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(boltDnHitbox) || drgnhitbox.Intersects(boltDnHitbox)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
#endregion
#region Thunder Cloud
if (attackThundercloud == true)
{
if (attackAct == 0)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud1HitboxA) || drgnhitbox.Intersects(cloud1HitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud2HitboxA) || drgnhitbox.Intersects(cloud2HitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud3HitboxA) || drgnhitbox.Intersects(cloud3HitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud4HitboxA) || drgnhitbox.Intersects(cloud4HitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (attackAct == 1)
{
if (attackFrame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud1HitboxB) || drgnhitbox.Intersects(cloud1HitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud2HitboxB) || drgnhitbox.Intersects(cloud2HitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud3HitboxB) || drgnhitbox.Intersects(cloud3HitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud4HitboxB) || drgnhitbox.Intersects(cloud4HitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (attackFrame > 2 && attackFrame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud1HitboxC) || drgnhitbox.Intersects(cloud1HitboxC)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud2HitboxC) || drgnhitbox.Intersects(cloud2HitboxC)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud3HitboxC) || drgnhitbox.Intersects(cloud3HitboxC)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(cloud4HitboxC) || drgnhitbox.Intersects(cloud4HitboxC)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
}
#endregion
#region Thunder Slash
if (attackThunderslash == true)
{
if (boss1FaceL == false)
{
if (slash1 == true)
{
if (slash1Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash1LeftHitboxA) || drgnhitbox.Intersects
(slash1LeftHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash1Frame > 3 && slash1Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash1LeftHitboxB) || drgnhitbox.Intersects
(slash1LeftHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash2 == true)
{
if (slash2Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash2LeftHitboxA) || drgnhitbox.Intersects
(slash2LeftHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash2Frame > 3 && slash2Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash2LeftHitboxB) || drgnhitbox.Intersects
(slash2LeftHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash3 == true)
{
if (slash3Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash3LeftHitboxA) || drgnhitbox.Intersects
(slash3LeftHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash3Frame > 3 && slash3Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash3LeftHitboxB) || drgnhitbox.Intersects
(slash3LeftHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash4 == true)
{
if (slash4Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash4LeftHitboxA) || drgnhitbox.Intersects
(slash4LeftHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash4Frame > 3 && slash4Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash4LeftHitboxB) || drgnhitbox.Intersects
(slash4LeftHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash5 == true)
{
if (slash5Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash5LeftHitboxA) || drgnhitbox.Intersects
(slash5LeftHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash5Frame > 3 && slash5Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash5LeftHitboxB) || drgnhitbox.Intersects
(slash5LeftHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash6 == true)
{
if (slash6Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash6LeftHitboxA) || drgnhitbox.Intersects
(slash6LeftHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash6Frame > 3 && slash6Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash6LeftHitboxB) || drgnhitbox.Intersects
(slash6LeftHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash7 == true)
{
if (slash7Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash7LeftHitboxA) || drgnhitbox.Intersects
(slash7LeftHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash7Frame > 3 && slash7Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash7LeftHitboxB) || drgnhitbox.Intersects
(slash7LeftHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash8 == true)
{
if (slash8Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash8LeftHitboxA) || drgnhitbox.Intersects
(slash8LeftHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash8Frame > 3 && slash8Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash8LeftHitboxB) || drgnhitbox.Intersects
(slash8LeftHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
}
if (boss1FaceL == true)
{
if (slash1 == true)
{
if (slash1Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash1RightHitboxA) || drgnhitbox.Intersects
(slash1RightHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash1Frame > 3 && slash1Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash1RightHitboxB) || drgnhitbox.Intersects
(slash1RightHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash2 == true)
{
if (slash2Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash2RightHitboxA) || drgnhitbox.Intersects
(slash2RightHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash2Frame > 3 && slash2Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash2RightHitboxB) || drgnhitbox.Intersects
(slash2RightHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash3 == true)
{
if (slash3Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash3RightHitboxA) || drgnhitbox.Intersects
(slash3RightHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash3Frame > 3 && slash3Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash3RightHitboxB) || drgnhitbox.Intersects
(slash3RightHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash4 == true)
{
if (slash4Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash4RightHitboxA) || drgnhitbox.Intersects
(slash4RightHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash4Frame > 3 && slash4Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash4RightHitboxB) || drgnhitbox.Intersects
(slash4RightHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash5 == true)
{
if (slash5Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash5RightHitboxA) || drgnhitbox.Intersects
(slash5RightHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash5Frame > 3 && slash5Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash5RightHitboxB) || drgnhitbox.Intersects
(slash5RightHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash6 == true)
{
if (slash6Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash6RightHitboxA) || drgnhitbox.Intersects
(slash6RightHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash6Frame > 3 && slash6Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash6RightHitboxB) || drgnhitbox.Intersects
(slash6RightHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash7 == true)
{
if (slash7Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash7RightHitboxA) || drgnhitbox.Intersects
(slash7RightHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash7Frame > 3 && slash7Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash7RightHitboxB) || drgnhitbox.Intersects
(slash7RightHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
if (slash8 == true)
{
if (slash8Frame < 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash8RightHitboxA) || drgnhitbox.Intersects
(slash8RightHitboxA)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (slash8Frame > 3 && slash8Frame < 7)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(slash8RightHitboxB) || drgnhitbox.Intersects
(slash8RightHitboxB)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
}
}
#endregion
#region Thunder Blast
if (attackThunderblast == true)
{
if (boss1Act == 4)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(thunderblastHitbox) || drgnhitbox.Intersects
(thunderblastHitbox)))
{
damageCheck = 3;
drgnHit = true; drgnInvulnerable = true;
}
}
}
#endregion
#region Counter
if (boss1Counter == true)
{
if (boss1FaceL == false)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(counterLeftHitbox) || drgnhitbox.Intersects
(counterLeftHitbox)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
if (boss1FaceL == true)
{
if (drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(counterRightHitbox) || drgnhitbox.Intersects
(counterRightHitbox)))
{
damageCheck = 1;
drgnHit = true; drgnInvulnerable = true;
}
}
}
#endregion
#region Contact
if (boss1Opacity > 0 && boss1invBlink > 0 && boss1Exhausted
== false && boss1Knockback == false && drgnInvulnerable == false &&
(drgnhitboxHead.Intersects(boss1Hitbox) || drgnhitbox.Intersects(boss1Hitbox)))
{
damageCheck = 3;
drgnHit = true; drgnInvulnerable = true;
}
#endregion
if (attackThunderbolt == false && attackThundercloud ==
false && attackThunderslash == false && attackThunderblast == false && boss1Counter
== false && bossCounterCooldown >= 30 && boss1Exhausted == false)
{
if (boss1Hitbox.Intersects(ClawHitbox) && boss1HP > 0 &&
boss1Knockback == false && usingClaw == true && boss1Counter == false)
{
if (boss1Counter == false)
{
boss1Counter = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
e1plinkOn = true;
}
}
if (boss1Hitbox.Intersects(BreathHitbox) && boss1HP > 0
&& boss1Knockback == false && drgnFire == true && boss1Counter == false)
{
if (boss1Counter == false)
{
boss1Counter = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
e1plinkOn = true;
}
}
}
if (boss1Exhausted == true)
{
if (boss1Hitbox.Intersects(ClawHitbox) && boss1HP > 0 &&
boss1Knockback == false && usingClaw == true && boss1Counter == false)
{
boss1ClawHit = true;
}
if (boss1Hitbox.Intersects(BreathHitbox) && boss1HP > 0
&& boss1Knockback == false && drgnFire == true && boss1Counter == false)
{
boss1BreathHit = true;
}
}
}
#endregion
}
#endregion
//END STAGE 1-B DRAW
#region Stage 5-1 Draw
if (stage5e1 == true)
{
#region Draw Stage
draw5e1.Draw(spriteBatch, new Rectangle((barrierFrame * 240) +
barrierFrame, 0, 240, 780), opacity);
drawStages.Draw(spriteBatch, opacity, (-400 + drgnCamX -
(drgnCamX / 50)), (-200 + drgnCamY - (drgnCamY / 100)), 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0);
drawSky.DrawSkyC(spriteBatch, drgnCamX, -200 + drgnCamY -
(drgnCamY / 100), opacity);
#endregion
#region Draw NPC
if (niaOn == true)
{
npc5e1.Draw(spriteBatch, npc1Frame, npc1Act, opacity);
}
#endregion
#region Stage Exit
Rectangle stageExitR = new Rectangle(1380, 0, 200, 2000);
Rectangle stageExitL = new Rectangle(-250, 0, 200, 2000);
if (drgnhitboxHead.Intersects(stageExitR))
{
if (stageExit == false)
{
stageExit = true;
musicFade = true;
}
}
if (drgnhitboxHead.Intersects(stageExitL))
{
if (on5e2 == false)
{
on5e2 = true;
}
if (stageExit == false)
{
stageExit = true;
musicFade = true;
}
}
#endregion
}
#endregion
#region Stage 7-B Draw
if (stage7eB == true)
{
#region Draw Stage
drawStages.Draw(spriteBatch, opacity, (drgnCamX - (drgnCamX /
50)), (drgnCamY - (drgnCamY / 200)), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0);
#endregion
#region Draw Enemies
Vector2 printGeneral = new Vector2(generalXPos, 574);
Rectangle generalAnimate = new Rectangle((generalFrame * 127) +
generalFrame, (generalAct * 144) + generalAct, 127, 144);
if (boss7Phase1 == true)
{
loadGeneral.Draw(spriteBatch, generalFrame, generalAct,
opacity, generalInvBlink, printGeneral);
}
Vector2 printMechHand = new Vector2(mechFistNearX - 33, 615);
if (boss7Phase2 == true)
{
loadMech.DrawBody(spriteBatch, opacity);
loadMech.DrawHead(spriteBatch, mechHeadFrame, mechHeadAct,
opacity, mechHeadInvBlink, mechHeadXPos, mechHeadYPos);
loadMech.DrawKing(spriteBatch, mechKingFrame, mechKingAct,
opacity, mechHeadInvBlink, mechHeadXPos, mechHeadYPos);
loadMech.DrawBrooch(spriteBatch, mechBroochFrame,
mechBroochAct, opacity, mechBroochInvBlink);
loadMech.DrawScepter(spriteBatch, mechScepterAct,
mechScepterFrame, opacity, mechStaffInvBlink);
loadMech.DrawSword(spriteBatch, mechSwordFrame, opacity,
mechSwordInvBlink);
loadMech.DrawPipes(spriteBatch, mechExhaustFrame, opacity,
mechExhaustInvBlink, mechExhaustHP);
if (mechPunchAttack == false)
{
loadMech.DrawHand(spriteBatch, mechHandStatus, opacity,
255, printMechHand);
}
else if (mechPunchAttack == true)
{
loadMech.DrawFist(spriteBatch, mechFistFrame,
mechFistAct, opacity, mechFistInvBlink, mechFistX, 560);
loadMech.DrawFistBack(spriteBatch, mechFistFrame,
opacity, mechFistFarX, drgnCamY + 200);
}
}
#endregion
#region Body Hitboxes
Rectangle generalHitbox = new Rectangle(generalXPos + 15, 474,
98, 145);
Rectangle headHitbox = new Rectangle(mechHeadXPos + 80,
mechHeadYPos + 50, 270, 300);
Rectangle headDamagebox = new Rectangle(mechHeadXPos + 150,
mechHeadYPos + 50, 1000, 250);
Rectangle broochHitbox = new Rectangle(1280, 430, 45, 80);
Rectangle fistHitbox = new Rectangle(mechFistX + 20, 590, 102,
131);
Rectangle staffHitbox = new Rectangle(660, 330, 180, 386);
Rectangle exhaustHitbox = new Rectangle(1380, 590, 80, 200);
if (generalHP > 0)
{
if (generalHitbox.Intersects(ClawHitbox) && generalHit ==
false && usingClaw == true)
{
generalHit = true;
}
else if (generalHitbox.Intersects(BreathHitbox) &&
generalHit == false && drgnFire == true)
{
generalHit = true;
}
}
if (mechHeadInvCT <= 0 && mechHeadHP > 0)
{
if (headHitbox.Intersects(ClawHitbox) && mechHeadHit ==
false && usingClaw == true)
{
mechHeadHit = true;
mechHeadClawHit = true;
mechHeadInvCT = 60;
headHitDelay = 180;
}
else if (headHitbox.Intersects(BreathHitbox) && mechHeadHit
== false && drgnFire == true && breathType != 2 && breathType != 4)
{
mechHeadHit = true;
mechHeadFireHit = true;
mechHeadInvCT = 60;
headHitDelay = 180;
}
}
#region brooch
if (mechBroochInvCT <= 0 && mechBroochHP > 0)
{
if (BreathHitbox.Intersects(broochHitbox) && mechBroochAct
== 1 && drgnFire == true)
{
if (breathType == 2 && mechBroochDamaged == false)
{
mechBroochHit = true;
mechBroochInvCT = 60;
mechBroochDamaged = true;
}
else
{
if (e1plinkOn == false)
{
e1plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
}
}
}
#endregion
#region staff
if (mechStaffInvCT <= 0 && mechStaffHP > 0 && mechScepterAct ==
1)
{
if (BreathHitbox.Intersects(staffHitbox) && drgnFire ==
true)
{
if (breathType == 0 && mechStaffDamaged == false)
{
mechStaffHit = true;
mechStaffDamaged = true;
mechStaffInvCT = 60;
}
else
{
if (e2plinkOn == false)
{
e2plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
}
}
if (ClawHitbox.Intersects(staffHitbox) && usingClaw == true)
{
if (e2plinkOn == false)
{
e2plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
}
}
#endregion
#region fist
if (mechFistInvCT <= 0 && mechFistHP > 0 && mechPunchAttack ==
true)
{
if (drgnFire == true && BreathHitbox.Intersects(fistHitbox))
{
if (breathType == 3 && mechFistHit == false)
{
mechFistHit = true;
mechFistInvCT = 60;
}
else
{
if (e3plinkOn == false)
{
e3plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
}
}
if (usingClaw == true && ClawHitbox.Intersects(fistHitbox))
{
if (e3plinkOn == false)
{
e3plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
}
}
#endregion
#region exhaust
if (mechExhaustInvCT <= 0 && mechExhaustHP > 0)
{
if (drgnFire == true && BreathHitbox.Intersects
(exhaustHitbox))
{
if (breathType == 4)
{
mechExhaustHit = true;
mechExhaustInvCT = 60;
}
else
{
if (e4plinkOn == false)
{
e4plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
}
}
if (usingClaw == true && ClawHitbox.Intersects
(exhaustHitbox))
{
if (e4plinkOn == false)
{
e4plinkOn = true;
if (plinkPlay == false)
{
plinkPlay = true;
}
}
}
}
#endregion
#endregion
#region Draw Attacks
#region fire
Rectangle fireHitbox1 = new Rectangle(0, 0, 2000, 490);
Rectangle fireHitbox2 = new Rectangle(80, 490, 1050, 300);
Rectangle fireHitbox3 = new Rectangle(80, 490, 1100, 50);
if (mechFireAttack == true)
{
if (mechFireWait >= 2)
{
loadMech.DrawFireLaser(spriteBatch, mechFireFrame,
opacity);
if (drgnHPNow > 0 && mechHeadHP > 0 && drgnInvulnerable
== false && (drgnhitbox.Intersects(fireHitbox1) || drgnhitboxHead.Intersects
(fireHitbox1) || drgnhitbox.Intersects(fireHitbox2) || drgnhitboxHead.Intersects
(fireHitbox2) || drgnhitbox.Intersects(fireHitbox3) || drgnhitboxHead.Intersects
(fireHitbox3)))
{
damageCheck = 6;
drgnHit = true;
}
}
}
#endregion
#region thunder
Rectangle thunderHitbox = new Rectangle(mechThunderX + 50, 0,
70, 1200);
loadMech.DrawCloudsFwd(spriteBatch, mechCloudOpacity,
mechCloudsFwdX1);
loadMech.DrawCloudsFwd(spriteBatch, mechCloudOpacity,
mechCloudsFwdX2);
loadMech.DrawCloudsFwd(spriteBatch, mechCloudOpacity,
mechCloudsFwdX3);
loadMech.DrawCloudBack(spriteBatch, mechCloudOpacity,
mechCloudsBackX1);
loadMech.DrawCloudBack(spriteBatch, mechCloudOpacity,
mechCloudsBackX2);
loadMech.DrawCloudBack(spriteBatch, mechCloudOpacity,
mechCloudsBackX3);
if (mechThunderAttack == true)
{
if (drgnFire == true && breathType == 1 && mechCloudOpacity
== 255)
{
loadMech.DrawDragonThunder(spriteBatch,
drgnThunderFrame, opacity, drgnX + breathX, drgnY + 6, drgnFaceR);
}
if (drgnThunderStrike == true)
{
loadMech.DrawThunderStrike(spriteBatch,
thunderStrikeFrame, opacity);
}
if (mechTeslaOn == true)
{
loadMech.DrawTesla(spriteBatch, mechTeslaFrame,
mechTeslaAct, opacity, mechTeslaY);
}
if (mechTeslaY <= -200)
{
loadMech.DrawSatThunder(spriteBatch, mechThunderFrame,
mechThunderAct, opacity, mechThunderX);
}
if (mechTeslaAct < 2 && mechHeadHP > 0 && drgnHPNow > 0 &&
drgnInvulnerable == false && (drgnhitbox.Intersects(thunderHitbox) ||
drgnhitboxHead.Intersects(thunderHitbox)))
{
damageCheck = 3;
drgnHit = true;
}
}
#endregion
#region laser
Rectangle laser1Hitbox = new Rectangle(-810, mechHeadYPos + 15,
1700, 30);
Rectangle laser2Hitbox = new Rectangle(-700, mechHeadYPos + 255,
1700, 30);
if (mechLaserAttack == true && mechHeadHP > 0)
{
if (drgnHPNow > 0 && drgnInvulnerable == false &&
(drgnhitbox.Intersects(headDamagebox) || drgnhitboxHead.Intersects(headDamagebox)))
{
damageCheck = 4;
drgnHit = true;
}
if (mechHeadChargeOn == true)
{
loadMech.LaserCharge(spriteBatch, mechLaserShockFrame,
opacity, mechHeadYPos);
}
if (mechHeadLaserOn == true && mechLaserWait >= 60)
{
loadMech.LaserBlast(spriteBatch, mechLaserFrame,
mechLaserAct, opacity, mechHeadYPos);
if (mechLaserFrame == 0 && mechHeadHP > 0 && drgnHPNow >
0 && drgnInvulnerable == false && (drgnhitbox.Intersects(laser1Hitbox) ||
drgnhitboxHead.Intersects(laser1Hitbox) || drgnhitbox.Intersects(laser2Hitbox) ||
drgnhitboxHead.Intersects(laser2Hitbox)))
{
damageCheck = 3;
drgnHit = true;
}
}
}
#endregion
#region ice
Rectangle ice1Hitbox = new Rectangle(mechIceX1 + 10, mechIceY1 +
25, 110, 10);
Rectangle ice2Hitbox = new Rectangle(mechIceX2 + 10, mechIceY2 +
25, 110, 10);
Rectangle ice3Hitbox = new Rectangle(mechIceX3 + 10, mechIceY3 +
25, 110, 10);
Rectangle ice4Hitbox = new Rectangle(mechIceX4 + 10, mechIceY4 +
25, 110, 10);
Rectangle ice5Hitbox = new Rectangle(mechIceX5 + 10, mechIceY5 +
25, 110, 10);
Rectangle ice6Hitbox = new Rectangle(mechIceX6 + 10, mechIceY6 +
25, 110, 10);
Rectangle ice7Hitbox = new Rectangle(mechIceX7 + 10, mechIceY7 +
25, 110, 10);
Rectangle ice8Hitbox = new Rectangle(mechIceX8 + 10, mechIceY8 +
25, 110, 10);
if (mechIceAttack == true)
{
loadMech.DrawIce(spriteBatch, mechIceFrame1, opacity,
mechIceX1, mechIceY1);
loadMech.DrawIce(spriteBatch, mechIceFrame2, opacity,
mechIceX2, mechIceY2);
loadMech.DrawIce(spriteBatch, mechIceFrame3, opacity,
mechIceX3, mechIceY3);
loadMech.DrawIce(spriteBatch, mechIceFrame4, opacity,
mechIceX4, mechIceY4);
loadMech.DrawIce(spriteBatch, mechIceFrame5, opacity,
mechIceX5, mechIceY5);
loadMech.DrawIce(spriteBatch, mechIceFrame6, opacity,
mechIceX6, mechIceY6);
loadMech.DrawIce(spriteBatch, mechIceFrame7, opacity,
mechIceX7, mechIceY7);
loadMech.DrawIce(spriteBatch, mechIceFrame8, opacity,
mechIceX8, mechIceY8);
if (drgnHPNow > 0 && mechHeadHP > 0 && drgnInvulnerable ==
false && (drgnhitbox.Intersects(ice1Hitbox) || drgnhitboxHead.Intersects
(ice1Hitbox)))
{
damageCheck = 3;
drgnHit = true;
}
if (drgnHPNow > 0 && mechHeadHP > 0 && drgnInvulnerable ==
false && (drgnhitbox.Intersects(ice2Hitbox) || drgnhitboxHead.Intersects
(ice2Hitbox)))
{
damageCheck = 3;
drgnHit = true;
}
if (drgnHPNow > 0 && mechHeadHP > 0 && drgnInvulnerable ==
false && (drgnhitbox.Intersects(ice3Hitbox) || drgnhitboxHead.Intersects
(ice3Hitbox)))
{
damageCheck = 3;
drgnHit = true;
}
if (drgnHPNow > 0 && mechHeadHP > 0 && drgnInvulnerable ==
false && (drgnhitbox.Intersects(ice4Hitbox) || drgnhitboxHead.Intersects
(ice4Hitbox)))
{
damageCheck = 3;
drgnHit = true;
}
if (drgnHPNow > 0 && mechHeadHP > 0 && drgnInvulnerable ==
false && (drgnhitbox.Intersects(ice5Hitbox) || drgnhitboxHead.Intersects
(ice5Hitbox)))
{
damageCheck = 3;
drgnHit = true;
}
if (drgnHPNow > 0 && mechHeadHP > 0 && drgnInvulnerable ==
false && (drgnhitbox.Intersects(ice6Hitbox) || drgnhitboxHead.Intersects
(ice6Hitbox)))
{
damageCheck = 3;
drgnHit = true;
}
if (drgnHPNow > 0 && mechHeadHP > 0 && drgnInvulnerable ==
false && (drgnhitbox.Intersects(ice7Hitbox) || drgnhitboxHead.Intersects
(ice7Hitbox)))
{
damageCheck = 3;
drgnHit = true;
}
if (drgnHPNow > 0 && mechHeadHP > 0 && drgnInvulnerable ==
false && (drgnhitbox.Intersects(ice8Hitbox) || drgnhitboxHead.Intersects
(ice8Hitbox)))
{
damageCheck = 3;
drgnHit = true;
}
}
#endregion
#region fist
if (mechPunchAttack == true)
{
if (mechFistAct == 1 && mechFistWait >= 60)
{
if (drgnHPNow > 0 && mechHeadHP > 0 && drgnInvulnerable
== false && (drgnhitbox.Intersects(fistHitbox) || drgnhitboxHead.Intersects
(fistHitbox)))
{
damageCheck = 3;
drgnHit = true;
}
}
}
#endregion
#endregion
#region Draw Plink
if (e1plinkOn == true && e1plinkFr < 4)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65), new
Rectangle((e1plinkFr * 65) + e1plinkFr, 0, 65, 65), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-1280, -450), SpriteEffects.None, 2);
}
if (e2plinkOn == true && e2plinkFr < 4)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65), new
Rectangle((e2plinkFr * 65) + e2plinkFr, 0, 65, 65), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-705, -580), SpriteEffects.None, 2);
}
if (e3plinkOn == true && e3plinkFr < 4)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65), new
Rectangle((e3plinkFr * 65) + e3plinkFr, 0, 65, 65), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-(mechFistX + 65), -600), SpriteEffects.None, 3);
}
if (e4plinkOn == true && e4plinkFr < 4)
{
spriteBatch.Draw(plinkSS, new Rectangle(0, 0, 65, 65), new
Rectangle((e4plinkFr * 65) + e4plinkFr, 0, 65, 65), new Color(opacity, opacity,
opacity, 255), 0, new Vector2(-1335, -620), SpriteEffects.None, 0.1f);
}
#endregion
#region Draw Explosions
#region exp 1
if (exp1On == true)
{
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp1Frame * 127) + exp1Frame, 0, 127, 144), opacity, exp1X + drgnCamX, exp1Y +
drgnCamY, 8);
}
#endregion
#region exp 2
if (exp2On == true)
{
if (exhaustExplosion == true)
{
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp2Frame * 127) + exp2Frame, 0, 127, 144), opacity, 1431, 283, -2.9f);
if (exp2Frame >= 2)
{
exhaustSmoke = true;
}
}
else
{
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp2Frame * 127) + exp2Frame, 0, 127, 144), opacity, exp2X + drgnCamX, exp2Y +
drgnCamY, 8);
}
}
#endregion
#region exp 3
if (exp3On == true)
{
if (staffExplosion == true)
{
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp3Frame * 127) + exp3Frame, 0, 127, 144), opacity, 660, 330, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp3Frame * 127) + exp3Frame, 0, 127, 144), opacity, 788, 330, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp3Frame * 127) + exp3Frame, 0, 127, 144), opacity, 660, 474, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp3Frame * 127) + exp3Frame, 0, 127, 144), opacity, 788, 474, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp3Frame * 127) + exp3Frame, 0, 127, 144), opacity, 724, 402, -5.8f);
if (exp3Frame >= 2)
{
mechScepterAct = 2;
}
}
else
{
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp3Frame * 127) + exp3Frame, 0, 127, 144), opacity, exp3X + drgnCamX, exp3Y +
drgnCamY, 8);
}
}
#endregion
#region exp 4
if (exp4On == true)
{
if (fistExplosion == true)
{
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp4Frame * 127) + exp4Frame, 0, 127, 144), opacity, 703, 571, -0.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp4Frame * 127) + exp4Frame, 0, 127, 144), opacity, 831, 571, -0.9f);
if (exp4Frame >= 2)
{
mechHandStatus = 1;
}
}
else
{
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp4Frame * 127) + exp4Frame, 0, 127, 144), opacity, exp4X + drgnCamX, exp4Y +
drgnCamY, 8);
}
}
#endregion
#region exp 5
if (exp5On == true)
{
if (swordExplosion == true)
{
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1340, 100, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1468, 100, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1340, 244, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1468, 244, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1340, 388, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1468, 388, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1340, 532, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1468, 532, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1340, 676, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1468, 676, -5.9f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1404, 177, -5.8f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1404, 321, -5.8f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1404, 465, -5.8f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1404, 609, -5.8f);
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, 1404, 753, -5.8f);
if (exp5Frame >= 2)
{
mechSwordFrame = 1;
}
}
else
{
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp5Frame * 127) + exp5Frame, 0, 127, 144), opacity, exp5X + drgnCamX, exp5Y +
drgnCamY, 8);
}
}
#endregion
#region exp 6
if (exp6On == true)
{
if (broochExplosion == true)
{
loadExplosion.DrawExpOut(spriteBatch, new Rectangle
((exp6Frame * 127) + exp6Frame, 0, 127, 144), opacity, 1239, 398, 1.3f);
if (exp6Frame >= 2)
{
mechBroochAct = 5;
}
}
}
#endregion
#endregion
}
#endregion
}
#endregion
spriteBatch.End();
base.Draw(gameTime);
}
}
}

Event Timeline

keithzg created this object with visibility "Public (No Login Required)".