Undo rename of grip claw modifier class due to corrupting old data
parent
a113db5e3f
commit
2987c8ec93
|
@ -5,7 +5,7 @@ import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMov
|
||||||
import { Mode } from './ui/ui';
|
import { Mode } from './ui/ui';
|
||||||
import { Command } from "./ui/command-ui-handler";
|
import { Command } from "./ui/command-ui-handler";
|
||||||
import { Stat } from "./data/pokemon-stat";
|
import { Stat } from "./data/pokemon-stat";
|
||||||
import { BerryModifier, AttackHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyInstantReviveChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier } from "./modifier/modifier";
|
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyInstantReviveChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier } from "./modifier/modifier";
|
||||||
import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler";
|
import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler";
|
||||||
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball";
|
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball";
|
||||||
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims";
|
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims";
|
||||||
|
@ -1591,7 +1591,7 @@ class MoveEffectPhase extends PokemonPhase {
|
||||||
user.scene.applyModifiers(EnemyAttackStatusEffectChanceModifier, false, target);
|
user.scene.applyModifiers(EnemyAttackStatusEffectChanceModifier, false, target);
|
||||||
}
|
}
|
||||||
if (this.move instanceof AttackMove)
|
if (this.move instanceof AttackMove)
|
||||||
this.scene.applyModifiers(AttackHeldItemTransferChanceModifier, this.player, user, target.getFieldIndex());
|
this.scene.applyModifiers(ContactHeldItemTransferChanceModifier, this.player, user, target.getFieldIndex());
|
||||||
})
|
})
|
||||||
).then(() => resolve());
|
).then(() => resolve());
|
||||||
});
|
});
|
||||||
|
|
|
@ -549,7 +549,7 @@ class EvolutionItemModifierTypeGenerator extends ModifierTypeGenerator {
|
||||||
|
|
||||||
export class ContactHeldItemTransferChanceModifierType extends PokemonHeldItemModifierType {
|
export class ContactHeldItemTransferChanceModifierType extends PokemonHeldItemModifierType {
|
||||||
constructor(name: string, chancePercent: integer, iconImage?: string, group?: string, soundName?: string) {
|
constructor(name: string, chancePercent: integer, iconImage?: string, group?: string, soundName?: string) {
|
||||||
super(name, `Upon attacking, there is a ${chancePercent}% chance the foe's held item will be stolen`, (type, args) => new Modifiers.AttackHeldItemTransferChanceModifier(type, (args[0] as Pokemon).id, chancePercent), iconImage, group, soundName);
|
super(name, `Upon attacking, there is a ${chancePercent}% chance the foe's held item will be stolen`, (type, args) => new Modifiers.ContactHeldItemTransferChanceModifier(type, (args[0] as Pokemon).id, chancePercent), iconImage, group, soundName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1355,7 +1355,7 @@ export class TurnHeldItemTransferModifier extends HeldItemTransferModifier {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AttackHeldItemTransferChanceModifier extends HeldItemTransferModifier {
|
export class ContactHeldItemTransferChanceModifier extends HeldItemTransferModifier {
|
||||||
private chance: number;
|
private chance: number;
|
||||||
|
|
||||||
constructor(type: ModifierType, pokemonId: integer, chancePercent: number, stackCount?: integer) {
|
constructor(type: ModifierType, pokemonId: integer, chancePercent: number, stackCount?: integer) {
|
||||||
|
@ -1365,11 +1365,11 @@ export class AttackHeldItemTransferChanceModifier extends HeldItemTransferModifi
|
||||||
}
|
}
|
||||||
|
|
||||||
matchType(modifier: Modifier): boolean {
|
matchType(modifier: Modifier): boolean {
|
||||||
return modifier instanceof AttackHeldItemTransferChanceModifier;
|
return modifier instanceof ContactHeldItemTransferChanceModifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
clone(): AttackHeldItemTransferChanceModifier {
|
clone(): ContactHeldItemTransferChanceModifier {
|
||||||
return new AttackHeldItemTransferChanceModifier(this.type, this.pokemonId, this.chance * 100, this.stackCount);
|
return new ContactHeldItemTransferChanceModifier(this.type, this.pokemonId, this.chance * 100, this.stackCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
getArgs(): any[] {
|
getArgs(): any[] {
|
||||||
|
|
Loading…
Reference in New Issue