Difference between pages "Module:Autolink/sandbox" and "Gladiator Beast Fort"

From Yugipedia
< Module:Autolink(Difference between pages)
Jump to: navigation, search
(one more `table.insert`)
 
(Imported revision from memcached. (text_id:"4318848"))
 
Line 1: Line 1:
--
+
{{Anime card
-- implements {{Autolink}}, {{Unlink}}, and {{Formatted link}}
+
| ja_image            = GladiatorBeastFort-JP-Anime-AV-NC.png
--
+
| image_nc            = GladiatorBeastFort-JP-Anime-AV-NC-2.png
 
+
| ja_name            = {{Ruby|剣闘獣の砦|グラディアルビースト・フォート}}
local p = {}
+
| romaji_name        = Guradiaru Bīsuto Fōto
 
+
| trans_name          = Gladial Beast Fort
-- removes all special formatting from a string
+
| card_type          = Spell
local function unprettify( s )
+
| property            = Continuous
return s:gsub( '""', '' )
+
| effect_types        = Ignition-like, Ignition-like, Quick-like
:gsub( "'''?", '' )
+
| non-card            = This was not a physical card, but other "[[Gladiator Beast]]" [[Continuous Spell Card]]/[[Continuous Trap Card|Trap Card]]s affected by the [[card effect|effect]] of "[[Gladiator Beast's Assault Fort]]".
:gsub( '##', ' ' )
+
| lore                = [[Once per turn]]: You can [[shuffle]] 1 card underneath this card into the [[Deck]]; inflict 1000 [[effect damage|damage]] to your opponent. Once per [[turn]], if this card has no cards underneath it: You can place 1 "[[Gladiator Beast]]" [[Monster Card|monster]] from your Deck underneath this card. Once per turn, during either player's turn: You can [[target]] 1 "Gladiator Beast" monster you [[control]], then [[activate]] 1 of these [[card effect|effects]];<br />● If the targeted monster [[battle]]s: It cannot be [[destroy]]ed by that battle, also you take no [[battle damage]] from that battle.<br />● If the targeted monster is targeted by a card effect: It cannot be destroyed by that effect.
:gsub( '  ', ' ' )
+
| ja_lore            = ①:1ターンに1度、このカードの下に重ねて置いたカード1枚をデッキに戻してこの効果を発動できる。相手に1000ダメージを与える。②:1ターンに1度、このカードの下に重ねて置いたカードが無い場合にこの効果を発動できる。デッキから「{{Ruby|剣闘獣|グラディアルビースト}}」モンスターカード1枚を選んでこのカードの下に重ねて置く。③:1ターンに1度、自分フィールドの「{{Ruby|剣闘獣|グラディアルビースト}}」モンスター1体を対象とし、以下の効果から1つを選択してこの効果を発動できる。この効果は相手ターンでも発動できる。●対象のモンスターが戦闘を行う場合に発動できる。そのモンスターはその戦闘では破壊されず、その戦闘で発生する自分への戦闘ダメージは0になる。●対象のモンスターが効果の対象になった場合に発動できる。そのモンスターはその効果では破壊されない。
end
+
| appears_in_av      = 121, 122
 
+
| archseries          = Gladiator Beast
-- formats a link
+
| supports_archetypes = Gladiator Beast
local function prettify_link( target, txt )
+
| misc                = Limited activations
if not target or target == '' then
+
| life_points        =
return ''
+
* Damages your opponent
end
+
* Prevents battle damage
+
| action              = Places cards underneath itself
if not txt or txt == '' then
+
| attack              = Cannot be destroyed by battle
txt = target
+
| m/s/t              = Cannot be destroyed by card effects
end
+
}}
 
local plain_target = unprettify( target )
 
local prettified_txt = txt:gsub( '""', '"' ):gsub( '##', '<>' ):gsub( '([^&])#', '%1 §&nbsp;' ):gsub( '<>', '#' )
 
 
local link = ''
 
if plain_target == prettified_txt then
 
-- no formatting
 
link = ('[[%s]]'):format( plain_target )
 
else
 
local start, _end = prettified_txt:find( plain_target, 1, true )
 
if start then
 
-- only formatting is on the link boundaries (`''Foo Bar''`)
 
link = ('%s[[%s]]%s'):format( prettified_txt:sub( 1, start - 1 ), plain_target, prettified_txt:sub( _end + 1 ) )
 
else
 
-- formatting within the link (`''Foo Bar'' (Quux)`)
 
link = ('[[%s|%s]]'):format( plain_target, prettified_txt )
 
end
 
end
 
return link
 
end
 
 
 
-- there's several things this doesn't do that it probably could/should:
 
-- * supporting mixed lists (currently it assumes that whatever list type is used by the first item is the same as all other items)
 
-- ** similarly, supporting sublists
 
-- * allowing multiple items to be linked/formatted via multiple parameters, instead of just via a list in the first parameter
 
function p.link( frame )
 
if frame == mw.getCurrentFrame() then
 
args = frame:getParent().args
 
else
 
args = frame
 
end
 
 
 
-- the gsub() is a dumb hack for the encoded apostrophe test case(s)
 
local items = args[1] and args[1]:gsub( '&amp;', '&' ) or ''
 
 
-- remove any empty lines/list items from the input
 
local lines = {}
 
for item in mw.text.gsplit( items, '\n' ) do
 
item = mw.text.trim( item:match( '^[*#;:]?(.-)$' ) )
 
if item ~= '' then
 
table.insert( lines, item )
 
end
 
end
 
 
 
-- if there's more than one line, grab the list character (with a fallback if there is none)
 
local listtype = ''
 
if #lines > 1 then
 
listtype = (items:match( '^%s*([*#;:])' ) or '*') .. ' '
 
end
 
 
-- format, link, and return
 
local prettified_lines = {}
 
for _, line in ipairs( lines ) do
 
if line:find( '[[', 1, true ) then
 
local prettified_line = {}
 
local post = line
 
while post:find( '[[', 1, true ) do
 
local pre, target, txt = post:match( '^([^%[]*)%[%[%s*([^|%]]+)%s*|?%s*([^%]]-)%s*%]%]' )
 
table.insert( prettified_line, ('%s%s'):format( pre and pre:gsub( '""', '"' ) or '', prettify_link( target, txt ) ) )
 
post = post:match( '%]%](.*)$' )
 
end
 
result = ('%s%s'):format( table.concat( prettified_line ), post:gsub( '""', '"' ) )
 
else
 
result = prettify_link( line )
 
end
 
 
table.insert( prettified_lines, ('%s%s'):format( listtype, result ) )
 
end
 
 
prettified_lines = table.concat( prettified_lines, '\n' )
 
:gsub( '%[%[[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]:', '[[:Category:' )
 
:gsub( '%[%[[Ff][Ii][Ll][Ee]:', '[[:File:' )
 
:gsub( '%[%[[Ii][Mm][Aa][Gg][Ee]:', '[[:File:' )
 
 
return prettified_lines
 
end
 
 
 
-- returns the target of the first link in text
 
-- to return the entire text without any links instead, see {{Delink}}
 
function p.unlink( frame )
 
if frame == mw.getCurrentFrame() then
 
txt = frame:getParent().args[1]
 
else
 
txt = frame[1]
 
end
 
return txt and ( txt:match( '%[%[:?(.-)[|%]]' ) or mw.text.trim( txt ) )
 
end
 
 
 
return p
 

Revision as of 07:54, 30 April 2023

Gladiator Beast Fort
Japanese
剣闘獣の砦グラディアルビースト・フォート
Base
剣闘獣の砦
Kana
グラディアルビースト・フォート
Rōmaji
Guradiaru Bīsuto Fōto
Translated
Gladial Beast Fort
GladiatorBeastFort-JP-Anime-AV-NC.png
Card type Spell
Property Continuous
Effect types

This was not a physical card, but other "Gladiator Beast" Continuous Spell Card/Trap Cards affected by the effect of "Gladiator Beast's Assault Fort".
Once per turn: You can shuffle 1 card underneath this card into the Deck; inflict 1000 damage to your opponent. Once per turn, if this card has no cards underneath it: You can place 1 "Gladiator Beast" monster from your Deck underneath this card. Once per turn, during either player's turn: You can target 1 "Gladiator Beast" monster you control, then activate 1 of these effects;
● If the targeted monster battles: It cannot be destroyed by that battle, also you take no battle damage from that battle.
● If the targeted monster is targeted by a card effect: It cannot be destroyed by that effect.
Appearances
Links yugioh.com
Anime cards (Galleries: ARC-V)

Other languages

Name Lore
Japanese 剣闘獣の砦グラディアルビースト・フォート ①:1ターンに1度、このカードの下に重ねて置いたカード1枚をデッキに戻してこの効果を発動できる。相手に1000ダメージを与える。②:1ターンに1度、このカードの下に重ねて置いたカードが無い場合にこの効果を発動できる。デッキから「剣闘獣グラディアルビースト」モンスターカード1枚を選んでこのカードの下に重ねて置く。③:1ターンに1度、自分フィールドの「剣闘獣グラディアルビースト」モンスター1体を対象とし、以下の効果から1つを選択してこの効果を発動できる。この効果は相手ターンでも発動できる。●対象のモンスターが戦闘を行う場合に発動できる。そのモンスターはその戦闘では破壊されず、その戦闘で発生する自分への戦闘ダメージは0になる。●対象のモンスターが効果の対象になった場合に発動できる。そのモンスターはその効果では破壊されない。
Guradiaru Bīsuto Fōto
Gladial Beast Fort

Images

Search categories

Miscellaneous
Limited activations