mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Merge branch 'dev' into dev-gen8
This commit is contained in:
@@ -27,7 +27,7 @@ module GameData
|
||||
"Target" => [:target, "e", :Target],
|
||||
"Priority" => [:priority, "i"],
|
||||
"FunctionCode" => [:function_code, "s"],
|
||||
"Flags" => [:flags, "s"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"EffectChance" => [:effect_chance, "u"],
|
||||
"Description" => [:description, "q"]
|
||||
}
|
||||
@@ -46,7 +46,8 @@ module GameData
|
||||
@target = hash[:target] || :None
|
||||
@priority = hash[:priority] || 0
|
||||
@function_code = hash[:function_code] || "000"
|
||||
@flags = hash[:flags] || ""
|
||||
@flags = hash[:flags] || []
|
||||
@flags = [@flags] if !@flags.is_a?(Array)
|
||||
@effect_chance = hash[:effect_chance] || 0
|
||||
@real_description = hash[:description] || "???"
|
||||
end
|
||||
|
||||
@@ -38,7 +38,7 @@ class PokeBattle_Move
|
||||
@addlEffect = move.effect_chance
|
||||
@target = move.target
|
||||
@priority = move.priority
|
||||
@flags = move.flags
|
||||
@flags = move.flags.clone
|
||||
@calcType = nil
|
||||
@powerBoost = false # For Aerilate, Pixilate, Refrigerate, Galvanize
|
||||
@snatched = false
|
||||
@@ -114,18 +114,18 @@ class PokeBattle_Move
|
||||
def canSnatch?; return false; end
|
||||
def canMagicCoat?; return false; end
|
||||
|
||||
def contactMove?; return @flags[/a/]; end
|
||||
def canProtectAgainst?; return @flags[/b/]; end
|
||||
def canMirrorMove?; return @flags[/e/]; end
|
||||
def thawsUser?; return @flags[/g/]; end
|
||||
def highCriticalRate?; return @flags[/h/]; end
|
||||
def bitingMove?; return @flags[/i/]; end
|
||||
def punchingMove?; return @flags[/j/]; end
|
||||
def soundMove?; return @flags[/k/]; end
|
||||
def powderMove?; return @flags[/l/]; end
|
||||
def pulseMove?; return @flags[/m/]; end
|
||||
def bombMove?; return @flags[/n/]; end
|
||||
def danceMove?; return @flags[/o/]; end
|
||||
def contactMove?; return @flags.any? { |f| f[/^Contact$/i] }; end
|
||||
def canProtectAgainst?; return @flags.any? { |f| f[/^CanProtect$/i] }; end
|
||||
def canMirrorMove?; return @flags.any? { |f| f[/^CanMirrorMove$/i] }; end
|
||||
def thawsUser?; return @flags.any? { |f| f[/^ThawsUser$/i] }; end
|
||||
def highCriticalRate?; return @flags.any? { |f| f[/^HighCriticalHitRate$/i] }; end
|
||||
def bitingMove?; return @flags.any? { |f| f[/^Biting$/i] }; end
|
||||
def punchingMove?; return @flags.any? { |f| f[/^Punching$/i] }; end
|
||||
def soundMove?; return @flags.any? { |f| f[/^Sound$/i] }; end
|
||||
def powderMove?; return @flags.any? { |f| f[/^Powder$/i] }; end
|
||||
def pulseMove?; return @flags.any? { |f| f[/^Pulse$/i] }; end
|
||||
def bombMove?; return @flags.any? { |f| f[/^Bomb$/i] }; end
|
||||
def danceMove?; return @flags.any? { |f| f[/^Dance$/i] }; end
|
||||
|
||||
# Causes perfect accuracy (param=1) and double damage (param=2).
|
||||
def tramplesMinimize?(_param=1); return false; end
|
||||
|
||||
@@ -1127,7 +1127,7 @@ class PokeBattle_Move_0AE < PokeBattle_Move
|
||||
|
||||
def pbFailsAgainstTarget?(user,target)
|
||||
if !target.lastRegularMoveUsed ||
|
||||
!GameData::Move.get(target.lastRegularMoveUsed).flags[/e/] # Not copyable by Mirror Move
|
||||
!GameData::Move.get(target.lastRegularMoveUsed).flags.any? { |f| f[/^CanMirrorMove$/i] }
|
||||
@battle.pbDisplay(_INTL("The mirror move failed!"))
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -1742,7 +1742,7 @@ class PokeBattle_AI
|
||||
score -= 40
|
||||
if skill>=PBTrainerAI.highSkill
|
||||
score -= 100 if !target.lastRegularMoveUsed ||
|
||||
!GameData::Move.get(target.lastRegularMoveUsed).flags[/e/] # Not copyable by Mirror Move
|
||||
!GameData::Move.get(target.lastRegularMoveUsed).flags.any? { |f| f[/^CanMirrorMove$/i] }
|
||||
end
|
||||
#---------------------------------------------------------------------------
|
||||
when "0AF"
|
||||
|
||||
@@ -351,6 +351,19 @@ module Compiler
|
||||
print _INTL("Warning: Move {1} was defined as Physical or Special but had a base damage of 0. Changing it to a Status move.\r\n{2}", line[2], FileLineData.linereport)
|
||||
line[6] = 2
|
||||
end
|
||||
flags = []
|
||||
flags.push("Contact") if line[12][/a/]
|
||||
flags.push("CanProtect") if line[12][/b/]
|
||||
flags.push("CanMirrorMove") if line[12][/e/]
|
||||
flags.push("ThawsUser") if line[12][/g/]
|
||||
flags.push("HighCriticalHitRate") if line[12][/h/]
|
||||
flags.push("Bite") if line[12][/i/]
|
||||
flags.push("Punch") if line[12][/j/]
|
||||
flags.push("Sound") if line[12][/k/]
|
||||
flags.push("Powder") if line[12][/l/]
|
||||
flags.push("Pulse") if line[12][/m/]
|
||||
flags.push("Bomb") if line[12][/n/]
|
||||
flags.push("Dance") if line[12][/o/]
|
||||
# Construct move hash
|
||||
move_hash = {
|
||||
:id => move_id,
|
||||
@@ -364,7 +377,7 @@ module Compiler
|
||||
:effect_chance => line[9],
|
||||
:target => line[10],
|
||||
:priority => line[11],
|
||||
:flags => line[12],
|
||||
:flags => flags,
|
||||
:description => line[13]
|
||||
}
|
||||
# Add move's data to records
|
||||
|
||||
@@ -188,7 +188,7 @@ module Compiler
|
||||
f.write("Target = #{move.target}\r\n")
|
||||
f.write("Priority = #{move.priority}\r\n") if move.priority != 0
|
||||
f.write("FunctionCode = #{move.function_code}\r\n")
|
||||
f.write("Flags = #{move.flags}\r\n") if !nil_or_empty?(move.flags)
|
||||
f.write("Flags = #{move.flags.join(",")}\r\n") if move.flags && move.flags.length > 0
|
||||
f.write("EffectChance = #{move.effect_chance}\r\n") if move.effect_chance > 0
|
||||
f.write("Description = #{move.real_description}\r\n")
|
||||
end
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1172
PBS/Gen 7/moves.txt
1172
PBS/Gen 7/moves.txt
File diff suppressed because it is too large
Load Diff
1172
PBS/moves.txt
1172
PBS/moves.txt
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user