public override Effect ApplyMove(PokemonScript enemy, PokemonScript ours) { enemy.hp -= (int)(0.8 * ours.getAttackStat()); //damage them enemy.applyStatus(PokemonScript.Status.Grappled); //grapple them enemyFromLastMove = enemy; //keep track of this for printing... return(null); }
public override Effect ApplyMove(PokemonScript enemy, PokemonScript ours) { if (passesProbability(probOfSucceeding)) { enemy.applyStatus(PokemonScript.Status.Disabled); enemy.hp -= (int)(0.2 * ours.getAttackStat()); } probOfSucceeding *= 3.0f / 4; //decrease the probability return(new RemoveStatusAfterTurnEffect(enemy, 1, PokemonScript.Status.Disabled)); }
/** * Shows Select Move UI. */ public void showMoves(int playerNumber) { selectMovePanel.SetActive(true); PokemonScript currPlayer = (playerNumber == 1)? player1: player2; for (int i = 0; i < 6; i++) { Text txt = selectMoveButtons [i].GetComponentInChildren <Text> (); txt.text = currPlayer.moves [i].GetName(); } }
public override Effect ApplyMove(PokemonScript enemy, PokemonScript ours) { lastMoveOurName = ours.pokemonName; escapedGrapple = ours.isStatus(PokemonScript.Status.Grappled); if (escapedGrapple) { enemy.hp -= (int)(0.7 * ours.getAttackStat()); } else { enemy.hp -= (int)(0.2 * ours.getAttackStat()); } return(null); }
public override Effect ApplyMove(PokemonScript enemy, PokemonScript ours) { lastMoveOurName = ours.pokemonName; if (ours.isStatus(PokemonScript.Status.Grappled)) { enemy.hp -= (int)(ours.getAttackStat() * 0.6); ours.removeStatus(PokemonScript.Status.Grappled); lastMoveSucceeded = true; } else { lastMoveSucceeded = false; } return(null); }
void CreatePokemonFromName(int playerNumber, string pokemonName) { GameObject go = GameObject.Find("Player" + playerNumber); PokemonScript ps = go.GetComponent <PokemonScript> (); SpriteRenderer sr = go.GetComponent <SpriteRenderer> (); Debug.Log(ps); //kills all moves that exist in it Move[] moves = go.GetComponents <Move> (); foreach (Move m in moves) { DestroyImmediate(m); } sr.sprite = spritesDict [pokemonName]; ps.pokemonName = pokemonName; switch (pokemonName) { case "Celebi": ps.MAX_HEALTH = 30; ps.speedStat = 90; ps.setAttackStat(85); go.AddComponent <ClawGrab> (); go.AddComponent <ThrowCubeMove> (); go.AddComponent <FlankManeuver> (); go.AddComponent <WinchWhip> (); go.AddComponent <RevEngine> (); go.AddComponent <AllNatural> (); break; case "Gardevoir": ps.MAX_HEALTH = 150; ps.speedStat = 60; ps.setAttackStat(80); go.AddComponent <FlankManeuver> (); go.AddComponent <Disable> (); go.AddComponent <SpinAttack> (); go.AddComponent <WinchWhip> (); go.AddComponent <Riposte> (); go.AddComponent <Heal> (); break; } //TODO: finish set up for other pokemons }
public override Effect ApplyMove(PokemonScript ours, PokemonScript enemy) { int rand = Random.Range(1, 100); int choose = Random.Range(1, 2); if (rand <= 20) { if (choose == 1) { enemy.hp = 0; } else { ours.hp = 0; } } return(null); }
public override Effect ApplyMove(PokemonScript enemy, PokemonScript ours) { enemy.hp -= (int)(0.4 * ours.getAttackStat()); return(null); }
public override Effect ApplyMove(PokemonScript enemy, PokemonScript ours) { ours.hp += 10; return(null); }
public RemoveStatusAfterTurnEffect(PokemonScript dude, int turns, PokemonScript.Status st) { this.effectedBoi = dude; this.turnsLeft = turns; this.st = st; }
public override Effect ApplyMove(PokemonScript enemy, PokemonScript ours) { // +5 speed for 2 turns ;;;;;; return(null); }
public abstract Effect ApplyMove(PokemonScript enemy, PokemonScript ours);
public override Effect ApplyMove(PokemonScript enemy, PokemonScript ours) { enemy.hp -= (int)((ours.MAX_HEALTH - ours.hp) * TANK_CONSTANT); ours.hp += (int)(0.5 * (ours.MAX_HEALTH - ours.hp) * TANK_CONSTANT); return(null); }
public override Effect ApplyMove(PokemonScript enemy, PokemonScript ours) { ours.speedStat = (int)(1.2f * ours.speedStat); return(null); }