Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Information about object: Mon
- Sprite: spr_mon_front
- Solid: false
- Visible: false
- Depth: 0
- Persistent: false
- Parent:
- Children:
- Mask:
- No Physics Object
- Create Event:
- execute code:
- ///CREATE PLAYER ID
- o = 0; // 0 is the controlling player, 1 is the opposing player !!!
- CurrentPartyMember = 1;
- c = CurrentPartyMember;
- PlaySound = false;
- PlaySoundAgain = false;
- m = irandom_range(0,global.MonAmount); // which pokemon are we? (note: this is changed in BattleDummy)
- if instance_exists(BattleDummy) {
- _xoff = BattleDummy.xoff
- _yoff = BattleDummy.yoff
- }
- visible = false;
- //irandom_range(0,global.Moves);
- Amp = 50;
- Freq = 6;
- DamageInflicted = 0;
- Waiting[0] = -1;
- Waiting[1] = -1;
- Waiting[0] = false;
- Waiting[1] = false;
- aDamageInflicted = 0;
- bDamageInflicted = 0;
- Plyr[o] = true;
- StoredText[0] = "text";
- StoredText[1] = "text";
- StoredText[o] = "sample text";
- StoredPower1 = 0;
- StoredPower2 = 0;
- Health[o] = 0;
- PlyrName[0] = "";
- PlyrHlth[0] = 0;
- PlyrAttk[0] = 0;
- PlyrDfns[0] = 0;
- PlyrSped[0] = 0;
- PlyrName[1] = "";
- PlyrHlth[1] = 0;
- PlyrAttk[1] = 0;
- PlyrDfns[1] = 0;
- PlyrSped[1] = 0;
- PlyrName[o] = "";
- PlyrHlth[o] = 0;
- PlyrAttk[o] = 0;
- PlyrDfns[o] = 0;
- //PlyrSped[o] = 0;
- aPlyrMove1 = 0;
- aPlyrMove2 = 0;
- aPlyrMove3 = 0;
- aPlyrMove4 = 0;
- bPlyrMove1 = 0;
- bPlyrMove2 = 0;
- bPlyrMove3 = 0;
- bPlyrMove4 = 0;
- MoveSelected = false;
- Waiting[o] = false; // are we done selecting a move?
- Moving[o] = false;
- IsDamaged[0] = false;
- IsDamaged[1] = false;
- PartyTotal[o] = 4; // default value, this is changed in BattleDummy
- Move[0] = 0;
- Move[1] = 1;
- Move[2] = 2;
- Move[3] = 3;
- aMoveSelected = false;
- bMoveSelected = false;
- aFainted = false;
- bFainted = false;
- aType1 = "Normal";
- aType2 = "";
- bType1 = "Normal";
- bType2 = "";
- faint = false;
- aCHitMod = choose(1,1,1,1,1,1,1,1,2);
- bCHitMod = choose(1,1,1,1,1,1,1,1,2);
- global.aCHitMod = aCHitMod;
- global.bCHitMod = bCHitMod;
- aCrit = false;
- bCrit = false;
- aDamage = 0;
- bDamage = 0;
- idle_phase = 0;
- can_idle = 0;
- sizeMod = 1;
- scaleMod = 1;
- damageFrameCount = 0;
- global.aSpecial = false;
- global.bSpecial = false;
- for ( n=0; n<PartyTotal[o]; n++ ) {
- // PLAYER ONE
- aStoredPlyrName[m,n] = "";
- aStoredPlyrHlth[m,n] = 0;
- aStoredPlyrHlthCache[m,n] = 0;
- aStoredPlyrAttk[m,n] = 0;
- aStoredPlyrDfns[m,n] = 0;
- aStoredPlyrSpat[m,n] = 0;
- aStoredPlyrSpdf[m,n] = 0;
- aStoredPlyrSped[m,n] = 0;
- aStoredPlyrMove1[m,n] = irandom_range(0,global.Moves);
- aStoredPlyrMove2[m,n] = irandom_range(0,global.Moves);
- aStoredPlyrMove3[m,n] = irandom_range(0,global.Moves);
- aStoredPlyrMove4[m,n] = irandom_range(0,global.Moves);
- aStoredPlyrFaint[m,n] = false;
- // PLAYER TWO
- bStoredPlyrName[m,n] = "";
- bStoredPlyrHlth[m,n] = 0;
- bStoredPlyrHlthCache[m,n] = 0;
- bStoredPlyrAttk[m,n] = 0;
- bStoredPlyrDfns[m,n] = 0;
- bStoredPlyrSpat[m,n] = 0;
- bStoredPlyrSpdf[m,n] = 0;
- bStoredPlyrSped[m,n] = 0;
- bStoredPlyrMove1[m,n] = irandom_range(0,global.Moves);
- bStoredPlyrMove2[m,n] = irandom_range(0,global.Moves);
- bStoredPlyrMove3[m,n] = irandom_range(0,global.Moves);
- bStoredPlyrMove4[m,n] = irandom_range(0,global.Moves);
- bStoredPlyrFaint[m,n] = false;
- }
- if o = 0 {
- cx = view_xview + view_wview*0.2
- cy = view_yview + view_hview*0.6
- x = cx;
- y = cy;
- }
- visible = true;
- /*
- If ((Player[a].Health > (Player[a].Health - Player[b].DamageInflicted))
- && Player[a].IsDamaged = true) {
- Player[a].Health -= 1/128 //lose health at 1/128 rate if damaged by opponent.
- }
- 100 > (100 - 50)
- which is 50
- */
- Step Event:
- execute code:
- ///MON INSTRUCTION
- /*
- Notes:
- look for aCrit and bCrit and check if they are false
- so critical hits don't softlock the game
- //for moves that require custom attention to the health bar
- //for explosion
- if (global.aHealth > 0 && Var.ComplexMove[global.aMoveChosen] = true && Var.ComplexMoveType[global.aMoveChosen] = "Explosion" && global.DamageActivateDelay = false && global.DamageFrame >= 6 && BattleDummy.PreAttackDelay < 0 && global.MoveDelay >= global.MoveDelayAmount) {
- if global.aCHitMod = 1 {
- global.aHealth -= 4; //lose health at 1/4 rate if damaged
- }
- if global.aCHitMod > 1 {
- global.aHealth -= 8;
- }
- if global.aHealth < 0.5 {
- global.aHealth = 0;
- }
- }
- */
- mon_sound(); //make sound for the mons when switching or fainting
- mon_animation(); //animate sprites that have animations
- mon_positioning(); //position mons on the field accordingly
- if o = 0 && global.aMonPositioned = false {
- visible = !visible;
- }
- if o = 1 && global.bMonPositioned = false {
- visible = !visible;
- }
- // if we are damaged at all...
- // if player 1 is affected/damaged by player 2 (health not zero)
- if (o = 0
- && global.bFinishQueue = 0
- && global.Player1Damaged = true
- && global.aWaiting = true
- && global.aSwitching = false) { //PRE-CONDITIONS FOR if player 1 is attacked
- if global.aHealth > 0 { //if health is not zero, decrease health by attack damage increments
- if (global.aHealth >
- (aStoredPlyrHlthCache[m,c] - (global.bDamageInflicted/* * global.bMoveTypeEffect*/))
- //if health is greater than damage received, times critical hit ratio, times type effectiveness
- && Var.ComplexMove[global.aMoveChosen] = false
- //if the move used is a regular attack (not drain, suicide, etc)
- && global.DamageActivateDelay = false
- //delay before damage frames occur
- && global.DamageFrame >= 6
- && BattleDummy.PreAttackDelay < 0
- && global.MoveDelay >= global.MoveDelayAmount) {
- //decrease health normally
- if global.aCHitMod = 1 {
- global.aHealth -= 4;
- }
- //decrease health faster if a critical hit
- if global.aCHitMod > 1 {
- global.aHealth -= 8;
- }
- //set health to zero if a decimal less than 1
- if global.aHealth < 1 {
- global.aHealth = 0;
- }
- }
- if global.aHealth <= (aStoredPlyrHlthCache[m,c] - (global.bDamageInflicted/* * global.bMoveTypeEffect*/)) {
- //say you landed a critical hit once conditions have been met
- //TYPE EFFECTIVENESS MESSAGE MODULE
- with(BattleDummy) {
- if PreAttackDelay <= -1 && global.bMoveTypeEffect != 1 && global.HoldOffNextMove = false {
- switch(global.bMoveTypeEffect) {
- case 4: message_text = "It's extremely effective!"; break;
- case 2: message_text = "It's super effective!"; break;
- case 0.5: message_text = "It's not very effective!"; break;
- case 0.25: message_text = "It's barely effective..."; break;
- case 0: message_text = "It doesn't affect "+string(global.aStoredPlyrName)+"..."; break;
- case -1: message_text = "The opposing "+string(global.bStoredPlyrName)+" missed!";
- }
- PreAttackDelay = 10;
- global.SideBattleText += string(message_text)+"##";
- global.HoldOffNextMove = true;
- }
- if PreAttackDelay <= -1 && global.HoldOffNextMove = true && other.aCrit = false {
- global.UseDamageFrames = false;
- global.HoldOffNextMove = false;
- }
- }
- //CRITICAL HIT MESSAGE MODULE
- if global.aCHitMod >= 2 && aCrit = false && global.aSwitching = false && global.aFaintAction = false && BattleDummy.PreAttackDelay <= 0 && global.bMoveTypeEffect = 1 {
- global.HoldOffNextMove = true;
- with(BattleDummy) {
- PreAttackDelay = 10;
- message_text = "The opposing "+string(global.bStoredPlyrName)+" landed a critical hit!";
- global.SideBattleText += string(message_text)+"##";
- }
- aCrit = true;
- }
- if BattleDummy.PreAttackDelay <= 0 && aCrit = true {
- global.HoldOffNextMove = false;
- aCrit = false;
- }
- if global.HoldOffNextMove = false && aCrit = false { //RESET
- global.bFinishQueue = 1; // FINISH PLAYER 2 TURN !!!!!
- global.aDamageFrame = false;
- global.MoveDelay = 0;
- global.DamageFrame = 0;
- if global.Player2Moving = true {
- global.Player2Moving = false;
- global.Player2DoneMoving = true;
- }
- global.PlayHitSfx = false;
- global.Player1Damaged = false;
- global.CalcCrit = false;
- global.aMoveTypeEffect = 1;
- global.bMoveTypeEffect = 1;
- }
- }
- }
- if global.aHealth <= 0 && global.aComplexMove = false {
- //Pokemon faints, pauses turn until player either switches manually or automatically
- with(BattleDummy) {
- if global.aFainted = false {
- PreAttackDelay = 10;
- }
- }
- global.aFainted = true;
- if (image_yscale > 0 && BattleDummy.PreAttackDelay < 0 && !audio_is_playing(sfx)) {
- image_yscale -= 0.33*scaleMod;
- if faint = false {
- audio_play_sound(Var.SndFaint,1,false);
- faint = true;
- }
- }
- if image_yscale <= 0 && aStoredPlyrFaint[m,c] = false {
- visible = false;
- with(BattleDummy) {
- //when a critical hit is landed right before fainting
- if other.aCrit = true {
- message_text = "The opposing "+string(global.bStoredPlyrName)+" landed a critical hit!";
- global.SideBattleText += string(message_text)+"##";
- PreAttackDelay = 10;
- other.aCrit = false;
- }
- //faint message
- if other.aCrit = false && PreAttackDelay <= 0 && other.aStoredPlyrFaint[other.m,other.c] = false {
- message_text = string(global.aStoredPlyrName)+" fainted!";
- global.SideBattleText += string(message_text)+"##";
- global.aMonPositioned = false;
- global.text_rand = irandom_range(0,8);
- PreAttackDelay = 10;
- other.aStoredPlyrFaint[other.m,other.c] = true;
- global.bDamageInflicted = 0;
- global.aSpecial = false;
- }
- }
- if global.aFaintAction = true {
- global.aHealth = 2;
- //global.bFinishQueue = 1;
- }
- }
- if image_yscale <= 0 && aStoredPlyrFaint[m,c] = true && BattleDummy.PreAttackDelay < 1 && aCrit = false {
- global.aSwitching = true;
- global.aFaintAction = true;
- global.Player1Score += 1;
- instance_destroy();
- }
- }
- if global.aHealth <= 0 && global.aComplexMove = true {
- ComplexMoveCheck();
- }
- }
- // if player 2 is affected/damaged by player 1 (health not zero)
- if (o = 1 && global.aFinishQueue = 0 && global.Player2Damaged = true && global.bWaiting = true && global.bSwitching = false) {
- if global.bHealth > 0 {
- if (global.bHealth > (bStoredPlyrHlthCache[m,c] - (global.aDamageInflicted)) && global.DamageActivateDelay = false && global.DamageFrame >= 6 && BattleDummy.PreAttackDelay < 0 && global.MoveDelay >= global.MoveDelayAmount) {
- if global.bCHitMod = 1 {
- global.bHealth -= 4; //lose health at 1/4 rate if damaged
- }
- if global.bCHitMod > 1 {
- global.bHealth -= 8;
- }
- if global.bHealth < 0.5 {
- global.bHealth = 0;
- }
- }
- if global.bHealth <= (bStoredPlyrHlthCache[m,c] - (global.aDamageInflicted)) {
- //TYPE EFFECTIVENESS MESSAGE MODULE
- with(BattleDummy) {
- if PreAttackDelay <= -1 && global.aMoveTypeEffect != 1 && global.HoldOffNextMove = false {
- switch(global.aMoveTypeEffect) {
- case 4: message_text = "It's extremely effective!"; break;
- case 2: message_text = "It's super effective!"; break;
- case 0.5: message_text = "It's not very effective!"; break;
- case 0.25: message_text = "It's barely effective..."; break;
- case 0: message_text = "It doesn't affect the opposing "+string(global.bStoredPlyrName)+"..."; break;
- case -1: message_text = string(global.aStoredPlyrName)+" missed!";
- }
- PreAttackDelay = 10;
- global.SideBattleText += string(message_text)+"##";
- global.HoldOffNextMove = true;
- }
- if PreAttackDelay <= 0 && global.HoldOffNextMove = true && other.bCrit = false {
- global.UseDamageFrames = false;
- global.HoldOffNextMove = false;
- global.Player1Moving = false;
- global.Player1DoneMoving = true;
- }
- }
- //CRITICAL HIT MESSAGE MODULE
- if global.bCHitMod >= 2 && bCrit = false && global.bSwitching = false && global.bFaintAction = false && BattleDummy.PreAttackDelay <= 0 && global.aMoveTypeEffect = 1 {
- global.HoldOffNextMove = true;
- with(BattleDummy) {
- PreAttackDelay = 10;
- message_text = "A critical hit!";
- global.SideBattleText += string(message_text)+"##";
- }
- bCrit = true;
- }
- if BattleDummy.PreAttackDelay <= 0 && bCrit = true {
- global.HoldOffNextMove = false;
- bCrit = false;
- }
- if global.HoldOffNextMove = false && bCrit = false {
- global.aFinishQueue = 1; // FINISH PLAYER 1 TURN !!!!! && global.aStoredPlyrStatusChecked = true
- global.bDamageFrame = false;
- global.MoveDelay = 0;
- global.DamageFrame = 0;
- if global.Player1Moving = true {
- global.Player1Moving = false;
- global.Player1DoneMoving = true;
- }
- global.PlayHitSfx = false;
- global.Player2Damaged = false;
- global.CalcCrit = false;
- global.aMoveTypeEffect = 1;
- global.bMoveTypeEffect = 1;
- }
- }
- }
- if global.bHealth <= 0 && global.bComplexMove = false {
- //Pokemon faints, pauses turn until player either switches manually or automatically
- with(BattleDummy) {
- if global.bFainted = false {
- PreAttackDelay = 10;
- }
- }
- global.bFainted = true;
- if (image_yscale > 0 && BattleDummy.PreAttackDelay < 0 && !audio_is_playing(sfx)) {
- image_yscale -= 0.25*scaleMod;
- if faint = false {
- audio_play_sound(Var.SndFaint,1,false);
- faint = true;
- }
- }
- if image_yscale <= 0 && bStoredPlyrFaint[m,c] = false {
- with(BattleDummy) {
- if other.bCrit = true {
- message_text = "A critical hit!";
- global.SideBattleText += string(message_text)+"##";
- PreAttackDelay = 10;
- other.bCrit = false;
- }
- if other.bCrit = false && PreAttackDelay <= 0 && other.bStoredPlyrFaint[other.m,other.c] = false {
- message_text = "The opposing "+string(global.bStoredPlyrName)+" fainted!";
- global.SideBattleText += string(message_text)+"##";
- global.bMonPositioned = false;
- PreAttackDelay = 10;
- other.bStoredPlyrFaint[other.m,other.c] = true;
- global.aDamageInflicted = 0;
- global.bSpecial = false;
- }
- }
- if bCrit = false {
- }
- if global.bFaintAction = true {
- global.bHealth = 2;
- //global.aFinishQueue = 1;
- }
- }
- if image_yscale <= 0 && bStoredPlyrFaint[m,c] = true && BattleDummy.PreAttackDelay < 1 && bCrit = false {
- global.bSwitching = true;
- global.bFaintAction = true;
- global.Player2Score += 1;
- instance_destroy();
- }
- }
- if global.bHealth <= 0 && global.bComplexMove = true {
- ComplexMoveCheck();
- }
- }
- if (global.aWaiting = 0 && o = 0 && global.aSpecial = false) {
- Freq += 14;
- y = ystart + Amp*sin(Freq * pi / 360);
- }
- if (o = 0 && global.Player1DoneMoving = true && global.Player2DoneMoving = true/*global.aWaiting = false*/) {
- aStoredPlyrHlthCache[m,c] = global.aHealth;
- }
- if (o = 1 && global.Player1DoneMoving = true && global.Player2DoneMoving = true/*global.bWaiting = false*/) {
- bStoredPlyrHlthCache[m,c] = global.bHealth;
- }
- execute code:
- ///TYPE EFFECTIVENESS
- /*
- if o = 0 && global.Player2Moving = true && global.Player1TypeCalculated = false {
- defender_type_matchup_plyr1_type1();
- global.Player1TypeCalculated = true;
- }
- if o = 0 && global.Player1Moving = true && global.Player1TypeCalculated = false {
- global.Player1TypeCalculated = false;
- }
- if o = 1 && global.Player1Moving = true && global.Player2TypeCalculated = false {
- defender_type_matchup_plyr2_type1();
- global.Player2TypeCalculated = true;
- }
- if o = 1 && global.Player2Moving = true && global.Player2TypeCalculated = false {
- global.Player2TypeCalculated = false;
- }
- execute code:
- ///IDLE ANIMATIONS
- /*if (m = 5 || m = 16) {
- switch(o) {
- case 0: global.aSpecial = true;
- case 1: global.bSpecial = true;
- }
- }*/
- if m = 5 {
- if o = 0 {
- sprite_index = shrek_back;
- if global.aHealth < global.aStoredPlyrHlth/1.5 {
- image_speed = 0.60;
- global.aStoredPlyrAttk = Var.AttkId[m]*3;
- global.aStoredPlyrSped = Var.SpedId[m]*3;
- global.aMadPhase = true;
- } else {
- image_speed = 0.35;
- global.aStoredPlyrAttk = Var.AttkId[m];
- global.aStoredPlyrSped = Var.SpedId[m];
- global.aMadPhase = false;
- }
- }
- if o = 1 {
- sprite_index = shrek_front;
- if global.bHealth < global.bStoredPlyrHlth/1.5 {
- image_speed = 0.60;
- global.bStoredPlyrAttk = Var.AttkId[m]*3;
- global.bStoredPlyrSped = Var.SpedId[m]*3;
- global.bMadPhase = true;
- } else {
- image_speed = 0.35;
- global.bStoredPlyrAttk = Var.AttkId[m];
- global.bStoredPlyrSped = Var.SpedId[m];
- global.bMadPhase = false;
- }
- }
- }
- if m = 6 {
- if o = 0 {
- sprite_index = baldi_back;
- if global.aHealth < global.aStoredPlyrHlth/1.5 {
- image_speed = 0.60;
- global.aStoredPlyrAttk = Var.AttkId[m]*4;
- global.aStoredPlyrSped = Var.SpedId[m]*4;
- global.aStoredPlyrSpat = Var.SpatId[m]*4;
- global.aStoredPlyrDfns = Var.DfnsId[m]*2;
- global.aStoredPlyrSpat = Var.SpatId[m]*2;
- global.aMadPhase = true;
- } else {
- image_speed = 0.30;
- global.aStoredPlyrAttk = Var.AttkId[m];
- global.aStoredPlyrSped = Var.SpedId[m];
- global.aStoredPlyrSpat = Var.SpatId[m];
- global.aStoredPlyrDfns = Var.DfnsId[m];
- global.aStoredPlyrSpat = Var.SpatId[m];
- global.aMadPhase = false;
- }
- }
- if o = 1 {
- sprite_index = baldi_front;
- if global.bHealth < global.bStoredPlyrHlth/1.5 {
- image_speed = 0.60;
- global.bStoredPlyrAttk = Var.AttkId[m]*4;
- global.bStoredPlyrSped = Var.SpedId[m]*4;
- global.bStoredPlyrSpat = Var.SpatId[m]*4;
- global.bStoredPlyrDfns = Var.DfnsId[m]*2;
- global.bStoredPlyrSpat = Var.SpatId[m]*2;
- global.bMadPhase = true;
- } else {
- image_speed = 0.30;
- global.bStoredPlyrAttk = Var.AttkId[m];
- global.bStoredPlyrSped = Var.SpedId[m];
- global.bStoredPlyrSpat = Var.SpatId[m];
- global.bStoredPlyrDfns = Var.DfnsId[m];
- global.bStoredPlyrSpat = Var.SpatId[m];
- global.bMadPhase = false;
- }
- }
- }
- if m = 27 {
- if o = 0 {
- sprite_index = blooper_back;
- }
- if o = 1 {
- sprite_index = blooper_front;
- }
- image_speed = 0.30;
- }
- if m = 28 {
- if o = 0 {
- sprite_index = petey_back;
- if global.aHealth < global.aStoredPlyrHlth/1.5 {
- image_speed = 0.60;
- global.aStoredPlyrAttk = Var.AttkId[m]*3;
- global.aStoredPlyrSped = Var.SpedId[m]*3;
- global.aMadPhase = true;
- } else {
- image_speed = 0.30;
- global.aStoredPlyrAttk = Var.AttkId[m];
- global.aStoredPlyrSped = Var.SpedId[m];
- global.aMadPhase = false;
- }
- }
- if o = 1 {
- sprite_index = petey_front;
- if global.bHealth < global.bStoredPlyrHlth/1.5 {
- image_speed = 0.60;
- global.bStoredPlyrAttk = Var.AttkId[m]*3;
- global.bStoredPlyrSped = Var.SpedId[m]*3;
- global.bMadPhase = true;
- } else {
- image_speed = 0.30;
- global.bStoredPlyrAttk = Var.AttkId[m];
- global.bStoredPlyrSped = Var.SpedId[m];
- global.bMadPhase = false;
- }
- }
- }
- if m = 30 {
- if o = 0 {
- sprite_index = bill_cipher_back;
- if global.aHealth < global.aStoredPlyrHlth/2 {
- image_speed = 0.40;
- global.aStoredPlyrSpat = Var.SpatId[m]*3;
- global.aStoredPlyrSped = Var.SpedId[m]*3;
- global.aMadPhase = true;
- } else {
- image_speed = 0.21;
- global.aStoredPlyrSpat = Var.SpatId[m];
- global.aStoredPlyrSped = Var.SpedId[m];
- global.aMadPhase = false;
- }
- }
- if o = 1 {
- sprite_index = bill_cipher_front;
- if global.bHealth < global.bStoredPlyrHlth/2 {
- image_speed = 0.40;
- global.bStoredPlyrSpat = Var.SpatId[m]*3;
- global.bStoredPlyrSped = Var.SpedId[m]*3;
- global.bMadPhase = true;
- } else {
- image_speed = 0.21;
- global.bStoredPlyrSpat = Var.SpatId[m];
- global.bStoredPlyrSped = Var.SpedId[m];
- global.bMadPhase = false;
- }
- }
- }
- if m = 31 {
- if o = 0 {
- sprite_index = mmo_back;
- }
- if o = 1 {
- sprite_index = mmo_front;
- }
- image_speed = 0.18;
- }
- if m = 16 { // FOR BOWSER ONLY VVVVVVVVVVVVVVVVVV
- if idle_phase = 0 && can_idle < 900 {
- if o = 0 {
- sprite_index = bowser_back;
- if global.aHealth < global.aStoredPlyrHlth/1.5 {
- image_speed = 0.60;
- global.aStoredPlyrAttk = Var.AttkId[m]*3;
- global.aStoredPlyrSped = Var.SpedId[m]*4.5;
- global.aStoredPlyrSpat = Var.SpatId[m]*3;
- global.aMadPhase = true;
- } else {
- image_speed = 0.45;
- global.aStoredPlyrAttk = Var.AttkId[m];
- global.aStoredPlyrSped = Var.SpedId[m];
- global.aStoredPlyrSpat = Var.SpatId[m];
- global.aMadPhase = false;
- }
- }
- if o = 1 {
- sprite_index = bowser_front;
- if global.bHealth < global.bStoredPlyrHlth/1.5 {
- image_speed = 0.60;
- global.bStoredPlyrAttk = Var.AttkId[m]*3;
- global.bStoredPlyrSped = Var.SpedId[m]*4.5;
- global.bStoredPlyrSpat = Var.SpatId[m]*3;
- global.bMadPhase = true;
- } else {
- image_speed = 0.45;
- global.bStoredPlyrAttk = Var.AttkId[m];
- global.bStoredPlyrSped = Var.SpedId[m];
- global.bStoredPlyrSpat = Var.SpatId[m];
- global.bMadPhase = false;
- }
- }
- can_idle = irandom_range(-2620,940);
- }
- if idle_phase = 0 && can_idle >= 900 {
- image_index = 0;
- image_speed = 0.45;
- idle_phase = 1;
- }
- if (idle_phase = 1 && can_idle >= 900) {
- if o = 0 {
- sprite_index = bowser_back_idle;
- if global.aHealth < global.aStoredPlyrHlth/1.5 {
- image_speed = 0.60;
- global.aStoredPlyrAttk = Var.AttkId[m]*3;
- global.aStoredPlyrSped = Var.SpedId[m]*4.5;
- global.aStoredPlyrSpat = Var.SpatId[m]*3;
- global.aMadPhase = true;
- } else {
- image_speed = 0.42;
- global.aStoredPlyrAttk = Var.AttkId[m];
- global.aStoredPlyrSped = Var.SpedId[m];
- global.aStoredPlyrSpat = Var.SpatId[m];
- global.aMadPhase = false;
- }
- }
- if o = 1 {
- sprite_index = bowser_front_idle;
- if global.bHealth < global.bStoredPlyrHlth/1.5 {
- image_speed = 0.60;
- global.bStoredPlyrAttk = Var.AttkId[m]*3;
- global.bStoredPlyrSped = Var.SpedId[m]*4.5;
- global.bStoredPlyrSpat = Var.SpatId[m]*3;
- global.bMadPhase = true;
- } else {
- image_speed = 0.42;
- global.bStoredPlyrAttk = Var.AttkId[m];
- global.bStoredPlyrSped = Var.SpedId[m];
- global.bStoredPlyrSpat = Var.SpatId[m];
- global.bMadPhase = false;
- }
- }
- }
- if image_index >= 19 && idle_phase = 1 {
- can_idle = 0;
- idle_phase = 0;
- }
- if o = 0 && global.aHealth = 0 && idle_phase < 9 {
- idle_phase = 9;
- sprite_index = bowser_back_die;
- image_index = 0;
- image_speed = 0.3;
- }
- if o = 1 && global.bHealth = 0 && idle_phase < 9 {
- idle_phase = 9;
- sprite_index = bowser_front_die;
- image_index = 0;
- image_speed = 0.3;
- }
- if image_index >= 12 && idle_phase = 9 {
- image_index = 12;
- }
- }
- Draw Event:
- execute code:
- ///DRAW EVENT
- //x1 = x-64*2*1.2;
- //y1 = y-64*2*1.4;
- //x2 = x+64*2*1.2;
- //y2 = y-64*2*1.2;
- x1 = 128 * 1.2// + _xoff;
- y1 = 128 * 1.4// + _yoff;
- x2 = 128 * 1.2// + _xoff; //153.6
- y2 = 128 * 1.3// + _yoff;
- if o = 0 {
- aX1 = global.aX-x1;
- aY1 = global.aY-y1;
- aX2 = global.aX+x2;
- aY2 = global.aY-y2;
- }
- if o = 1 {
- bX1 = global.bX-x1;
- bY1 = global.bY-y1;
- bX2 = global.bX+x2;
- bY2 = global.bY-y2;
- }
- xdiff = x2-x1
- draw_self();
- if o = 0 && global.aMadPhase = false {
- draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,0,-1,1);
- }
- if o = 1 && global.bMadPhase = false {
- draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,0,-1,1);
- }
- if o = 0 && global.aMadPhase = true {
- draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,0,c_red,1);
- }
- if o = 1 && global.bMadPhase = true {
- draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,0,c_red,1);
- }
- draw_set_font(font0);
- draw_set_color(c_teal);
- if o = 0 && global.aHealth > 0 {
- draw_rectangle(x-x1,cy-y1,x+x2,cy-y2,false);
- }
- if o = 1 && global.bHealth > 0 {
- draw_rectangle(x-x1,y-y1,x+x2,y-y2,false);
- }
- aHlthPercent = (global.aHealth/global.aStoredPlyrHlth*100);
- bHlthPercent = (global.bHealth/global.bStoredPlyrHlth*100);
- //text_draw(x1,y1-100,"Error: "+string(bStoredPlyrSped[m,c]),c_black);
- if o = 0 {
- if aHlthPercent > 55 {
- draw_set_color(c_yellow);
- }
- if aHlthPercent > 23 && aHlthPercent < 55 {
- draw_set_color(c_lime);
- }
- if aHlthPercent < 23 {
- draw_set_color(c_red);
- }
- if global.aHealth > 0 {
- draw_rectangle(x-x1,cy-y1,x-x2+((x2*2)*(global.aHealth/global.aStoredPlyrHlth)),cy-y2,false)
- text_draw(x-x1,cy-y1-40,string(PlyrName[0]),c_yellow);
- if global.aStoredPlyrType2 = "" {
- text_draw(x-x1,cy-y1-24,string(global.aStoredPlyrType1),c_white);
- } else {
- text_draw(x-x1,cy-y1-24,string(global.aStoredPlyrType1)+"/"+string(global.aStoredPlyrType2),c_white);
- }
- text_draw(aX1,cy-y1+((cy-y2)-(cy-y1)),"HP: "+string(round(global.aHealth)),c_white);
- text_draw(aX1+string_width("HP: "+string(round(global.aHealth))),cy-y1+((cy-y2)-(cy-y1)),"/"+string(round(global.aStoredPlyrHlth)),c_white);
- //text_draw(aX1,aY1+40,"aCHit: "+string(global.aCHitMod),c_white);
- if BattleDummy.debugger = true {
- //text_draw(aX1,aY1+39,"aPlyrHlthCache: "+string(aStoredPlyrHlthCache[m,c]),c_black);
- //text_draw(aX1,aY1+55,"aX: "+string(aX1),c_black);
- //text_draw(aX1,aY1+69,"aX1: "+string(aX2*(global.aHealth/aStoredPlyrHlth[m,c])),c_black);
- text_draw(aX1,cy,"Damage: "+string(bDamage)+"#",c_aqua);
- if global.Player2Moving = true {
- bDamage = global.bDamageInflicted;
- } else {
- bDamage = 0;
- }
- }
- }
- }
- if o = 1 {
- if bHlthPercent > 55 {
- draw_set_color(c_yellow);
- }
- if bHlthPercent > 23 && bHlthPercent < 55 {
- draw_set_color(c_lime);
- }
- if bHlthPercent < 23 {
- draw_set_color(c_red);
- }
- if global.bHealth > 0 {
- draw_rectangle(x-x1,y-y1,x-x2+((x2*2)*(global.bHealth/global.bStoredPlyrHlth)),y-y2,false)
- text_draw(x-x1,y-y1-24,string(PlyrName[1]),c_yellow);
- if global.bStoredPlyrType2 = "" {
- text_draw(x-x1,y-y1+((y-y2)-(y-y1)),string(global.bStoredPlyrType1),c_white);
- } else {
- text_draw(x-x1,y-y1+((y-y2)-(y-y1)),string(global.bStoredPlyrType1)+"/"+string(global.bStoredPlyrType2),c_white);
- }
- //text_draw(bX1,bY1+40,"bCHit: "+string(global.bCHitMod),c_white);
- //text_draw(bX1,bY1+14*2/1.25,"HP: "+string(round(global.bHealth)),c_white);
- //text_draw(bX1+string_width("HP: "+string(round(global.bHealth))),bY1+14*2/1.25,"/"+string(round(global.bStoredPlyrHlth)),c_white);
- if BattleDummy.debugger = true {
- //text_draw(bX1,bY1+39,"bPlyrHlthCache: "+string(bStoredPlyrHlthCache[m,c]),c_black);
- //text_draw(bX1,bY1+55,"bX: "+string(bX1),c_black);
- //text_draw(bX1,bY1+71,"bX1: "+string(bX2*(global.bHealth/bStoredPlyrHlth[m,c])),c_black);
- text_draw(bX1+string_width("HP: "+string(round(global.bHealth))),bY1-(y1+((y-y2)-(y-y1)))*0.5,"/"+string(round(global.bStoredPlyrHlth)),c_white);
- text_draw(bX1,bY1+87,"1. "+string(Var.MoveName[bPlyrMove1])+"#"+"2. "+string(Var.MoveName[bPlyrMove2])+"#"+"3. "+string(Var.MoveName[bPlyrMove3])+"#"+"4. "+string(Var.MoveName[bPlyrMove4])+"#"+"Damage: "+string(aDamage)+"#",c_aqua);
- if global.Player1Moving = true {
- aDamage = global.aDamageInflicted;
- } else {
- aDamage = 0;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment