mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
battle items
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -296,6 +296,19 @@ class PokeBattle_Battler
|
||||
return @pokemon && @pokemon.isSpecies?(species)
|
||||
end
|
||||
|
||||
def hasBodyOf?(check_species)
|
||||
return @pokemon.hasBodyOf?(check_species)
|
||||
end
|
||||
|
||||
def hasHeadOf?(check_species)
|
||||
return @pokemon.hasHeadOf?(check_species)
|
||||
end
|
||||
|
||||
|
||||
def isFusionOf(check_species)
|
||||
return @pokemon.isFusionOf(check_species)
|
||||
end
|
||||
|
||||
# Returns the active types of this Pokémon. The array should not include the
|
||||
# same type more than once, and should not include any invalid type numbers
|
||||
# (e.g. -1).
|
||||
|
||||
@@ -20,7 +20,7 @@ BattleHandlers::SpeedCalcItem.copy(:MACHOBRACE,:POWERANKLET,:POWERBAND,
|
||||
|
||||
BattleHandlers::SpeedCalcItem.add(:QUICKPOWDER,
|
||||
proc { |item,battler,mult|
|
||||
next mult*2 if battler.isSpecies?(:DITTO) &&
|
||||
next mult*2 if battler.isFusionOf(:DITTO) &&
|
||||
!battler.effects[PBEffects::Transform]
|
||||
}
|
||||
)
|
||||
@@ -444,7 +444,7 @@ BattleHandlers::AccuracyCalcTargetItem.copy(:BRIGHTPOWDER,:LAXINCENSE)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:ADAMANTORB,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
if user.isSpecies?(:DIALGA) && (type == :DRAGON || type == :STEEL)
|
||||
if user.isFusionOf(:DIALGA) && (type == :DRAGON || type == :STEEL)
|
||||
mults[:base_damage_multiplier] *= 1.2
|
||||
end
|
||||
}
|
||||
@@ -572,7 +572,7 @@ BattleHandlers::DamageCalcUserItem.add(:GRASSGEM,
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:GRISEOUSORB,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
if user.isSpecies?(:GIRATINA) && (type == :DRAGON || type == :GHOST)
|
||||
if user.isFusionOf(:GIRATINA) && (type == :DRAGON || type == :GHOST)
|
||||
mults[:base_damage_multiplier] *= 1.2
|
||||
end
|
||||
}
|
||||
@@ -608,7 +608,7 @@ BattleHandlers::DamageCalcUserItem.add(:LIFEORB,
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:LIGHTBALL,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
if user.isSpecies?(:PIKACHU)
|
||||
if user.isFusionOf(:PIKACHU)
|
||||
mults[:attack_multiplier] *= 2
|
||||
end
|
||||
}
|
||||
@@ -616,7 +616,7 @@ BattleHandlers::DamageCalcUserItem.add(:LIGHTBALL,
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:LUSTROUSORB,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
if user.isSpecies?(:PALKIA) && (type == :DRAGON || type == :WATER)
|
||||
if user.isFusionOf(:PALKIA) && (type == :DRAGON || type == :WATER)
|
||||
mults[:base_damage_multiplier] *= 1.2
|
||||
end
|
||||
}
|
||||
@@ -745,7 +745,7 @@ BattleHandlers::DamageCalcUserItem.copy(:SOFTSAND,:EARTHPLATE)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:SOULDEW,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
next if !user.isSpecies?(:LATIAS) && !user.isSpecies?(:LATIOS)
|
||||
next if !user.isFusionOf(:LATIAS) && !user.isFusionOf?(:LATIOS)
|
||||
if Settings::SOUL_DEW_POWERS_UP_TYPES
|
||||
mults[:final_damage_multiplier] *= 1.2 if type == :PSYCHIC || type == :DRAGON
|
||||
else
|
||||
@@ -770,12 +770,15 @@ BattleHandlers::DamageCalcUserItem.add(:STEELGEM,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:THICKCLUB,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
if (user.isSpecies?(:CUBONE) || user.isSpecies?(:MAROWAK)) && move.physicalMove?
|
||||
mults[:attack_multiplier] *= 2
|
||||
end
|
||||
}
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
if (user.isFusionOf(:CUBONE) || user.isFusionOf(:MAROWAK)) && move.physicalMove?
|
||||
mults[:attack_multiplier] *= 2
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::DamageCalcUserItem.add(:TWISTEDSPOON,
|
||||
@@ -887,7 +890,7 @@ BattleHandlers::DamageCalcTargetItem.add(:KEBIABERRY,
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:METALPOWDER,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
if target.isSpecies?(:DITTO) && !target.effects[PBEffects::Transform]
|
||||
if target.isFusionOf(:DITTO) && !target.effects[PBEffects::Transform]
|
||||
mults[:defense_multiplier] *= 1.5
|
||||
end
|
||||
}
|
||||
@@ -932,7 +935,7 @@ BattleHandlers::DamageCalcTargetItem.add(:SHUCABERRY,
|
||||
BattleHandlers::DamageCalcTargetItem.add(:SOULDEW,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
next if Settings::SOUL_DEW_POWERS_UP_TYPES
|
||||
next if !target.isSpecies?(:LATIAS) && !target.isSpecies?(:LATIOS)
|
||||
next if !target.isFusionOf(:LATIAS) && !target.isFusionOf?(:LATIOS)
|
||||
if move.specialMove? && !user.battle.rules["souldewclause"]
|
||||
mults[:defense_multiplier] *= 1.5
|
||||
end
|
||||
@@ -963,7 +966,7 @@ BattleHandlers::DamageCalcTargetItem.add(:YACHEBERRY,
|
||||
|
||||
BattleHandlers::CriticalCalcUserItem.add(:LUCKYPUNCH,
|
||||
proc { |item,user,target,c|
|
||||
next c+2 if user.isSpecies?(:CHANSEY)
|
||||
next c+2 if user.isFusionOf(:CHANSEY)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -977,7 +980,7 @@ BattleHandlers::CriticalCalcUserItem.copy(:RAZORCLAW,:SCOPELENS)
|
||||
|
||||
BattleHandlers::CriticalCalcUserItem.add(:STICK,
|
||||
proc { |item,user,target,c|
|
||||
next c+2 if user.isSpecies?(:FARFETCHD)
|
||||
next c+2 if user.isFusionOf(:FARFETCHD)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -144,6 +144,29 @@ class Pokemon
|
||||
@species == GameData::Species.get(check_species).species)
|
||||
end
|
||||
|
||||
def hasBodyOf?(check_species)
|
||||
if !self.isFusion?
|
||||
return isSpecies(check_species)
|
||||
end
|
||||
bodySpecies = getBodyID(species)
|
||||
checkSpeciesId = getID(nil,check_species)
|
||||
return bodySpecies == checkSpeciesId
|
||||
end
|
||||
|
||||
def hasHeadOf?(check_species)
|
||||
if !self.isFusion?
|
||||
return isSpecies(check_species)
|
||||
end
|
||||
headSpecies = getHeadID(species)
|
||||
checkSpeciesId = getID(nil,check_species)
|
||||
return headSpecies == checkSpeciesId
|
||||
end
|
||||
|
||||
|
||||
def isFusionOf(check_species)
|
||||
return hasBodyOf?(check_species) || hasHeadOf?(check_species)
|
||||
end
|
||||
|
||||
def dexNum
|
||||
return species_data.id_number
|
||||
end
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -254,31 +254,6 @@ ItemHandlers::UseOnPokemon.add(:TRANSGENDERSTONE, proc { |item, pokemon, scene|
|
||||
end
|
||||
})
|
||||
|
||||
ItemHandlers::UseOnPokemon.add(:ABILITYCAPSULE, proc { |item, poke, scene|
|
||||
abilityList = poke.getAbilityList
|
||||
abil1 = 0; abil2 = 0
|
||||
for i in abilityList
|
||||
abil1 = i[0] if i[1] == 0
|
||||
abil2 = i[1] if i[1] == 1
|
||||
end
|
||||
if poke.abilityIndex() >= 2 || abil1 == abil2
|
||||
scene.pbDisplay(_INTL("It won't have any effect."))
|
||||
next false
|
||||
end
|
||||
if Kernel.pbConfirmMessage(_INTL("Do you want to change {1}'s ability?",
|
||||
poke.name))
|
||||
|
||||
if poke.abilityIndex() == 0
|
||||
poke.setAbility(1)
|
||||
else
|
||||
poke.setAbility(0)
|
||||
end
|
||||
scene.pbDisplay(_INTL("{1}'s ability was changed!", poke.name))
|
||||
next true
|
||||
end
|
||||
next false
|
||||
|
||||
})
|
||||
|
||||
#NOT FULLY IMPLEMENTED
|
||||
ItemHandlers::UseOnPokemon.add(:SECRETCAPSULE, proc { |item, poke, scene|
|
||||
@@ -1078,31 +1053,31 @@ ItemHandlers::UseOnPokemon.add(:TRANSGENDERSTONE, proc { |item, pokemon, scene|
|
||||
end
|
||||
})
|
||||
|
||||
ItemHandlers::UseOnPokemon.add(:ABILITYCAPSULE, proc { |item, poke, scene|
|
||||
abilityList = poke.getAbilityList
|
||||
abil1 = 0; abil2 = 0
|
||||
for i in abilityList
|
||||
abil1 = i[0] if i[1] == 0
|
||||
abil2 = i[1] if i[1] == 1
|
||||
end
|
||||
if poke.abilityIndex() >= 2 || abil1 == abil2
|
||||
scene.pbDisplay(_INTL("It won't have any effect."))
|
||||
next false
|
||||
end
|
||||
if Kernel.pbConfirmMessage(_INTL("Do you want to change {1}'s ability?",
|
||||
poke.name))
|
||||
|
||||
if poke.abilityIndex() == 0
|
||||
poke.setAbility(1)
|
||||
else
|
||||
poke.setAbility(0)
|
||||
end
|
||||
scene.pbDisplay(_INTL("{1}'s ability was changed!", poke.name))
|
||||
next true
|
||||
end
|
||||
next false
|
||||
|
||||
})
|
||||
# ItemHandlers::UseOnPokemon.add(:ABILITYCAPSULE, proc { |item, poke, scene|
|
||||
# abilityList = poke.getAbilityList
|
||||
# abil1 = 0; abil2 = 0
|
||||
# for i in abilityList
|
||||
# abil1 = i[0] if i[1] == 0
|
||||
# abil2 = i[1] if i[1] == 1
|
||||
# end
|
||||
# if poke.abilityIndex() >= 2 || abil1 == abil2
|
||||
# scene.pbDisplay(_INTL("It won't have any effect."))
|
||||
# next false
|
||||
# end
|
||||
# if Kernel.pbConfirmMessage(_INTL("Do you want to change {1}'s ability?",
|
||||
# poke.name))
|
||||
#
|
||||
# if poke.abilityIndex() == 0
|
||||
# poke.setAbility(1)
|
||||
# else
|
||||
# poke.setAbility(0)
|
||||
# end
|
||||
# scene.pbDisplay(_INTL("{1}'s ability was changed!", poke.name))
|
||||
# next true
|
||||
# end
|
||||
# next false
|
||||
#
|
||||
# })
|
||||
|
||||
#NOT FULLY IMPLEMENTED
|
||||
ItemHandlers::UseOnPokemon.add(:SECRETCAPSULE, proc { |item, poke, scene|
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user