mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 20:24:18 +01:00
Move high crit to a flag and update move table
This commit is contained in:
parent
e94a0e2ddf
commit
c9d1ee3c4a
@ -57,7 +57,7 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectSuperFang
|
||||
.4byte BattleScript_EffectDragonRage
|
||||
.4byte BattleScript_EffectTrap
|
||||
.4byte BattleScript_EffectHighCritical
|
||||
.4byte BattleScript_EffectPlaceholder43
|
||||
.4byte BattleScript_EffectDoubleHit
|
||||
.4byte BattleScript_EffectRecoilIfMiss
|
||||
.4byte BattleScript_EffectMist
|
||||
@ -110,14 +110,14 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectConversion2
|
||||
.4byte BattleScript_EffectLockOn
|
||||
.4byte BattleScript_EffectSketch
|
||||
.4byte BattleScript_EffectUnused60//Thaw
|
||||
.4byte BattleScript_EffectUnused60
|
||||
.4byte BattleScript_EffectSleepTalk
|
||||
.4byte BattleScript_EffectDestinyBond
|
||||
.4byte BattleScript_EffectFlail
|
||||
.4byte BattleScript_EffectSpite
|
||||
.4byte BattleScript_EffectFalseSwipe
|
||||
.4byte BattleScript_EffectHealBell
|
||||
.4byte BattleScript_EffectQuickAttack
|
||||
.4byte BattleScript_EffectPlaceholder103
|
||||
.4byte BattleScript_EffectTripleKick
|
||||
.4byte BattleScript_EffectThief
|
||||
.4byte BattleScript_EffectMeanLook
|
||||
@ -214,7 +214,7 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectSecretPower
|
||||
.4byte BattleScript_EffectDoubleEdge
|
||||
.4byte BattleScript_EffectTeeterDance
|
||||
.4byte BattleScript_EffectBlazeKick
|
||||
.4byte BattleScript_EffectPlaceholder200
|
||||
.4byte BattleScript_EffectMudSport
|
||||
.4byte BattleScript_EffectPoisonFang
|
||||
.4byte BattleScript_EffectWeatherBall
|
||||
@ -223,7 +223,7 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectCosmicPower
|
||||
.4byte BattleScript_EffectSkyUppercut
|
||||
.4byte BattleScript_EffectBulkUp
|
||||
.4byte BattleScript_EffectPoisonTail
|
||||
.4byte BattleScript_EffectPlaceholder209
|
||||
.4byte BattleScript_EffectWaterSport
|
||||
.4byte BattleScript_EffectCalmMind
|
||||
.4byte BattleScript_EffectDragonDance
|
||||
@ -235,7 +235,7 @@ BattleScript_EffectAccuracyUp::
|
||||
BattleScript_EffectAlwaysHit::
|
||||
BattleScript_EffectSpecialAttackDown::
|
||||
BattleScript_EffectSpecialDefenseDown::
|
||||
BattleScript_EffectHighCritical::
|
||||
BattleScript_EffectPlaceholder43::
|
||||
BattleScript_EffectAccuracyUp2::
|
||||
BattleScript_EffectEvasionUp2::
|
||||
BattleScript_EffectSpecialAttackDown2::
|
||||
@ -245,12 +245,14 @@ BattleScript_EffectEvasionDownHit::
|
||||
BattleScript_EffectVitalThrow::
|
||||
BattleScript_EffectUnused60::
|
||||
BattleScript_EffectFalseSwipe::
|
||||
BattleScript_EffectQuickAttack::
|
||||
BattleScript_EffectPlaceholder103::
|
||||
BattleScript_EffectUnused6e::
|
||||
BattleScript_EffectPursuit::
|
||||
BattleScript_EffectUnused83::
|
||||
BattleScript_EffectUnused8d::
|
||||
BattleScript_EffectUnusedA3::
|
||||
BattleScript_EffectPlaceholder200::
|
||||
BattleScript_EffectPlaceholder209:
|
||||
BattleScript_EffectHit::
|
||||
jumpifnotmove MOVE_SURF, BattleScript_HitFromAtkCanceler
|
||||
jumpifnostatus3 BS_TARGET, STATUS3_UNDERWATER, BattleScript_HitFromAtkCanceler
|
||||
@ -288,7 +290,7 @@ BattleScript_MoveEnd::
|
||||
end
|
||||
|
||||
BattleScript_MakeMoveMissed::
|
||||
orbyte gMoveResultFlags, MOVE_RESULT_MISSED
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED
|
||||
BattleScript_PrintMoveMissed::
|
||||
attackstring
|
||||
ppreduce
|
||||
@ -335,8 +337,7 @@ BattleScript_CantMakeAsleep::
|
||||
waitmessage 0x40
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectPoisonHit::
|
||||
BattleScript_EffectPoisonTail::
|
||||
BattleScript_EffectPoisonHit:
|
||||
setmoveeffect MOVE_EFFECT_POISON
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
#define EFFECT_SUPER_FANG 40
|
||||
#define EFFECT_DRAGON_RAGE 41
|
||||
#define EFFECT_TRAP 42
|
||||
#define EFFECT_HIGH_CRITICAL 43
|
||||
#define EFFECT_PLACEHOLDER_43 43
|
||||
#define EFFECT_DOUBLE_HIT 44
|
||||
#define EFFECT_RECOIL_IF_MISS 45
|
||||
#define EFFECT_MIST 46
|
||||
@ -104,7 +104,7 @@
|
||||
#define EFFECT_SPITE 100
|
||||
#define EFFECT_FALSE_SWIPE 101
|
||||
#define EFFECT_HEAL_BELL 102
|
||||
#define EFFECT_QUICK_ATTACK 103
|
||||
#define EFFECT_PLACEHOLDER_103 103
|
||||
#define EFFECT_TRIPLE_KICK 104
|
||||
#define EFFECT_THIEF 105
|
||||
#define EFFECT_MEAN_LOOK 106
|
||||
@ -201,7 +201,7 @@
|
||||
#define EFFECT_SECRET_POWER 197
|
||||
#define EFFECT_DOUBLE_EDGE 198
|
||||
#define EFFECT_TEETER_DANCE 199
|
||||
#define EFFECT_BLAZE_KICK 200
|
||||
#define EFFECT_PLACEHOLDER_200 200
|
||||
#define EFFECT_MUD_SPORT 201
|
||||
#define EFFECT_POISON_FANG 202
|
||||
#define EFFECT_WEATHER_BALL 203
|
||||
@ -210,7 +210,7 @@
|
||||
#define EFFECT_COSMIC_POWER 206
|
||||
#define EFFECT_SKY_UPPERCUT 207
|
||||
#define EFFECT_BULK_UP 208
|
||||
#define EFFECT_POISON_TAIL 209
|
||||
#define EFFECT_PLACEHOLDER_209 209
|
||||
#define EFFECT_WATER_SPORT 210
|
||||
#define EFFECT_CALM_MIND 211
|
||||
#define EFFECT_DRAGON_DANCE 212
|
||||
|
@ -20,7 +20,8 @@
|
||||
#define TYPE_ICE 0x0f
|
||||
#define TYPE_DRAGON 0x10
|
||||
#define TYPE_DARK 0x11
|
||||
#define NUMBER_OF_MON_TYPES 0x12
|
||||
#define TYPE_FAIRY 0x12
|
||||
#define NUMBER_OF_MON_TYPES 0x13
|
||||
|
||||
// Pokemon egg groups
|
||||
#define EGG_GROUP_NONE 0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -364,6 +364,7 @@ struct BattleMove
|
||||
u8 target;
|
||||
s8 priority;
|
||||
u8 flags;
|
||||
u8 split;
|
||||
};
|
||||
|
||||
#define FLAG_MAKES_CONTACT 0x1
|
||||
@ -372,6 +373,11 @@ struct BattleMove
|
||||
#define FLAG_SNATCH_AFFECTED 0x8
|
||||
#define FLAG_MIRROR_MOVE_AFFECTED 0x10
|
||||
#define FLAG_KINGSROCK_AFFECTED 0x20
|
||||
#define FLAG_HIGH_CRIT 0x40
|
||||
|
||||
#define SPLIT_PHYSICAL 0x0
|
||||
#define SPLIT_SPECIAL 0x1
|
||||
#define SPLIT_STATUS 0x2
|
||||
|
||||
struct SpindaSpot
|
||||
{
|
||||
|
@ -82,6 +82,7 @@ enum
|
||||
LIST_ITEM_STATUS2,
|
||||
LIST_ITEM_STATUS3,
|
||||
LIST_ITEM_SIDE_STATUS,
|
||||
LIST_ITEM_VARIOUS,
|
||||
LIST_ITEM_COUNT
|
||||
};
|
||||
|
||||
@ -156,6 +157,7 @@ static const u8 sText_LightScreen[] = _("Light Screen");
|
||||
static const u8 sText_Spikes[] = _("Spikes");
|
||||
static const u8 sText_Safeguard[] = _("Safeguard");
|
||||
static const u8 sText_Mist[] = _("Mist");
|
||||
static const u8 sText_ShowOpponentHP[] = _("Opponent Hp");
|
||||
|
||||
static const u8 sText_EmptyString[] = _("");
|
||||
|
||||
|
@ -1282,10 +1282,7 @@ static void atk04_critcalc(void)
|
||||
gPotentialItemEffectBattler = gBattlerAttacker;
|
||||
|
||||
critChance = 2 * ((gBattleMons[gBattlerAttacker].status2 & STATUS2_FOCUS_ENERGY) != 0)
|
||||
+ (gBattleMoves[gCurrentMove].effect == EFFECT_HIGH_CRITICAL)
|
||||
+ (gBattleMoves[gCurrentMove].effect == EFFECT_SKY_ATTACK)
|
||||
+ (gBattleMoves[gCurrentMove].effect == EFFECT_BLAZE_KICK)
|
||||
+ (gBattleMoves[gCurrentMove].effect == EFFECT_POISON_TAIL)
|
||||
+ ((gBattleMoves[gCurrentMove].flags & FLAG_HIGH_CRIT) != 0)
|
||||
+ (holdEffect == HOLD_EFFECT_SCOPE_LENS)
|
||||
+ 2 * (holdEffect == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBattlerAttacker].species == SPECIES_CHANSEY)
|
||||
+ 2 * (holdEffect == HOLD_EFFECT_STICK && gBattleMons[gBattlerAttacker].species == SPECIES_FARFETCHD);
|
||||
|
Loading…
Reference in New Issue
Block a user