Esempio n. 1
0
 //OnBeforeMove
 public static Battle.RelayVar ParOnBeforeMove(Battle battle, Battle.RelayVar relayVar, TargetableElement target = null, BattleElement source = null, EffectData effect = null)
 {
     if (RandomScript.RandomChance(1, 4))
     {
         relayVar.EndEventHere();
     }
     return(relayVar);
 }
Esempio n. 2
0
 public static Battle.RelayVar FlinchOnBeforeMove(Battle battle, Battle.RelayVar relayVar, TargetableElement target = null, BattleElement source = null, EffectData effect = null)
 {
     Debug.Log("You are not sup-POSED to be hia?");
     if (battle.RunEvent("Flinch", target).getEndEvent())
     {
         return(relayVar);
     }
     relayVar.EndEventHere();
     return(relayVar);
 }
Esempio n. 3
0
    //OnTakeItem
    public static Battle.RelayVar MegaStoneOnTakeItem(Battle battle, Battle.RelayVar relayVar, TargetableElement target = null, BattleElement source = null, EffectData effect = null)
    {
        ItemData item    = (ItemData)relayVar.effectValue;
        Pokemon  pSource = ((PokemonCharacter)source).pokemonData;

        if (item.megaEvolves == pSource.baseTemplate.baseSpecies)
        {
            relayVar.EndEventHere();
        }
        else
        {
            relayVar.booleanValue = true;
        }

        return(relayVar);
    }
Esempio n. 4
0
    public static Battle.RelayVar ConfusionOnBeforeMove(Battle battle, Battle.RelayVar relayVar, TargetableElement target = null, BattleElement source = null, EffectData effect = null)
    {
        Pokemon poke = ((PokemonCharacter)target.sourceElement).pokemonData;

        //Discount time not here anymore

        if (!RandomScript.RandomChance(1, 3))
        {
            return(relayVar);
        }
        battle.Damage(battle.GetDamage(poke, poke, null, 40), poke.targetData, poke.myPokemon,
                      new MoveData(id: "confused",
                                   effectType: Globals.EffectTypes.Move,
                                   type: Globals.Type.Unknown));

        relayVar.EndEventHere();
        return(relayVar);
    }
Esempio n. 5
0
 public static Battle.RelayVar EndEventOnTakeItem(Battle battle, Battle.RelayVar relayVar, TargetableElement target = null, BattleElement source = null, EffectData effect = null)
 {
     relayVar.EndEventHere();
     return(relayVar);
 }