Merged 1.0.1 into master
This commit is contained in:
commit
03cf52e9e9
|
@ -1251,6 +1251,7 @@ class @BattleView extends Backbone.View
|
|||
|
||||
isIllusioned: (pokemon) =>
|
||||
illusionmons = ['Zoroark', 'Zorua']
|
||||
console.log(pokemon.getIllu())
|
||||
return true if (pokemon.attributes.species in illusionmons) and pokemon.attributes.percent == 100 and @model.attributes.turn <= 1
|
||||
return true if pokemon.getIllu()
|
||||
return false
|
||||
|
|
|
@ -4835,6 +4835,7 @@
|
|||
BattleView.prototype.isIllusioned = function(pokemon) {
|
||||
var illusionmons, _ref;
|
||||
illusionmons = ['Zoroark', 'Zorua'];
|
||||
console.log(pokemon.getIllu());
|
||||
if ((_ref = pokemon.attributes.species, __indexOf.call(illusionmons, _ref) >= 0) && pokemon.attributes.percent === 100 && this.model.attributes.turn <= 1) {
|
||||
return true;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4561,6 +4561,7 @@
|
|||
BattleView.prototype.isIllusioned = function(pokemon) {
|
||||
var illusionmons, _ref;
|
||||
illusionmons = ['Zoroark', 'Zorua'];
|
||||
console.log(pokemon.getIllu());
|
||||
if ((_ref = pokemon.attributes.species, __indexOf.call(illusionmons, _ref) >= 0) && pokemon.attributes.percent === 100 && this.model.attributes.turn <= 1) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -493,6 +493,7 @@ extendMove 'Camouflage', ->
|
|||
# Camouflage changes type based on terrain
|
||||
# In Wi-Fi battles, the terrain always results in Ground type.
|
||||
target.types = [ "Ground" ]
|
||||
battle.message "#{user.name} transformed into a Ground type!"
|
||||
|
||||
extendMove 'Captivate', ->
|
||||
oldUse = @use
|
||||
|
@ -534,6 +535,7 @@ extendMove 'Conversion', ->
|
|||
if !type?
|
||||
@fail(battle, user)
|
||||
return false
|
||||
battle.message "#{user.name} transformed into #{type} Type!"
|
||||
target.types = [ type ]
|
||||
|
||||
extendMove 'Conversion 2', ->
|
||||
|
@ -547,7 +549,9 @@ extendMove 'Conversion 2', ->
|
|||
possibles = []
|
||||
for type, value of util.Type
|
||||
possibles.push(type) if util.typeEffectiveness(moveType, [ type ]) < 1
|
||||
user.types = [ battle.rng.choice(possibles, "conversion 2") ]
|
||||
newType = battle.rng.choice(possibles, "conversion 2")
|
||||
battle.message "#{user.name} transformed into #{newType} Type!"
|
||||
user.types = [ newType ]
|
||||
|
||||
makeThiefMove 'Covet'
|
||||
|
||||
|
@ -1308,34 +1312,37 @@ extendMove 'Magnet Rise', ->
|
|||
return false
|
||||
|
||||
extendMove 'Magnitude', ->
|
||||
lastUse = {turn: 0, user: null}
|
||||
@basePower = (battle, user, target) ->
|
||||
rand = battle.rng.randInt(0, 99, "magnitude")
|
||||
magnitude = 0
|
||||
power = 0
|
||||
if rand < 5
|
||||
power = 10
|
||||
magnitude = 4
|
||||
else if rand < 15
|
||||
power = 30
|
||||
magnitude = 5
|
||||
else if rand < 35
|
||||
power = 50
|
||||
magnitude = 6
|
||||
else if rand < 65
|
||||
power = 70
|
||||
magnitude = 7
|
||||
else if rand < 85
|
||||
power = 90
|
||||
magnitude = 8
|
||||
else if rand < 95
|
||||
power = 110
|
||||
magnitude = 9
|
||||
else
|
||||
power = 150
|
||||
magnitude = 10
|
||||
|
||||
battle.message "Magnitude #{magnitude}!"
|
||||
power
|
||||
if !(battle.turn == lastUse.turn && user == lastUse.user)
|
||||
rand = battle.rng.randInt(0, 99, "magnitude")
|
||||
magnitude = 0
|
||||
power = 0
|
||||
if rand < 5
|
||||
power = 10
|
||||
magnitude = 4
|
||||
else if rand < 15
|
||||
power = 30
|
||||
magnitude = 5
|
||||
else if rand < 35
|
||||
power = 50
|
||||
magnitude = 6
|
||||
else if rand < 65
|
||||
power = 70
|
||||
magnitude = 7
|
||||
else if rand < 85
|
||||
power = 90
|
||||
magnitude = 8
|
||||
else if rand < 95
|
||||
power = 110
|
||||
magnitude = 9
|
||||
else
|
||||
power = 150
|
||||
magnitude = 10
|
||||
lastUse.turn = battle.turn
|
||||
lastUse.user = user
|
||||
battle.message "Magnitude #{magnitude}!"
|
||||
power
|
||||
|
||||
extendMove 'Me First', ->
|
||||
bannedMoves = {
|
||||
|
|
|
@ -19,8 +19,8 @@ eval(coffee.compile(require('fs').readFileSync(path, 'utf8'), bare: true))
|
|||
[ species, forme ] = pokemon.item.mega
|
||||
pokemon.changeForme(forme)
|
||||
|
||||
pokemon.team.megaEvolve() if forme is "mega"
|
||||
pokemon.team.primalEvolve() if forme is "primal"
|
||||
pokemon.team.megaEvolve() if /mega/.test(forme)
|
||||
pokemon.team.primalEvolve() if /primal/.test(forme)
|
||||
|
||||
ability = @FormeData[species][forme]["abilities"][0]
|
||||
ability = Ability[ability.replace(/\s+/g, '')]
|
||||
|
|
|
@ -21825,7 +21825,6 @@
|
|||
"abilities": [
|
||||
"Levitate"
|
||||
],
|
||||
"hiddenAbility": "Unnerve",
|
||||
"isBattleOnly": true,
|
||||
"isItemBased": true,
|
||||
"weight": 820,
|
||||
|
@ -44880,7 +44879,7 @@
|
|||
"Curse": 28,
|
||||
"Destiny Bond": 39,
|
||||
"Faint Attack": 19,
|
||||
"Forest's Curse": 35,
|
||||
"Forests Curse": 35,
|
||||
"Growth": 8,
|
||||
"Horn Leech": 54,
|
||||
"Ingrain": 13,
|
||||
|
@ -56961,7 +56960,8 @@
|
|||
"Pursuit": 1,
|
||||
"Shadow Sneak": 1,
|
||||
"Spite": 1,
|
||||
"Sucker Punch": 31
|
||||
"Sucker Punch": 31,
|
||||
"Phantom Force": 55
|
||||
},
|
||||
"machine": {
|
||||
"Attract": 0,
|
||||
|
@ -61963,7 +61963,7 @@
|
|||
"Curse": 28,
|
||||
"Destiny Bond": 39,
|
||||
"Faint Attack": 19,
|
||||
"Forest's Curse": 35,
|
||||
"Forests Curse": 35,
|
||||
"Growth": 8,
|
||||
"Horn Leech": 62,
|
||||
"Ingrain": 13,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"armor"
|
||||
],
|
||||
"spriteId": 404,
|
||||
"type": "megastone"
|
||||
"type": "formeitem"
|
||||
},
|
||||
"Flygon Armor": {
|
||||
"description": "Increases the Defense and Special Defense stats of Flygon by 25% when held.",
|
||||
|
@ -17,7 +17,7 @@
|
|||
"armor"
|
||||
],
|
||||
"spriteId": 404,
|
||||
"type": "megastone"
|
||||
"type": "formeitem"
|
||||
},
|
||||
"Leavanny Armor": {
|
||||
"description": "Increases the Defense and Special Defense stats of Leavanny by 25% when held.",
|
||||
|
@ -27,7 +27,7 @@
|
|||
"armor"
|
||||
],
|
||||
"spriteId": 404,
|
||||
"type": "megastone"
|
||||
"type": "formeitem"
|
||||
},
|
||||
"Zekrom Armor": {
|
||||
"description": "Increases the Defense and Special Defense stats of Zekrom by 25% when held.",
|
||||
|
@ -37,7 +37,7 @@
|
|||
"armor"
|
||||
],
|
||||
"spriteId": 404,
|
||||
"type": "megastone"
|
||||
"type": "formeitem"
|
||||
},
|
||||
"Ability Capsule": {
|
||||
"description": "Allows a Pokemon with one of its two standard Abilities to change to the other when used.",
|
||||
|
|
|
@ -4407,7 +4407,7 @@
|
|||
"target": "selected-pokemon",
|
||||
"type": "Normal"
|
||||
},
|
||||
"Forest's Curse": {
|
||||
"Forests Curse": {
|
||||
"accuracy": 100,
|
||||
"ailmentChance": 0,
|
||||
"ailmentId": "none",
|
||||
|
|
|
@ -141,3 +141,18 @@ extendMove 'Wildfire', ->
|
|||
if !(p.isFainted()) && weakness >= 2
|
||||
p.attach(Status.Burn)
|
||||
|
||||
extendMove "Forests Curse", ->
|
||||
@afterSuccessfulHit = (battle, user, target) ->
|
||||
if target.hasType("Grass")
|
||||
@fail(battle, user)
|
||||
return false
|
||||
battle.message "Grass type was added to #{target.name}"
|
||||
target.types.push "Grass"
|
||||
|
||||
extendMove "Trick-or-Treat", ->
|
||||
@afterSuccessfulHit = (battle, user, target) ->
|
||||
if target.hasType("Ghost")
|
||||
@fail(battle, user)
|
||||
return false
|
||||
battle.message "Ghost type was added to #{target.name}"
|
||||
target.types.push "Ghost"
|
||||
|
|
|
@ -26,6 +26,9 @@ oldHasTakeableItem = @Pokemon::hasTakeableItem
|
|||
if @item.type == 'megastone'
|
||||
[ species, forme ] = @item.mega
|
||||
return false if @species == species
|
||||
else if @item.type is "formeitem"
|
||||
[ species, forme ] = @item.itemForme
|
||||
return false if @species == species
|
||||
return true
|
||||
|
||||
# Powder moves no longer affect Grass-type Pokemon.
|
||||
|
|
|
@ -60664,7 +60664,7 @@
|
|||
"Curse": 28,
|
||||
"Destiny Bond": 39,
|
||||
"Faint Attack": 19,
|
||||
"Forest's Curse": 35,
|
||||
"Forests Curse": 35,
|
||||
"Growth": 8,
|
||||
"Horn Leech": 54,
|
||||
"Ingrain": 13,
|
||||
|
@ -60749,7 +60749,7 @@
|
|||
"Curse": 28,
|
||||
"Destiny Bond": 39,
|
||||
"Faint Attack": 19,
|
||||
"Forest's Curse": 35,
|
||||
"Forests Curse": 35,
|
||||
"Growth": 8,
|
||||
"Horn Leech": 62,
|
||||
"Ingrain": 13,
|
||||
|
|
|
@ -95,3 +95,4 @@ extendMove 'Venom Drench', ->
|
|||
return false
|
||||
|
||||
target.boost(attack: -1, specialAttack: -1, speed: -1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue