Commit a36a378c authored by VanillaSalt's avatar VanillaSalt

fix

parent d09a447d
--Magic Sea Castle Aigaion
--魔海城アイガイオン
function c10678778.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10678778,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10678778)
e1:SetOperation(c10678778.operation)
e1:SetTarget(c10678778.rmtg)
e1:SetOperation(c10678778.rmop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10678778,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,106787782)
e2:SetTarget(c10678778.target)
e2:SetOperation(c10678778.activate)
e2:SetCountLimit(1,10678779)
e2:SetCost(c10678778.descost)
e2:SetTarget(c10678778.destg)
e2:SetOperation(c10678778.desop)
c:RegisterEffect(e2)
end
function c10678778.operation(e,tp,eg,ep,ev,re,r,rp)
function c10678778.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_EXTRA,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
end
function c10678778.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(1-tp,LOCATION_EXTRA,0)
if g:GetCount()==0 then return end
local tc=g:RandomSelect(tp,1):GetFirst()
......@@ -38,28 +48,34 @@ function c10678778.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
function c10678778.filter(c)
local ctype=c:GetType()
return c:IsFaceup() and (c:IsType(TYPE_XYZ) or c:IsType(TYPE_FUSION) or c:IsType(TYPE_SYNCHRO)) and c:IsAbleToHand()
and Duel.IsExistingTarget(c10678778.filter2,tp,0,LOCATION_MZONE,1,nil,ctype)
function c10678778.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c10678778.filter(c,tp)
local ctype=bit.band(c:GetType(),TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ)
return c:IsFaceup() and ctype~=0 and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c10678778.filter2,tp,0,LOCATION_MZONE,1,nil,ctype)
end
function c10678778.filter2(c,ctype)
return c:GetType()==ctype
return c:IsFaceup() and c:IsType(ctype) and c:IsDestructable()
end
function c10678778.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c10678778.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10678778.filter,tp,0,LOCATION_REMOVED,1,nil) end
function c10678778.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(1-tp) and c10678778.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c10678778.filter,tp,0,LOCATION_REMOVED,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c10678778.filter,tp,0,LOCATION_REMOVED,1,1,nil)
local g=Duel.SelectTarget(tp,c10678778.filter,tp,0,LOCATION_REMOVED,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
local ctype=bit.band(g:GetFirst():GetType(),TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ)
local dg=Duel.GetMatchingGroup(c10678778.filter2,tp,0,LOCATION_MZONE,nil,ctype)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0)
end
function c10678778.activate(e,tp,eg,ep,ev,re,r,rp)
function c10678778.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,c10678778.filter2,tp,0,LOCATION_MZONE,1,1,nil,tc:GetType())
local tc2=g:GetFirst()
Duel.Destroy(tc2,REASON_EFFECT)
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
local ctype=bit.band(tc:GetType(),TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c10678778.filter2,tp,0,LOCATION_MZONE,1,1,nil,ctype)
Duel.Destroy(g,REASON_EFFECT)
end
end
--Buster Dragon, the Preceptrampler Dragon
--Scripted by Ragna_Edge
--破戒蛮竜-バスター・ドラゴン
function c11790356.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
......@@ -17,6 +16,7 @@ function c11790356.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCondition(c11790356.spcon)
e2:SetTarget(c11790356.sptg)
......@@ -27,6 +27,7 @@ function c11790356.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c11790356.condition)
......@@ -35,7 +36,7 @@ function c11790356.initial_effect(c)
c:RegisterEffect(e3)
end
function c11790356.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1e8)
return c:IsFaceup() and c:IsSetCard(0xd7)
end
function c11790356.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c11790356.cfilter,tp,LOCATION_MZONE,0,1,nil)
......@@ -44,7 +45,7 @@ function c11790356.filter(c,e,tp)
return c:IsCode(78193831) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11790356.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c11790356.filter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11790356.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c11790356.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -61,10 +62,10 @@ function c11790356.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c11790356.filter2(c)
return c:IsSetCard(0x1e7) and c:IsType(TYPE_MONSTER)
return c:IsSetCard(0xd6) and c:IsType(TYPE_MONSTER)
end
function c11790356.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c11790356.cfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c11790356.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c11790356.filter2,tp,LOCATION_GRAVE,0,1,nil) end
......@@ -77,17 +78,17 @@ function c11790356.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectMatchingCard(tp,c11790356.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local sc=sg:GetFirst()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if sc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,sc,tc,true) then return end
local e1=Effect.CreateEffect(tc)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c11790356.eqlimit)
e1:SetLabelObject(tc)
sc:RegisterEffect(e1)
end
end
function c11790356.eqlimit(e,c)
return e:GetOwner()==c
return e:GetLabelObject()==c
end
--Majespecter Sonic
--マジェスペクター・ソニック
function c13611090.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -20,11 +20,9 @@ function c13611090.filter(c)
end
function c13611090.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c13611090.filter(chkc) end
local exc=nil
if Duel.GetCurrentPhase()==PHASE_DAMAGE and Duel.GetAttackTarget()==nil then exc=Duel.GetAttacker() end
if chk==0 then return Duel.IsExistingTarget(c13611090.filter,tp,LOCATION_MZONE,0,1,exc) end
if chk==0 then return Duel.IsExistingTarget(c13611090.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c13611090.filter,tp,LOCATION_MZONE,0,1,1,exc)
Duel.SelectTarget(tp,c13611090.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c13611090.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
--Twilight Ninja - Shingetsu
--黄昏の忍者-シンゲツ
function c14541657.initial_effect(c)
--untargetable
local e1=Effect.CreateEffect(c)
......@@ -18,8 +18,8 @@ function c14541657.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,14541657)
e3:SetCondition(c14541657.thcon)
e3:SetTarget(c14541657.thtg)
......@@ -30,27 +30,25 @@ function c14541657.atlimit(e,c)
return c:IsFaceup() and c:IsSetCard(0x2b) and c~=e:GetHandler()
end
function c14541657.tglimit(e,re,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0x2b) and c~=e:GetHandler()
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0x2b) and c~=e:GetHandler()
end
function c14541657.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_BATTLE)
or (rp~=tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp)
or (rp~=tp and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp)
end
function c14541657.thfilter(c)
return c:IsSetCard(0x2b) and c:IsType(TYPE_MONSTER) and c:GetCode()~=14541657 and c:IsAbleToHand()
return c:IsSetCard(0x2b) and c:IsType(TYPE_MONSTER) and not c:IsCode(14541657) and c:IsAbleToHand()
end
function c14541657.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_DECK) and chkc:IsControler(tp) and c14541657.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14541657.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c14541657.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
function c14541657.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14541657.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c14541657.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c14541657.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--Solo the Melodious Songstress
--幻奏の歌姫ソロ
function c14763299.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c14763299.spcon)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14763299,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c14763299.condition)
e1:SetTarget(c14763299.target)
e1:SetOperation(c14763299.operation)
c:RegisterEffect(e1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c14763299.spcon)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14763299,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetCondition(c14763299.condition)
e2:SetTarget(c14763299.target)
e2:SetOperation(c14763299.operation)
c:RegisterEffect(e2)
end
function c14763299.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c14763299.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE)
return e:GetHandler():IsLocation(LOCATION_GRAVE)
end
function c14763299.filter(c,e,tp)
return c:IsSetCard(0x9b) and c:GetCode()~=14763299 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x9b) and not c:IsCode(14763299) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c14763299.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c14763299.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c14763299.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c14763299.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c14763299.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c14763299.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--Destruction Sword Flash
--破壊剣一閃
function c15155568.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c15155568.condition)
e1:SetTarget(c15155568.target)
e1:SetOperation(c15155568.activate)
c:RegisterEffect(e1)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e4:SetCategory(CATEGORY_DISABLE)
......@@ -24,25 +25,22 @@ function c15155568.cfilter(c)
return c:IsFaceup() and (c:IsCode(98502113) or c:IsCode(86240887))
end
function c15155568.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c15155568.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.IsExistingMatchingCard(c15155568.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c15155568.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c15155568.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c15155568.ngcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local loc,tg=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS)
local tc=tg:GetFirst()
if tg:GetCount()~=1 or not tc:IsLocation(LOCATION_MZONE) or not (tc:IsCode(86240887) or tc:IsCode(3428069) or tc:IsCode(61190918) or tc:IsCode(78193831)) or tc:IsControler(1-tp) then return false end
if tg:GetCount()~=1 or not tc:IsLocation(LOCATION_MZONE) or not tc:IsSetCard(0xd7) or tc:IsControler(1-tp) then return false end
return Duel.IsChainDisablable(ev) and loc~=LOCATION_DECK
end
function c15155568.ngcost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -53,7 +51,7 @@ function c15155568.ngtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c15155568.ngop(e,tp,eg,ep,ev,re,r,rp,chk)
function c15155568.ngop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
......
--Superheavy Samurai Kokorogamae
--超重武者ココロガマ-A
function c15495787.initial_effect(c)
--summon limit
local e1=Effect.CreateEffect(c)
......@@ -6,20 +6,19 @@ function c15495787.initial_effect(c)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetCondition(c15495787.sumcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98777036,0))
e3:SetDescription(aux.Stringid(15495787,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_DAMAGE)
e3:SetCondition(c15495787.sumcon1)
e3:SetTarget(c15495787.sumtg)
e3:SetOperation(c15495787.sumop)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetCondition(c15495787.spcon)
e3:SetTarget(c15495787.sptg)
e3:SetOperation(c15495787.spop)
c:RegisterEffect(e3)
end
function c15495787.sfilter(c)
......@@ -28,17 +27,16 @@ end
function c15495787.sumcon(e)
return Duel.IsExistingMatchingCard(c15495787.sfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
end
function c15495787.sumcon1(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_BATTLE)>0 and ep==tp
function c15495787.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and c15495787.sumcon(e)
end
function c15495787.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c15495787.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.IsExistingMatchingCard(c15495787.sfilter,tp,LOCATION_GRAVE,0,1,nil) then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c15495787.sumop(e,tp,eg,ep,ev,re,r,rp)
function c15495787.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
......
--Hi Speed Re-Level
--ハイ・スピード・リレベル
function c15555120.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -10,47 +10,43 @@ function c15555120.initial_effect(c)
e1:SetOperation(c15555120.activate)
c:RegisterEffect(e1)
end
function c15555120.cfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:GetLevel()>0 and c:IsAbleToRemoveAsCost()
function c15555120.cfilter(c,tp)
local lv=c:GetLevel()
return lv>0 and c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(c15555120.filter,tp,LOCATION_MZONE,0,1,nil,lv)
end
function c15555120.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c15555120.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local rg=Duel.SelectMatchingCard(tp,c15555120.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
e:SetLabelObject(rg:GetFirst())
rg:GetFirst():CreateEffectRelation(e)
if chk==0 then return Duel.IsExistingMatchingCard(c15555120.cfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c15555120.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(g:GetFirst():GetLevel())
end
function c15555120.filter(c)
return c:IsFaceup() and c:GetLevel()>0
function c15555120.filter(c,lv)
local clv=c:GetLevel()
return c:IsFaceup() and clv>0 and clv~=lv and c:IsType(TYPE_SYNCHRO)
end
function c15555120.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c15555120.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c15555120.filter,tp,LOCATION_MZONE,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c15555120.filter(chkc,e:GetLabel()) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c15555120.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SelectTarget(tp,c15555120.filter,tp,LOCATION_MZONE,0,1,1,nil,e:GetLabel())
end
function c15555120.activate(e,tp,eg,ep,ev,re,r,rp)
local lc=e:GetLabelObject()
if not lc:IsRelateToEffect(e) then return end
local lv=lc:GetLevel()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
while tc do
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(lv*500)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e2)
end
tc=g:GetNext()
local lv=e:GetLabel()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetLevel()~=lv then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(lv*500)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e2)
end
end
--Dinomist Stegosaurus
--ダイナミスト・ステゴサウラー
function c1580833.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -16,22 +16,25 @@ function c1580833.initial_effect(c)
e2:SetValue(c1580833.repval)
e2:SetOperation(c1580833.repop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(36088082,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetCode(EVENT_BATTLED)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c1580833.regcon)
e3:SetOperation(c1580833.regop)
e3:SetCountLimit(1)
e3:SetCondition(c1580833.descon)
e3:SetTarget(c1580833.destg)
e3:SetOperation(c1580833.desop)
c:RegisterEffect(e3)
end
function c1580833.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x1e71) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT))
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xd8)
and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp))
end
function c1580833.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c1580833.filter,1,e:GetHandler(),tp) and not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectYesNo(tp,aux.Stringid(37752990,0))
return Duel.SelectYesNo(tp,aux.Stringid(1580833,0))
end
function c1580833.repval(e,c)
return c1580833.filter(c,e:GetHandlerPlayer())
......@@ -39,24 +42,24 @@ end
function c1580833.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
function c1580833.regcon(e,tp,eg,ep,ev,re,r,rp)
return (e:GetHandler()~=Duel.GetAttacker() and Duel.GetAttackTarget()~=nil and e:GetHandler()~=Duel.GetAttackTarget())
and ((Duel.GetAttacker():IsType(TYPE_PENDULUM) and Duel.GetAttacker():GetControler()==tp) or
(Duel.GetAttackTarget():IsType(TYPE_PENDULUM) and Duel.GetAttackTarget():GetControler()==tp))
end
function c1580833.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLED)
e1:SetOperation(c1580833.desop)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c1580833.descon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not d then return false end
if d:IsControler(tp) then a,d=d,a end
return a:IsType(TYPE_PENDULUM) and a~=e:GetHandler() and d:IsControler(1-tp)
end
function c1580833.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if chk==0 then return a:IsDestructable() and d:IsDestructable() end
local g=Group.FromCards(a,d)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function c1580833.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(Duel.GetAttacker(),REASON_EFFECT)
Duel.Destroy(Duel.GetAttackTarget(),REASON_EFFECT)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--Dragon's Bind
--竜の束縛
function c16278116.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -9,43 +9,43 @@ function c16278116.initial_effect(c)
e1:SetTarget(c16278116.target)
e1:SetOperation(c16278116.operation)
c:RegisterEffect(e1)
--Destroy
--cannot spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c16278116.descon)
e2:SetOperation(c16278116.desop)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetTarget(c16278116.splimit)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c16278116.descon)
e3:SetOperation(c16278116.desop)
c:RegisterEffect(e3)
end
function c16278116.filter(c)
return c:IsRace(RACE_DRAGON) and c:GetAttack()<=2500 and c:GetDefence()<=2500
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttackBelow(2500) and c:IsDefenceBelow(2500)
end
function c16278116.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c16278116.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16278116.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c16278116.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c16278116.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c16278116.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetTarget(c16278116.splimit)
c:RegisterEffect(e1)
end
end
function c16278116.splimit(e,c,tp,sumtp,sumpos)
local tc=e:GetHandler():GetFirstCardTarget()
return c:GetAttack()<=tc:GetBaseAttack()
return tc and c:IsAttackBelow(tc:GetBaseAttack())
end
function c16278116.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -55,4 +55,4 @@ function c16278116.descon(e,tp,eg,ep,ev,re,r,rp)
end
function c16278116.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
\ No newline at end of file
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment