Editing Template:BAM ability

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page is not enabled for semantic in-text annotations due to namespace restrictions. Details about how to enable the namespace can be found on the configuration help page.

Latest revision Your text
Line 2: Line 2:
  
 
before we start, normalize the input a bit:
 
before we start, normalize the input a bit:
* strip "All", "Non-" and "Necro"
+
* strip "Necro"
 
* "Monsters" and "Spells" to "Monster" and "Spell", respectively
 
* "Monsters" and "Spells" to "Monster" and "Spell", respectively
 +
* "Sea Serpent" and "Winged Beast" to "Sea_Serpent" and "Winged_Beast", respectively
  
-->{{ #vardefine: $input | {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{{1}}} | All }} | Non- }} | Necro }} | - }} | Spells | Spell }} | Monsters | Monster }} }}<!--
+
-->{{ #vardefine: $input | {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{{1}}} | Necro }} | Spells | Spell }} | Monsters | Monster }} | Sea Serpent | Sea_Serpent }} | Winged Beast | Winged_Beast }} }}(Input 1: {{ #var: $input }})<!--
  
-->{{ #vardefine: $necro | {{ #if: {{ #pos: {{{1}}} | Necro }} | Necro }} }}<!--
+
-->{{ #vardefine: $necro | {{ #if: {{ #pos: {{{1}}} | Necro }} | Necro }} }}(Necro 1: {{ #var: $necro }})<!--
  
-->{{ #vardefine: $non | {{ #if: {{ #pos: {{{1}}} | Non- }} | Non- }} }}<!--
+
-->{{ #vardefine: $all | {{ #if: {{ #pos: +{{ urlencode: {{{1}}} }}+ | +All+ }} | true }} }}<!--
  
-->{{ #vardefine: $all | {{ #if: {{ #pos: +{{ urlencode: {{{1}}} }}+ | +All+ }} | true }} }}<!--
+
-->{{ #arraydefine: $actions | Acid, Annihilate, Backfire, Big, Bloodlust, Boost, Break, Courage, Cripple, Destroy, Drain, Empathy, Explosion, Farewell, Feeble, First, Fragile, Growth, Heal, Hurt, Immune, Last, Mirror, Osmosis, Parting, Power, Promo, Rage, Requiem, Resurrect, Sacrifice, Self-Destruct, Shared, Shock, Shockwave, Sneak, Soothe, Sorrow, Special, Spirit, Timidity }}<!--
  
-->{{BAM ability/action|{{{1}}}}}<!--
+
-->{{ #arraydefine: $ability | {{{1}}} | /\s/ }}<!--
  
-->{{ #vardefine: $target | {{ #replace: {{ #var: $input }} | {{ #var: $action }} }} }}<!--
+
-->{{ #arrayintersect: $A | $ability | $actions }}(Ability 1: {{ #arrayprint: $A }})<!--
  
-->{{ #vardefine: $monster
+
-->{{ #vardefine: $target
| {{ #if: {{ #pos: {{ #var: $target }} | Monster }}
+
| {{ #if: {{ #var: $all }}
   | true
+
   | {{ #urldecode: {{ #explode: {{ urlencode: {{ #var: $input }} }} | +All+ | 1 }} }}
  | {{ #switch: {{ #var: $target }}
+
   | {{ #explode: {{ #var: $input }} }}
    | Light | Dark  | Earth   | Wind | Fire | Water  | Divine
 
    | Aqua  | Fairy | Fairies | Fish | Pyro | Psychic | Psychics | Rock | Thunder = true
 
    | #default = {{ #if: {{ #pos: {{ #var: $target }} | LV }} | true }}
 
    }}
 
 
   }}
 
   }}
}}<!--
+
}}(Target 1: {{ #var: $target }})<!--
 +
 
 +
-->{{ #vardefine: $target
 +
| {{ #switch: {{ #var: $target }}
 +
  | Light Monster | Dark Monster | Earth Monster
 +
  | Wind Monster  | Fire Monster | Water Monster
 +
  | Divine Monster =  [[{{ uc: {{ #explode: {{ #var: $target }} }} }}]] [[Monster Card|Monster]]
  
-->{{ #vardefine: $target | {{ #replace: {{ #replace: {{ #var: $target }} | Monsters }} | Monster }} }}<!--
+
  | Light | Dark | Earth | Wind | Fire | Water
 +
  | Divine  = [[{{ uc: {{ #var: $target }} }}]] [[Monster Card|Monster]]
  
-->{{ #vardefine: $target
+
  | Sea_Serpent  | Sea_Serpents  = [[Sea Serpent]]
| {{ #var: $non }}{{ #switch: {{ #var: $target }}
+
  | Winged_Beast | Winged_Beasts = [[Winged Beast]]
 +
  | Fairy        | Fairies      = [[Fairy]] [[Monster Card|Monster]]
 +
 
 +
  | Aqua Monster | Pyro Monster    | Psychic Monster
 +
  | Rock Monster | Thunder Monster  = [[{{ #explode: {{ #var: $target }} }}]] [[Monster Card|Monster]]
  
   | Light  | Dark | Earth | Wind | Fire | Water
+
   | Aqua          | Fish    | Pyro  | Psychic
   | Divine = [[{{ uc: {{ #var: $target }} }}|{{ #var: $target }}]]
+
   | Rock          | Thunder          = [[{{ #var: $target}}]] [[Monster Card|Monster]]
  
   | Fairy    | Fairies      = [[Fairy]]
+
   | Psychics = [[Psychic]] [[Monster Card|Monster]]
  
   | Aqua    | Beast         | Beast-Warrior  | Dinosaur     | Divine-Beast  | Dragon
+
   | Beast   | Beast-Warrior  | Dinosaur | Divine-Beast  | Dragon       | Fiend
   | Fiend    | Fish          | Insect         | Machine     | Plant         | Psychic
+
   | Insect   | Machine       | Plant    | Reptile      | Spellcaster | Warrior
  | Pyro     | Reptile      | Rock          | Sea Serpent | Spellcaster  | Thunder
+
   | Zombie  = [[{{ #var: $target }}]]
   | Warrior  | Winged Beast  | Zombie  = [[{{ #var: $target }}]]
 
  
   | Aquas    | Beasts       | Beast-Warriors | Dinosaurs   | Divine-Beasts | Dragons
+
   | Beasts   | Beast-Warriors | Dinosaurs | Divine-Beasts | Dragons     | Fiends
   | Fiends                  | Insects       | Machines     | Plants       | Psychics
+
   | Insects | Machines       | Plants    | Reptiles      | Spellcasters | Warriors
  | Pyros   | Reptiles      | Rocks          | Sea Serpents | Spellcasters | Thunders
+
   | Zombies = [[{{ #sub: {{ #var: $target }} | | -1 }}]]
   | Warriors | Winged Beasts | Zombies = [[{{ #sub: {{ #var: $target }} || -1 }}]]
 
  
   | Spell | Spells = [[Spell Card|Spell]]
+
   | #default = {{ #replace: {{ #replace: {{ #var: $target }} | LV | [[Level]] }} | Less | less }}
 +
  }}
 +
}}(Target 2: {{ #var: $target }})<!--
  
   | Opponent = Opponent
+
-->{{ #vardefine: $action
 +
| {{ #switch: {{ #arrayprint: $A }}
 +
  | Acid    = Acid Jet
 +
  | Big    = Big Explosion
 +
   | Break  = Break Immunity
 +
  | First  = First Strike
 +
  | Last    = Last Stand
 +
  | Parting = Parting Gift
 +
  | Power  = Power Redistribution
 +
  | Shared  = Shared Fate
 +
  | Spirit  = Spirit Protection
 +
  }}
 +
}}(Action 1: {{ #var: $action }})<!--
  
  | #default = {{ #replace: {{ #replace: {{ lc: {{ #var: $target }} }} | lv | [[Level]] }} | & | and }}
+
-->{{ #ifeq: {{ #var: $target }} | {{ #var: $action }} | {{ #vardefine: $target | }} }}<!--
  }} {{ #if: {{ #var: $monster }} | [[Monster Card|Monster]] }}
 
}}<!--
 
  
 
-->{{ #switch: {{ #var: $action }}
 
-->{{ #switch: {{ #var: $action }}
| Acid Jet             = Once per Round, when this [[Monster Card|Monster]] loses [[ATK|Power]], your Opponent loses [[Life Points]]
+
| Acid<!-- Jet -->      = Once per Round, when this [[Monster Card|Monster]] loses [[Power]], your Opponent loses [[Life Points]]
| Annihilate            = [[Destroy]] your Opponent's {{ #var: $target }}s
+
| Annihilate            = [[Destroy]] your opponent's {{ #var: $target }}s
| Backfire              = You lose [[Life Points]]
+
| Backfire              = You Lose [[Life Points]]
| Big Explosion         = When [[destroy]]ed, all [[Monster Card|Monsters]] on the [[Playing Field|Field]] are destroyed. Both players lose [[Life Points|LP]]
+
| Big<!-- Explosion --> = When [[destroy]]ed, all [[Monster Card|Monsters]] on the [[Playing Field|Field]] are destroyed. Both players lose [[Life Points|LP]]
 
| Bloodlust            = Once per Round, your Opponent loses [[Life Points]] after losing Life Points
 
| Bloodlust            = Once per Round, your Opponent loses [[Life Points]] after losing Life Points
 
| Boost                = {{ #if: {{ #var: $all }}
 
| Boost                = {{ #if: {{ #var: $all }}
   | All your {{ #if: {{ #var: $target }} | {{ #var: $target }}s | [[Monster Card|Monsters]] }} gain
+
   | All your {{ #if: {{ #var: $target }} | {{ #var: $target }}s | Monsters }} gain
   | Your {{ #if: {{ #var: $target }} | {{ #var: $target }} | [[Monster Card|Monster]] }} gains
+
   | Your {{ #if: {{ #var: $target }} | {{ #var: $target }} | Monster }} gains
   }} [[ATK|Power]]
+
   }} [[Power]]
| Break Immunity       = {{ #if: {{ #var: $all }}
+
| Break<!-- Immunity--> = {{ #if: {{ #var: $all }}
 
   | All your Opponent's {{ #if: {{ #var: $target }} | {{ #var: $target }}s | [[Monster Card|Monsters]] }} lose their
 
   | All your Opponent's {{ #if: {{ #var: $target }} | {{ #var: $target }}s | [[Monster Card|Monsters]] }} lose their
   | Your Opponent's [[Monster Card|Monster]] loses its
+
   | Your Opponent's Monster loses its
 
   }} Immunity
 
   }} Immunity
| Courage              = Gains [[ATK|Power]] if it is the only [[Monster Card|Monster]] on your side
+
| Courage              = Gains [[Power]] if it is the only [[Monster Card|Monster]] of your side
 
| Cripple              = {{ #if: {{ #var: $all }}
 
| Cripple              = {{ #if: {{ #var: $all }}
   | All your Opponent's {{ #if: {{ #var: $target }} | {{ #var: $target }}s | [[Monster Card|Monsters]] }} lose
+
   | All your Opponent's {{ #if: {{ #var: $target }} | {{ #var: $target }}s | Monsters }} lose
   | Your Opponent's [[Monster Card|Monster]] loses
+
   | Your Opponent's Monster loses
   }} [[ATK|Power]]
+
   }} [[Power]]
 
| Destroy              = [[Destroy]] your Opponent's {{ #var: $target }}
 
| Destroy              = [[Destroy]] your Opponent's {{ #var: $target }}
| Drain                = Gains [[ATK|Power]] when your Opponent loses [[Life Points]]
+
| Drain                = Gains [[Power]] when your opponent loses [[Life Points]]
| Empathy              = Loses/Gains [[ATK|Power]] as you lose/gain [[Life Points]]
+
| Empathy              = Loses/gains [[Power]] as you lose/gain [[Life Points]]
 
| Explosion            = When [[destroy]]ed, facing [[Monster Card|Monster]] is also destroyed. Both Players lose [[Life Points]]
 
| Explosion            = When [[destroy]]ed, facing [[Monster Card|Monster]] is also destroyed. Both Players lose [[Life Points]]
 
| Farewell              = You gain [[Life Points]] when this [[Monster Card|Monster]] is [[destroy]]ed
 
| Farewell              = You gain [[Life Points]] when this [[Monster Card|Monster]] is [[destroy]]ed
 
| Feeble                = {{ #if: {{ #var: $all }}
 
| Feeble                = {{ #if: {{ #var: $all }}
   | All your {{ #if: {{ #var: $target }} | {{ #var: $target }}s | [[Monster Card|Monsters]] }} lose
+
   | All your {{ #if: {{ #var: $target }} | {{ #var: $target }}s | Monsters }} lose
 
   | Loses
 
   | Loses
   }} [[ATK|Power]] every Round
+
   }} [[Power]] every Round
| First Strike         = At Round start, if your [[Graveyard]] is empty, your Opponent loses [[Life Points]]
+
| First<!-- Strike-->  = At Round start, if your [[Graveyard]] is empty, your opponent loses [[Life Points]]
 
| Fragile              = [[Destroy]]ed after battling another [[Monster Card|Monster]]
 
| Fragile              = [[Destroy]]ed after battling another [[Monster Card|Monster]]
| Growth                = At Round End, your [[Monster Card|Monster]]'s [[ATK|Power]] doubles
+
| Growth                = At Round End, your [[Monster Card|Monster]]'s [[Power]] doubles
| Heal | Soothe        = {{ #if: {{ #var: $target }}
+
| Heal | Soothe        = You gain [[Life Points]]
  | Your Opponent gains
+
| Heal Opponent        = Your Opponent gains [[Life Points]]<!-- Hackish -->
  | You gain
+
| Hurt | Hurt Opponent  = Opponent loses [[Life Points]]<!-- Hackish -->
  }} [[Life Points]]
+
| Immune                = Your {{ #if: {{ #var: $target }} | {{ #var: $target }} | [[Monster Card|Monster]] }}{{ #if: {{ #var: $all }} |s }} cannot lose [[Power]] or be [[destroy]]ed
| Hurt                 = Your Opponent loses [[Life Points]]
+
| Last<!-- Stand-->    = Doubles its [[Power]] if there are no cards in your [[Main Deck|Deck]] at Round Start
| Immune                = {{ #if: {{ #var: $all }}
 
  | All your {{ #if: {{ #var: $target }} | {{ #var: $target }} | [[Monster Card|Monsters]] }}
 
  | Your {{ #if: {{ #var: $target }} | {{ #var: $target }} | [[Monster Card|Monster]] }}
 
  }} cannot lose [[ATK|Power]] or be [[destroy]]ed
 
| Last Stand           = Doubles its [[ATK|Power]] if there are no cards in your [[Main Deck|Deck]] at Round Start
 
 
| Mirror                = Every Round, the first time you lose [[Life Points]], your Opponent loses Life Points
 
| Mirror                = Every Round, the first time you lose [[Life Points]], your Opponent loses Life Points
| Osmosis              = Drain [[ATK|Power]] from your Opponent's [[Monster Card|Monster]] to yours
+
| Osmosis              = Drain [[Power]] from your Opponent's [[Monster Card|Monster]] to yours
| Parting Gift         = Your Opponent loses [[Life Points]] when this [[Monster Card|Monster]] is [[destroy]]ed
+
| Parting<!-- Gift-->  = Your Opponent loses [[Life Points]] when this [[Monster Card|Monster]] is [[destroy]]ed
| Power Redistribution = When this [[Monster Card|Monster]] is [[destroy]]ed, all your Monsters on the field gain [[ATK|Power]]
+
| Power<!-- Redistribution --> = When this [[Monster Card|Monster]] is [[destroy]]ed, all your Monsters on the field gain [[Power]]
| Rage                  = Gains [[ATK|Power]] when you lose [[Life Points]]
+
| Rage                  = Gains [[Power]] when you lose [[Life Points]]
| Requiem              = Your Opponent's [[Monster Card|Monsters]] lose [[ATK|Power]] when this Monster is [[destroy]]ed
+
| Requiem              = Your Opponent's [[Monster Card|Monsters]] lose [[Power]] when this Monster is [[destroy]]ed
| Resist                = This [[Monster Card|Monster]] is unaffected by the effects of any other Cards on the field
+
| Resurrect            = One random {{ #var: $target }} is shuffled from your [[Graveyard]] into your [[Main Deck|Deck]]
| Resurrect            = One random {{ #var: $target }} from your [[Graveyard]] is shuffled into your [[Main Deck|Deck]]
+
| Sacrifice            = [[Destroy]] {{ #if: {{ #var: $all }}
| Sacrifice            = [[Destroy]] {{ #if: {{ #var: $all }}{{ #switch: {{ #var: $target }} | [[Monster Card|Monster]] | [[Spell Card|Spell]] = | 1 }}
 
 
   | all your {{ #var: $target }}s
 
   | all your {{ #var: $target }}s
 
   | your {{ #var: $target }}
 
   | your {{ #var: $target }}
 
   }}
 
   }}
 
| Self-Destruct        = [[Destroy]] at Round End
 
| Self-Destruct        = [[Destroy]] at Round End
| Shared Fate           = {{ #if: {{ #var: $all }}
+
| Shared<!-- Fate -->  = {{ #if: {{ #var: $all }}
   | When this card is [[destroy]]ed, all your Opponent's [[Monster Card|Monsters]] are also destroyed
+
   | When this card is [[destroy]]ed, all Opponent's [[Monster Card|Monsters]] are destroyed
   | When [[destroy]]ed, your Opponent's [[Monster Card|Monster]] is also destroyed
+
   | When destroyed, your Opponent's Monster is also destroyed
  }}
 
| Shock                = Your Opponent loses [[Life Points]] when your [[Monster Card|Monster]] [[attack]]s
 
| Shockwave            = Once per Round, when this [[Monster Card|Monster]] gains [[ATK|Power]], your Opponent loses [[Life Points]]
 
| Silence              = {{ #if: {{ #var: $all }}
 
  | Your Opponent's {{ #var: $target }} cannot [[activate]] its effect
 
  | All your Opponent's {{ #var: $target }}s cannot [[activate]] their effects
 
 
   }}
 
   }}
 +
| Shock                = Your Opponent loses [[Life Points]] when your [[Monster Card|Monster]] attacks
 +
| Shockwave            = Once per Round, when this card gains [[Power]], your opponent loses [[Life Points]]
 
| Sneak                = [[Destroy]] your Opponent's [[Monster Card|Monster]] before it [[attack]]s
 
| Sneak                = [[Destroy]] your Opponent's [[Monster Card|Monster]] before it [[attack]]s
 
| Sorrow                = You lose [[Life Points]] when this [[Monster Card|Monster]] is [[destroy]]ed
 
| Sorrow                = You lose [[Life Points]] when this [[Monster Card|Monster]] is [[destroy]]ed
| Spirit Protection     = When your [[Monster Card|Monster]] is [[destroy]]ed, all your other Monsters gain Immunity
+
| Spirit<!-- Protection--> = When your [[Monster Card|Monster]] is [[destroy]]ed, all your other Monsters gain Immunity
| Timidity              = Loses [[ATK|Power]] if your Opponent has two or more [[Monster Card|Monsters]] in play
+
| Timidity              = Loses [[Power]] if your Opponent has two or more [[Monster Card|Monsters]] in play
 
+
| Promo | Special       =  
| Fusion | Promo | Special =  
 
 
}}. {{ #if: {{ #var: $necro }}
 
}}. {{ #if: {{ #var: $necro }}
| This effect increases with each Card in your [[Graveyard]].
+
| This effect increases with each card in your [[Graveyard]].
 
}}
 
}}

Please note that all contributions to Yugipedia are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International License (see Yugipedia:Licensing for more details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)
Preview page with this template
Below are some commonly used wiki markup codes. Simply click on what you want to use and it will appear in the edit box above.

View this template

Template used on this page: