Critical hits ignore stat drops and X items last 10 battles
parent
5fd50eae40
commit
a45fe05f53
|
@ -1136,6 +1136,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
applyMoveAttrs(VariableAtkAttr, source, this, move, sourceAtk);
|
||||
applyMoveAttrs(VariableDefAttr, source, this, move, targetDef);
|
||||
|
||||
if (isCritical) {
|
||||
sourceAtk.value = Math.max(sourceAtk.value, 0);
|
||||
targetDef.value = Math.min(targetDef.value, 0);
|
||||
}
|
||||
|
||||
if (!isTypeImmune) {
|
||||
damage.value = Math.ceil(((((2 * source.level / 5 + 2) * power.value * sourceAtk.value / targetDef.value) / 50) + 2) * stabMultiplier.value * typeMultiplier.value * arenaAttackTypeMultiplier * ((this.scene.randBattleSeedInt(15) + 85) / 100)) * criticalMultiplier;
|
||||
if (isPhysical && source.status && source.status.effect === StatusEffect.BURN) {
|
||||
|
|
|
@ -307,7 +307,7 @@ export class TempBattleStatBoosterModifierType extends ModifierType implements G
|
|||
|
||||
constructor(tempBattleStat: TempBattleStat) {
|
||||
super(getTempBattleStatBoosterItemName(tempBattleStat),
|
||||
`Increases the ${getTempBattleStatName(tempBattleStat)} of all party members by 1 stage for 5 battles`,
|
||||
`Increases the ${getTempBattleStatName(tempBattleStat)} of all party members by 1 stage for 10 battles`,
|
||||
(_type, _args) => new Modifiers.TempBattleStatBoosterModifier(this, this.tempBattleStat),
|
||||
getTempBattleStatBoosterItemName(tempBattleStat).replace(/\./g, '').replace(/[ ]/g, '_').toLowerCase());
|
||||
|
||||
|
@ -770,9 +770,10 @@ export const modifierTypes = {
|
|||
TEMP_STAT_BOOSTER: () => new ModifierTypeGenerator((party: Pokemon[], pregenArgs?: any[]) => {
|
||||
if (pregenArgs)
|
||||
return new TempBattleStatBoosterModifierType(pregenArgs[0] as TempBattleStat);
|
||||
const randTempBattleStat = Utils.randSeedInt(7) as TempBattleStat;
|
||||
const randTempBattleStat = Utils.randSeedInt(6) as TempBattleStat;
|
||||
return new TempBattleStatBoosterModifierType(randTempBattleStat);
|
||||
}),
|
||||
DIRE_HIT: () => new TempBattleStatBoosterModifierType(TempBattleStat.CRIT),
|
||||
|
||||
BASE_STAT_BOOSTER: () => new ModifierTypeGenerator((party: Pokemon[], pregenArgs?: any[]) => {
|
||||
if (pregenArgs) {
|
||||
|
@ -996,14 +997,13 @@ const modifierPool: ModifierPool = {
|
|||
].map(m => { m.setTier(ModifierTier.GREAT); return m; }),
|
||||
[ModifierTier.ULTRA]: [
|
||||
new WeightedModifierType(modifierTypes.ULTRA_BALL, 24),
|
||||
new WeightedModifierType(modifierTypes.DIRE_HIT, 8),
|
||||
new WeightedModifierType(modifierTypes.MAX_LURE, 4),
|
||||
new WeightedModifierType(modifierTypes.BIG_NUGGET, 12),
|
||||
new WeightedModifierType(modifierTypes.PP_UP, 9),
|
||||
new WeightedModifierType(modifierTypes.PP_MAX, 3),
|
||||
new WeightedModifierType(modifierTypes.MINT, 4),
|
||||
new WeightedModifierType(modifierTypes.RARE_EVOLUTION_ITEM, (party: Pokemon[]) => {
|
||||
return Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 15) * 4, 32);
|
||||
}, 32),
|
||||
new WeightedModifierType(modifierTypes.RARE_EVOLUTION_ITEM, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 15) * 4, 32), 32),
|
||||
new WeightedModifierType(modifierTypes.AMULET_COIN, 3),
|
||||
new WeightedModifierType(modifierTypes.REVIVER_SEED, 4),
|
||||
new WeightedModifierType(modifierTypes.CANDY_JAR, 5),
|
||||
|
|
|
@ -326,7 +326,7 @@ export class TempBattleStatBoosterModifier extends LapsingPersistentModifier {
|
|||
private tempBattleStat: TempBattleStat;
|
||||
|
||||
constructor(type: ModifierTypes.TempBattleStatBoosterModifierType, tempBattleStat: TempBattleStat, battlesLeft?: integer, stackCount?: integer) {
|
||||
super(type, battlesLeft || 5, stackCount);
|
||||
super(type, battlesLeft || 10, stackCount);
|
||||
|
||||
this.tempBattleStat = tempBattleStat;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue