Skip to content

Commit

Permalink
Balance-13-12-24 (#2580)
Browse files Browse the repository at this point in the history
* fixed silence chance

* nerf dark

* buff grimmsnarl

* new ability for solrock

* buff elec 9

* change tiny mushroom

---------

Co-authored-by: Keldaan <[email protected]>
  • Loading branch information
sylvainpolletvillard and keldaan-ag authored Dec 14, 2024
1 parent 6c981ad commit 779ac4e
Show file tree
Hide file tree
Showing 23 changed files with 173 additions and 140 deletions.
23 changes: 21 additions & 2 deletions app/core/abilities/abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2950,7 +2950,7 @@ export class CalmMindStrategy extends AbilityStrategy {
}
}

export class CosmicPowerStrategy extends AbilityStrategy {
export class CosmicPowerMoonStrategy extends AbilityStrategy {
process(
pokemon: PokemonEntity,
state: PokemonState,
Expand All @@ -2968,6 +2968,24 @@ export class CosmicPowerStrategy extends AbilityStrategy {
}
}

export class CosmicPowerSunStrategy extends AbilityStrategy {
process(
pokemon: PokemonEntity,
state: PokemonState,
board: Board,
target: PokemonEntity,
crit: boolean
) {
super.process(pokemon, state, board, target, crit)
const atkBuffMultiplier = 0.25
board.forEach((x, y, ally) => {
if (ally && ally.id !== pokemon.id && ally.team === pokemon.team) {
ally.addAttack(atkBuffMultiplier * ally.baseAtk, pokemon, 1, crit)
}
})
}
}

export class DefenseCurlStrategy extends AbilityStrategy {
process(
pokemon: PokemonEntity,
Expand Down Expand Up @@ -11108,7 +11126,8 @@ export const AbilityStrategies: { [key in Ability]: AbilityStrategy } = {
[Ability.PECK]: new PeckStrategy(),
[Ability.SPLASH]: new SplashStrategy(),
[Ability.COUNTER]: new CounterStrategy(),
[Ability.COSMIC_POWER]: new CosmicPowerStrategy(),
[Ability.COSMIC_POWER_MOON]: new CosmicPowerMoonStrategy(),
[Ability.COSMIC_POWER_SUN]: new CosmicPowerSunStrategy(),
[Ability.POISON_POWDER]: new PoisonPowderStrategy(),
[Ability.SILVER_WIND]: new SilverWindStrategy(),
[Ability.ICY_WIND]: new IcyWindStrategy(),
Expand Down
9 changes: 1 addition & 8 deletions app/core/items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,6 @@ export const ItemEffects: { [i in Item]?: Effect[] } = {
})
],

[Item.TINY_MUSHROOM]: [
new OnItemGainedEffect((pokemon) => {
pokemon.addMaxHP(-0.5 * pokemon.baseHP, pokemon, 0, false)
})
// intentionally no item removal effect
],

[Item.GOLD_BOTTLE_CAP]: [
new OnItemGainedEffect((pokemon) => {
pokemon.addCritChance(pokemon.player?.money ?? 0, pokemon, 0, false)
Expand Down Expand Up @@ -193,7 +186,7 @@ export const ItemEffects: { [i in Item]?: Effect[] } = {
)
})
],

[Item.SACRED_ASH]: [
new OnItemGainedEffect((pokemon) => {
pokemon.status.resurection = true
Expand Down
8 changes: 5 additions & 3 deletions app/core/pokemon-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,9 @@ export class PokemonEntity extends Schema implements IPokemonEntity {
crit: boolean
) {
value =
value * (1 + (apBoost * caster.ap) / 100) * (crit ? caster.critPower : 1)
(value / 100) *
(1 + (apBoost * caster.ap) / 100) *
(crit ? caster.critPower : 1)

this.critPower = min(0)(roundToNDigits(this.critPower + value, 2))
}
Expand Down Expand Up @@ -1014,8 +1016,8 @@ export class PokemonEntity extends Schema implements IPokemonEntity {
}

if (this.hasSynergyEffect(Synergy.GHOST)) {
const dodgeChance = 0.25
if (chance(dodgeChance, this)) {
const silenceChance = 0.2
if (chance(silenceChance, this)) {
target.status.triggerSilence(2000, target, this)
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/core/simulation-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class AttackCommand extends SimulationCommand {
const enemy = this.board.getValue(cell.x, cell.y)
if (enemy && this.pokemon.team !== enemy.team) {
enemy.handleSpecialDamage(
10,
20,
this.board,
AttackType.SPECIAL,
this.pokemon,
Expand Down
69 changes: 27 additions & 42 deletions app/core/simulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,13 +478,14 @@ export default class Simulation extends Schema implements ISimulation {
numberToSpawn = Math.min(numberToSpawn, bugTeam.length)

for (let i = 0; i < numberToSpawn; i++) {
const pokemonCloned = bugTeam[i]
const bug = PokemonFactory.createPokemonFromName(
bugTeam[i].name,
pokemonCloned.name,
player
)

const coord = this.getClosestAvailablePlaceOnBoardToPokemon(
bugTeam[i],
pokemonCloned,
teamIndex
)
const cloneEntity = this.addPokemon(
Expand All @@ -494,7 +495,21 @@ export default class Simulation extends Schema implements ISimulation {
teamIndex,
true
)
if (bugTeam[i].items.has(Item.TINY_MUSHROOM)) {
if (pokemonCloned.items.has(Item.TINY_MUSHROOM)) {
const team =
teamIndex === Team.BLUE_TEAM ? this.blueTeam : this.redTeam
const clonedEntity = values(team).find(
(p) => p.refToBoardPokemon.id === pokemonCloned.id
)
if (clonedEntity) {
clonedEntity.addMaxHP(
-0.5 * pokemonCloned.hp,
clonedEntity,
0,
false
)
}

cloneEntity.addMaxHP(-0.5 * bug.hp, cloneEntity, 0, false)
}
}
Expand Down Expand Up @@ -809,23 +824,23 @@ export default class Simulation extends Schema implements ISimulation {
case Effect.HONE_CLAWS:
if (types.has(Synergy.DARK)) {
pokemon.addCritChance(30, pokemon, 0, false)
pokemon.addCritPower(0.6, pokemon, 0, false)
pokemon.addCritPower(30, pokemon, 0, false)
pokemon.effects.add(Effect.HONE_CLAWS)
}
break

case Effect.ASSURANCE:
if (types.has(Synergy.DARK)) {
pokemon.addCritChance(40, pokemon, 0, false)
pokemon.addCritPower(0.8, pokemon, 0, false)
pokemon.addCritPower(40, pokemon, 0, false)
pokemon.effects.add(Effect.ASSURANCE)
}
break

case Effect.BEAT_UP:
if (types.has(Synergy.DARK)) {
pokemon.addCritChance(50, pokemon, 0, false)
pokemon.addCritPower(1.0, pokemon, 0, false)
pokemon.addCritPower(50, pokemon, 0, false)
pokemon.effects.add(Effect.BEAT_UP)
}
break
Expand Down Expand Up @@ -1242,12 +1257,7 @@ export default class Simulation extends Schema implements ISimulation {
pokemon.addAbilityPower(20, pokemon, 0, false)
pokemon.status.triggerRuneProtect(8000)
pokemon.addDefense(0.5 * pokemon.baseDef, pokemon, 0, false)
pokemon.addSpecialDefense(
0.5 * pokemon.baseSpeDef,
pokemon,
0,
false
)
pokemon.addSpecialDefense(0.5 * pokemon.baseSpeDef, pokemon, 0, false)
}
break

Expand All @@ -1259,12 +1269,7 @@ export default class Simulation extends Schema implements ISimulation {
pokemon.addAbilityPower(20, pokemon, 0, false)
pokemon.status.triggerRuneProtect(8000)
pokemon.addDefense(0.5 * pokemon.baseDef, pokemon, 0, false)
pokemon.addSpecialDefense(
0.5 * pokemon.baseSpeDef,
pokemon,
0,
false
)
pokemon.addSpecialDefense(0.5 * pokemon.baseSpeDef, pokemon, 0, false)
pokemon.addShield(100, pokemon, 0, false)
pokemon.status.resurection = true
}
Expand All @@ -1273,48 +1278,28 @@ export default class Simulation extends Schema implements ISimulation {
case Effect.QUICK_FEET:
if (types.has(Synergy.WILD)) {
pokemon.effects.add(Effect.QUICK_FEET)
pokemon.addAttack(
Math.ceil(0.3 * pokemon.baseAtk),
pokemon,
0,
false
)
pokemon.addAttack(Math.ceil(0.3 * pokemon.baseAtk), pokemon, 0, false)
}
break

case Effect.RUN_AWAY:
if (types.has(Synergy.WILD)) {
pokemon.effects.add(Effect.RUN_AWAY)
pokemon.addAttack(
Math.ceil(0.5 * pokemon.baseAtk),
pokemon,
0,
false
)
pokemon.addAttack(Math.ceil(0.5 * pokemon.baseAtk), pokemon, 0, false)
}
break

case Effect.HUSTLE:
if (types.has(Synergy.WILD)) {
pokemon.effects.add(Effect.HUSTLE)
pokemon.addAttack(
Math.ceil(0.8 * pokemon.baseAtk),
pokemon,
0,
false
)
pokemon.addAttack(Math.ceil(0.8 * pokemon.baseAtk), pokemon, 0, false)
}
break

case Effect.BERSERK:
if (types.has(Synergy.WILD)) {
pokemon.effects.add(Effect.BERSERK)
pokemon.addAttack(
Math.ceil(1.0 * pokemon.baseAtk),
pokemon,
0,
false
)
pokemon.addAttack(Math.ceil(1.0 * pokemon.baseAtk), pokemon, 0, false)
pokemon.status.enrageDelay -= 5000
}
break
Expand Down
10 changes: 5 additions & 5 deletions app/models/colyseus-models/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5180,7 +5180,7 @@ export class Lunatone extends Pokemon {
speDef = 2
maxPP = 90
range = 2
skill = Ability.COSMIC_POWER
skill = Ability.COSMIC_POWER_MOON
passive = Passive.NIGHT
attackSprite = AttackSprite.DARK_RANGE
}
Expand All @@ -5195,7 +5195,7 @@ export class Solrock extends Pokemon {
speDef = 2
maxPP = 90
range = 2
skill = Ability.COSMIC_POWER
skill = Ability.COSMIC_POWER_SUN
passive = Passive.SUN
attackSprite = AttackSprite.PSYCHIC_RANGE
}
Expand Down Expand Up @@ -13304,7 +13304,7 @@ export class Cosmoem extends Pokemon {
speDef = 8
maxPP = 100
range = 4
skill = Ability.COSMIC_POWER
skill = Ability.TELEPORT
passive = Passive.COSMOEM
attackSprite = AttackSprite.PSYCHIC_RANGE
}
Expand Down Expand Up @@ -13394,7 +13394,7 @@ export class Morgrem extends Pokemon {
stars = 2
evolution = Pkm.GRIMMSNARL
hp = 110
atk = 11
atk = 12
def = 2
speDef = 3
maxPP = 70
Expand All @@ -13409,7 +13409,7 @@ export class Grimmsnarl extends Pokemon {
rarity = Rarity.UNCOMMON
stars = 3
hp = 200
atk = 20
atk = 24
def = 3
speDef = 4
maxPP = 70
Expand Down
11 changes: 10 additions & 1 deletion app/public/dist/client/changelog/patch-5.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,22 @@
- Change Blue Flare (Reshiram): damage delay 1 second → 250ms, damage: ~~50 + 20 * fire synergy step~~ → 50 + 10 * fire synergy level
- Change Glaciate (Kyurem): damage delay 1 second → 250ms, damage: ~~50 + 20 * ice synergy step~~ → 50 + 10 * ice synergy level
- Change Fusion Bolt (Zekrom): damage delay 1 second → 250ms, damage: ~~50 + 40 * electric synergy step~~ → 50 + 10 * electric synergy level
- Buff Morgrem: Attack 11 → 12
- Buff Grimmsnarl: Attack 20 → 24
- Cosmic Power renamed to Cosmic Power (Moon)
- New ability for Solrock: Cosmic Power (Sun): buff base attack of allies by 25%
- New ability for Cosmoem: Teleport (same as Cosmog)

# Changes to Synergies

- Nerf Dark crit damage +60/80/100% → +30/40/50%
- Buff Electric 9: Triple attacks deal ~~10~~ 20 special damage to adjacent enemies

# Changes to Items

- Tiny mushroom now reduces health by 50% only if the holder is cloned
- Pokemons can now hold artificial items and Shiny Stone even if they give one of their existing synergies

# Gameplay

- ELO, XP and titles after game are now distributed immediately after the player is eliminated and leaves the game, instead of waiting for the game to end
Expand Down
11 changes: 6 additions & 5 deletions app/public/dist/client/locales/bg/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@
"SPLASH": "Пръскане",
"PECK": "кълвам",
"COUNTER": "Брояч",
"COSMIC_POWER": "Космическа сила",
"COSMIC_POWER_MOON": "Космическа сила (Moon)",
"COSMIC_POWER_SUN": "Космическа сила (Sun)",
"ENTANGLING_THREAD": "Лепкава мрежа",
"SILVER_WIND": "Сребърен вятър",
"POISON_POWDER": "Отровен прах",
Expand Down Expand Up @@ -950,7 +951,7 @@
"SPLASH": "Само плющи и пръски наоколо без никакъв ефект...",
"PECK": "Раздава [10,30,50,SP] SPECIAL на целта",
"COUNTER": "Покемон се нахвърля върху съседни врагове, раздавайки [50,SP]% от липсващото му HP като SPECIAL",
"COSMIC_POWER": "Подобрете AP на вашия отбор с [20,SP]",
"COSMIC_POWER_MOON": "Подобрете AP на вашия отбор с [20,SP]",
"ENTANGLING_THREAD": "Раздава [10,20,40,SP] SPECIAL и PARALYSIS на целта и съседните врагове за 4 секунди",
"SILVER_WIND": "Втурнете се в задната линия на врага, разнасяйки [20,40,80,SP] SPECIAL на всеки враг по пътя. След това спечелете 1 ATK, 1 DEF, 1 SPE_DEF, 10 AP и 10% ATK_SPEED",
"POISON_POWDER": "Нахлуйте в задната линия на врага, раздавайки [20,40,80,SP] и прилагайки OTROVA за 5 секунди към всеки враг по пътя",
Expand Down Expand Up @@ -1125,9 +1126,9 @@
"AMNESIA": "+50 AP",
"LIGHT_SCREEN": "+100 AP. Unown се появява на всеки 3 магазина.",
"EERIE_SPELL": "+150 AP. След битка вземете Unown магазин.",
"HONE_CLAWS": "Печелете +30% CRIT_CHANCE и +60% CRIT_POWER",
"ASSURANCE": "Печелете +40% CRIT_CHANCE и +80% CRIT_POWER",
"BEAT_UP": "Печелете +50% CRIT_CHANCE и +100% CRIT_POWER",
"HONE_CLAWS": "Печелете +30% CRIT_CHANCE и +30% CRIT_POWER",
"ASSURANCE": "Печелете +40% CRIT_CHANCE и +40% CRIT_POWER",
"BEAT_UP": "Печелете +50% CRIT_CHANCE и +50% CRIT_POWER",
"TILLER": "Получете +1 ATK / DEF / SPE_DEF",
"DIGGER": "Получете +2 ATK / DEF / SPE_DEF",
"DRILLER": "Получете +3 ATK / DEF / SPE_DEF",
Expand Down
13 changes: 7 additions & 6 deletions app/public/dist/client/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@
"SPLASH": "Platscher",
"PECK": "Schnabel",
"COUNTER": "Konter",
"COSMIC_POWER": "Kosmik-Kraft",
"COSMIC_POWER_MOON": "Kosmik-Kraft (Moon)",
"COSMIC_POWER_SUN": "Kosmik-Kraft (Sun)",
"ENTANGLING_THREAD": "Verwickelndes Netz",
"STICKY_WEB": "Klebenetz",
"SILVER_WIND": "Silberhauch",
Expand Down Expand Up @@ -1397,7 +1398,7 @@
"SPLASH": "Es flattert und spritzt einfach herum, ohne jegliche Wirkung ...",
"PECK": "Fügt dem Ziel [10,30,50,SP] SPECIAL zu",
"COUNTER": "Das Pokémon schlägt auf benachbarte Gegner ein und verursacht [50,SP]% seiner fehlenden HP als SPECIAL",
"COSMIC_POWER": "Verbessere die AP deines Teams um [20,SP]",
"COSMIC_POWER_MOON": "Verbessere die AP deines Teams um [20,SP]",
"ENTANGLING_THREAD": "Verursacht [10,20,40,SP] SPECIAL und PARALYSIS das Ziel und benachbarte Feinde für 4 Sekunden",
"SILVER_WIND": "Stürme in die gegnerische Hinterlinie und füge jedem Feind auf dem Weg [20,40,80,SP] SPECIAL zu. Dann erhältst du 1 ATK, 1 DEF, 1 SPE_DEF, 10 AP und 10 % ATK_SPEED",
"POISON_POWDER": "Stürme in die gegnerische Hinterlinie, verursache [20,40,80,SP] und verursache 5 Sekunden lang POISONNED auf jeden Feind auf dem Weg",
Expand Down Expand Up @@ -1732,17 +1733,17 @@
"PRIMORDIAL_SEA": "+12 PP pro Sekunde. Epische Pokémon können geangelt werden.",
"RISING_VOLTAGE": "Jeder vierte Angriff ist ein Dreifachangriff",
"OVERDRIVE": "Jeder dritte Angriff ist ein Dreifachangriff",
"POWER_SURGE": "Dreifachangriffe fügen Gegnern in der Nähe des Ziels zusätzlich 10 SPECIAL zu.",
"POWER_SURGE": "Dreifachangriffe fügen Gegnern in der Nähe des Ziels zusätzlich 20 SPECIAL zu.",
"GUTS": "Blockiert 4 Schaden",
"STURDY": "Blockiert 7 Schaden",
"DEFIANT": "Blockiert 10 Schaden",
"JUSTIFIED": "Blockiert 13 Schaden",
"AMNESIA": "+50 AP",
"LIGHT_SCREEN": "+100 AP. Alle 3 Geschäfte erscheint ein Icognito.",
"EERIE_SPELL": "+150 AP. Nach einem Kampf erscheint ein Icognito-Shop.",
"HONE_CLAWS": "+30% CRIT_CHANCE und +60% CRIT_POWER",
"ASSURANCE": "+40% CRIT_CHANCE und +80% CRIT_POWER",
"BEAT_UP": "+50% CRIT_CHANCE und +100% CRIT_POWER",
"HONE_CLAWS": "+30% CRIT_CHANCE und +30% CRIT_POWER",
"ASSURANCE": "+40% CRIT_CHANCE und +40% CRIT_POWER",
"BEAT_UP": "+50% CRIT_CHANCE und +50% CRIT_POWER",
"TILLER": "+1 ATK / DEF / SPE_DEF",
"DIGGER": "+2 ATK / DEF / SPE_DEF",
"DRILLER": "+3 ATK / DEF / SPE_DEF",
Expand Down
Loading

0 comments on commit 779ac4e

Please sign in to comment.