Commit c758619d authored by argon.sun's avatar argon.sun

fix

parent 3ff8925b
--迷犬マロン
function c11548522.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11548522,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c11548522.condition)
e1:SetTarget(c11548522.target)
e1:SetOperation(c11548522.operation)
c:RegisterEffect(e1)
end
function c11548522.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c11548522.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c11548522.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
end
--カオス・ネクロマンサー
function c1434352.initial_effect(c)
--attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c1434352.atkval)
c:RegisterEffect(e1)
end
function c1434352.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_MONSTER)*300
end
--ダッカー
function c14506878.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14506878,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c14506878.thtg)
e1:SetOperation(c14506878.thop)
c:RegisterEffect(e1)
end
function c14506878.filter(c)
return c:GetLevel()==4 and c:IsAbleToHand()
end
function c14506878.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c14506878.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c14506878.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c14506878.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--赤い忍者
function c14618326.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14618326,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c14618326.target)
e1:SetOperation(c14618326.operation)
c:RegisterEffect(e1)
end
function c14618326.filter(c)
return c:IsFacedown() or c:IsType(TYPE_TRAP)
end
function c14618326.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c14618326.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c14618326.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
if g:GetCount()>0 and g:GetFirst():IsFaceup() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end
function c14618326.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end
if tc:IsType(TYPE_TRAP) then Duel.Destroy(tc,REASON_EFFECT) end
end
end
\ No newline at end of file
--アンドロ・スフィンクス
function c15013468.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c15013468.spcon)
e2:SetOperation(c15013468.spop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(15013468,0))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c15013468.damcon)
e3:SetTarget(c15013468.damtg)
e3:SetOperation(c15013468.damop)
c:RegisterEffect(e3)
--cannot attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetOperation(c15013468.atklimit)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
end
function c15013468.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c15013468.cfilter(c)
return c:IsFaceup() and c:IsCode(53569894)
end
function c15013468.spcon(e,c)
if c==nil then return true end
return Duel.CheckLPCost(c:GetControler(),500)
and Duel.IsExistingMatchingCard(c15013468.cfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c15013468.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.PayLPCost(tp,500)
end
function c15013468.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) and bit.band(bc:GetBattlePosition(),POS_DEFENCE)~=0
end
function c15013468.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local dam=e:GetHandler():GetBattleTarget():GetBaseAttack()/2
if dam<0 then dam=0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c15013468.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--海神の巫女
function c17214465.initial_effect(c)
--field
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_ENVIRONMENT)
e1:SetValue(22702055)
c:RegisterEffect(e1)
end
--竜巻海流壁
function c18605135.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c18605135.actcon)
c:RegisterEffect(e1)
--avoid battle damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetCondition(c18605135.abdcon)
c:RegisterEffect(e2)
--self destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_SELF_DESTROY)
e3:SetCondition(c18605135.sdcon)
c:RegisterEffect(e3)
end
function c18605135.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetEnvironment()==22702055
end
function c18605135.abdcon(e)
return Duel.GetAttackTarget()==nil or Duel.GetAttackTarget():IsAttack() or Duel.GetAttacker():GetAttack()>Duel.GetAttackTarget():GetDefence()
end
function c18605135.sdcon(e)
return Duel.GetEnvironment()~=22702055
end
--神の息吹
function c20101223.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c20101223.target)
e1:SetOperation(c20101223.activate)
c:RegisterEffect(e1)
end
function c20101223.filter(c)
return c:IsRace(RACE_ROCK) and c:IsFaceup() and c:IsDestructable()
end
function c20101223.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c20101223.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(c20101223.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c20101223.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c20101223.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
--生贄の祭壇
function c21070956.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c21070956.cost)
e1:SetTarget(c21070956.target)
e1:SetOperation(c21070956.activate)
c:RegisterEffect(e1)
end
function c21070956.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,1,nil);
local atk=g:GetFirst():GetTextAttack()
if atk<0 then atk=0 end
e:SetLabel(atk)
Duel.SendtoGrave(g,REASON_COST)
end
function c21070956.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local res=e:GetLabel()~=0
e:SetLabel(0)
return res
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetLabel())
e:SetLabel(0)
end
function c21070956.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--酸の嵐
function c21323861.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c21323861.target)
e1:SetOperation(c21323861.activate)
c:RegisterEffect(e1)
end
function c21323861.filter(c)
return c:IsRace(RACE_MACHINE) and c:IsFaceup() and c:IsDestructable()
end
function c21323861.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21323861.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(c21323861.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c21323861.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c21323861.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
--フェンリル
function c218704.initial_effect(c)
c:EnableReviveLimit()
--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(c218704.spcon)
e1:SetOperation(c218704.spop)
c:RegisterEffect(e1)
--skip draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(218704,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c218704.skipop)
c:RegisterEffect(e2)
end
function c218704.spfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost()
end
function c218704.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c218704.spfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function c218704.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c218704.spfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c218704.skipop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetCode(EFFECT_SKIP_DP)
e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
--百獣王 ベヒーモス
function c22996376.initial_effect(c)
--summon/set with 1 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22996376,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c22996376.otcon)
e1:SetOperation(c22996376.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
--salvage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22996376,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCondition(c22996376.thcon)
e3:SetTarget(c22996376.thtg)
e3:SetOperation(c22996376.thop)
c:RegisterEffect(e3)
end
function c22996376.otcon(e,c)
if c==nil then return true end
return c:GetLevel()>6 and Duel.GetTributeCount(c)>0
end
function c22996376.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,1,1)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
--change base attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(2000)
c:RegisterEffect(e1)
end
function c22996376.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE
end
function c22996376.filter(c)
return c:IsRace(RACE_BEAST) and c:IsAbleToHand()
end
function c22996376.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c22996376.filter(chkc) end
local ct=e:GetHandler():GetMaterialCount()
if chk==0 then return ct>0 and Duel.IsExistingTarget(c22996376.filter,tp,LOCATION_GRAVE,0,ct,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c22996376.filter,tp,LOCATION_GRAVE,0,ct,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,ct,0,0)
end
function c22996376.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
--怨念の魂 業火
function c23116808.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(c23116808.spcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(23116808,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c23116808.descon)
e2:SetTarget(c23116808.destg)
e2:SetOperation(c23116808.desop)
c:RegisterEffect(e2)
--token
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(23116808,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_REPEAT)
e3:SetCondition(c23116808.tkcon)
e3:SetTarget(c23116808.tktg)
e3:SetOperation(c23116808.tkop)
c:RegisterEffect(e3)
--token
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(23116808,2))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c23116808.atkcost)
e4:SetOperation(c23116808.atkop)
c:RegisterEffect(e4)
end
function c23116808.spfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c23116808.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c23116808.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c23116808.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c23116808.desfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDestructable()
end
function c23116808.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c23116808.desfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c23116808.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c23116808.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c23116808.tkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c23116808.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c23116808.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,23116809,0,0x4011,100,100,1,RACE_PYRO,ATTRIBUTE_FIRE) then return end
local token=Duel.CreateToken(tp,23116809)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
function c23116808.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,e:GetHandler(),ATTRIBUTE_FIRE) end
local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,e:GetHandler(),ATTRIBUTE_FIRE)
Duel.Release(g,REASON_COST)
end
function c23116808.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(500)
c:RegisterEffect(e1)
end
end
--ゲート・ガーディアン
function c25833572.initial_effect(c)
c:EnableReviveLimit()
--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(c25833572.spcon)
e1:SetOperation(c25833572.spop)
c:RegisterEffect(e1)
end
function c25833572.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3
and Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,25955164)
and Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,62340868)
and Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,98434877)
end
function c25833572.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g1=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,25955164)
local g2=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,62340868)
local g3=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,98434877)
g1:Merge(g2)
g1:Merge(g3)
Duel.Release(g1,REASON_COST)
end
--雷魔神-サンガ
function c25955164.initial_effect(c)
--atkdown
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(25955164,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1)
e1:SetCondition(c25955164.condition)
e1:SetTarget(c25955164.target)
e1:SetOperation(c25955164.operation)
c:RegisterEffect(e1)
end
function c25955164.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==e:GetHandler()
end
function c25955164.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttacker():IsCanBeEffectTarget(e) end
Duel.SetTargetCard(Duel.GetAttacker())
end
function c25955164.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL)
e1:SetValue(0)
tc:RegisterEffect(e1)
end
end
--悪魔払い
function c26725158.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c26725158.target)
e1:SetOperation(c26725158.activate)
c:RegisterEffect(e1)
end
function c26725158.filter(c)
return c:IsRace(RACE_FIEND) and c:IsFaceup() and c:IsDestructable()
end
function c26725158.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c26725158.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(c26725158.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c26725158.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c26725158.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
...@@ -43,7 +43,7 @@ function c27564031.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,7 +43,7 @@ function c27564031.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c27564031.operation(e,tp,eg,ep,ev,re,r,rp) function c27564031.operation(e,tp,eg,ep,ev,re,r,rp)
_replace_count=_replace_count+1 _replace_count=_replace_count+1
if _replace_count>replace_max or not e:GetHandler():IsRelateToEffect(e) then return end if _replace_count>_replace_max or not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,0x23) local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,0x23)
if g:GetCount()>=3 then if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
--ダグラの剣
function c28106077.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c28106077.target)
e1:SetOperation(c28106077.operation)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetDescription(aux.Stringid(28106077,0))
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c28106077.reccon)
e2:SetTarget(c28106077.rectg)
e2:SetOperation(c28106077.recop)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c28106077.eqlimit)
c:RegisterEffect(e3)
--Atk up
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(500)
c:RegisterEffect(e4)
end
function c28106077.eqlimit(e,c)
return c:IsRace(RACE_FAIRY)
end
function c28106077.filter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY)
end
function c28106077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c28106077.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c28106077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c28106077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c28106077.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) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c28106077.reccon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and eg:IsContains(ec) and ep~=tp
end
function c28106077.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,ev)
end
function c28106077.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--マッド・リローダー
function c31034919.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31034919,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c31034919.condition)
e1:SetTarget(c31034919.target)
e1:SetOperation(c31034919.operation)
c:RegisterEffect(e1)
end
function c31034919.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c31034919.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c31034919.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,2,2,nil)
if g:GetCount()==2 then
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.Draw(tp,2,REASON_EFFECT)
end
end
--イモータル·ルーラー --イモータル·ルーラー
function c32485518.initial_effect(c) function c32485518.initial_effect(c)
--salvage --cannot special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(32485518,0)) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c32485518.cost)
e1:SetTarget(c32485518.target)
e1:SetOperation(c32485518.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(32485518,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c32485518.cost)
e2:SetTarget(c32485518.target)
e2:SetOperation(c32485518.operation)
c:RegisterEffect(e2)
end end
function c32485518.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c32485518.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleaseable() end if chk==0 then return e:GetHandler():IsReleaseable() end
...@@ -29,7 +35,7 @@ end ...@@ -29,7 +35,7 @@ end
function c32485518.operation(e,tp,eg,ep,ev,re,r,rp) function c32485518.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
--カードを狩る死神
function c33066139.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33066139,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c33066139.target)
e1:SetOperation(c33066139.operation)
c:RegisterEffect(e1)
end
function c33066139.filter(c)
return c:IsFacedown() or c:IsType(TYPE_TRAP)
end
function c33066139.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c33066139.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c33066139.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler())
if g:GetCOunt()>0 and g:GetFirst():IsFaceup() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end
function c33066139.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end
if tc:IsType(TYPE_TRAP) then Duel.Destroy(tc,REASON_EFFECT) end
end
end
...@@ -3,7 +3,7 @@ function c33455338.initial_effect(c) ...@@ -3,7 +3,7 @@ function c33455338.initial_effect(c)
--atk up --atk up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33455338,0)) e1:SetDescription(aux.Stringid(33455338,0))
e1:SetCategory(CATEGORY_COUNTER) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
......
--針千本
function c33977496.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33977496,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetCondition(c33977496.condition)
e1:SetTarget(c33977496.target)
e1:SetOperation(c33977496.operation)
c:RegisterEffect(e1)
end
function c33977496.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==e:GetHandler() and e:GetHandler():IsDefence()
and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefence()
end
function c33977496.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0)
end
function c33977496.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if not a:IsRelateToBattle() then return end
Duel.Destroy(a,REASON_EFFECT)
end
...@@ -14,7 +14,7 @@ function c35073065.initial_effect(c) ...@@ -14,7 +14,7 @@ function c35073065.initial_effect(c)
end end
function c35073065.spcon(e,tp,eg,ep,ev,re,r,rp) function c35073065.spcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst() local ec=eg:GetFirst()
return ec:IsControler(tp) and ec:GetSummonType()==SUMMON_TYPE_ADVANCE return ec:IsControler(tp) and bit.band(ec:GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
end end
function c35073065.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c35073065.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
--リボーンリボン
function c37534148.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c37534148.target)
e1:SetOperation(c37534148.operation)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c37534148.eqlimit)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(37534148,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(c37534148.regcon)
e3:SetOperation(c37534148.regop)
c:RegisterEffect(e3)
end
function c37534148.eqlimit(e,c)
return not c:IsHasEffect(EFFECT_CANNOT_SPECIAL_SUMMON)
end
function c37534148.filter(c)
return c:IsFaceup() and not c:IsHasEffect(EFFECT_CANNOT_SPECIAL_SUMMON)
end
function c37534148.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c37534148.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c37534148.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c37534148.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c37534148.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) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c37534148.regcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
e:SetLabelObject(tc)
return e:GetHandler():GetPreviousEquipTarget()==tc and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE)
end
function c37534148.regop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(37534148,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetTarget(c37534148.sptg)
e1:SetOperation(c37534148.spop)
e1:SetLabelObject(tc)
e1:SetReset(RESET_EVENT+0x16c0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
tc:RegisterFlagEffect(37534148,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c37534148.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabelObject():GetFlagEffect(37534148)~=0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetLabelObject(),1,0,0)
end
function c37534148.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if e:GetLabelObject():GetFlagEffect(37534148)~=0 then
Duel.SpecialSummon(e:GetLabelObject(),0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -21,7 +21,7 @@ function c38041940.spfilter(c,e,tp) ...@@ -21,7 +21,7 @@ function c38041940.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:GetCode()~=38041940 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:GetCode()~=38041940 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c38041940.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38041940.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c38041940.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c38041940.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c38041940.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingTarget(c38041940.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsPlayerCanSpecialSummonMonster(tp,38041941,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH,1-tp) end and Duel.IsPlayerCanSpecialSummonMonster(tp,38041941,0,0x4011,0,0,1,RACE_PLANT,ATTRIBUTE_EARTH,1-tp) end
......
...@@ -9,25 +9,28 @@ function c4694209.initial_effect(c) ...@@ -9,25 +9,28 @@ function c4694209.initial_effect(c)
e1:SetTarget(c4694209.addct) e1:SetTarget(c4694209.addct)
e1:SetOperation(c4694209.addc) e1:SetOperation(c4694209.addc)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--attackup local e2=e1:Clone()
local e2=Effect.CreateEffect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c4694209.attackup)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy rep --attackup
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(4694209,1)) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCategory(CATEGORY_COUNTER) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTarget(c4694209.addct2) e3:SetValue(c4694209.attackup)
e3:SetOperation(c4694209.addc2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--destroy rep
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(4694209,1))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetTarget(c4694209.addct2)
e4:SetOperation(c4694209.addc2)
c:RegisterEffect(e4)
end end
function c4694209.addct(e,tp,eg,ep,ev,re,r,rp,chk) function c4694209.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
--メタボ·サッカー
function c49808196.initial_effect(c)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49808196,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCondition(c49808196.tkcon)
e1:SetTarget(c49808196.tktg)
e1:SetOperation(c49808196.tkop)
c:RegisterEffect(e1)
end
function c49808196.tkcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SUMMON and e:GetHandler():GetReasonCard():IsAttribute(ATTRIBUTE_DARK)
end
function c49808196.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0)
end
function c49808196.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,49808197,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
for i=1,3 do
local token=Duel.CreateToken(tp,49808197)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASEABLE_SUM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(1)
token:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
...@@ -11,7 +11,7 @@ function c51855378.initial_effect(c) ...@@ -11,7 +11,7 @@ function c51855378.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c51855378.cfilter(c) function c51855378.cfilter(c)
return c:IsSetCard(0x43) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x43) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function c51855378.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c51855378.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c51855378.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c51855378.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
...@@ -29,7 +29,7 @@ function c59771339.tfilter(c) ...@@ -29,7 +29,7 @@ function c59771339.tfilter(c)
return code==63977008 or code==20932152 return code==63977008 or code==20932152
end end
function c59771339.cfilter(c) function c59771339.cfilter(c)
return c:IsSetCard(0x43) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x43) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function c59771339.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c59771339.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c59771339.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c59771339.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
...@@ -22,7 +22,7 @@ end ...@@ -22,7 +22,7 @@ end
function c60434101.filter(c,atk) function c60434101.filter(c,atk)
return c:IsFaceup() and c:IsDestructable() and c:GetDefence()<=atk return c:IsFaceup() and c:IsDestructable() and c:GetDefence()<=atk
end end
function c60434101.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60434101.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c60434101.filter(chkc,c:GetAttack()) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c60434101.filter(chkc,c:GetAttack()) end
if chk==0 then return Duel.IsExistingMatchingCard(c60434101.filter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) end if chk==0 then return Duel.IsExistingMatchingCard(c60434101.filter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) end
......
...@@ -60,7 +60,7 @@ function c61468779.leaveop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function c61468779.leaveop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_SKIP_BP) e1:SetCode(EFFECT_SKIP_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()>PHASE_MAIN1 then if Duel.GetTurnPlayer()==tp then
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c61468779.skipcon) e1:SetCondition(c61468779.skipcon)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
......
--風魔神-ヒューガ
function c62340868.initial_effect(c)
--atkdown
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62340868,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1)
e1:SetCondition(c62340868.condition)
e1:SetTarget(c62340868.target)
e1:SetOperation(c62340868.operation)
c:RegisterEffect(e1)
end
function c62340868.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==e:GetHandler()
end
function c62340868.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttacker():IsCanBeEffectTarget(e) end
Duel.SetTargetCard(Duel.GetAttacker())
end
function c62340868.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL)
e1:SetValue(0)
tc:RegisterEffect(e1)
end
end
--竜破壊の証
function c6390406.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c6390406.target)
e1:SetOperation(c6390406.activate)
c:RegisterEffect(e1)
end
function c6390406.filter(c)
return c:IsCode(78193831) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c6390406.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c6390406.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c6390406.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c6390406.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--ドラゴン·アイス
function c64262809.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64262809,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c64262809.spcon)
e1:SetCost(c64262809.spcost)
e1:SetTarget(c64262809.sptg)
e1:SetOperation(c64262809.spop)
c:RegisterEffect(e1)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c64262809.excon)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCode(EFFECT_SPSUMMON_CONDITION)
e5:SetValue(c64262809.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c64262809.descon)
c:RegisterEffect(e6)
end
function c64262809.cfilter(c,tp)
return c:GetSummonPlayer()==1-tp
end
function c64262809.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c64262809.cfilter,1,nil,tp)
end
function c64262809.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c64262809.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if e:GetHandler():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.ShuffleHand(tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c64262809.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c64262809.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==64262809 and (fid==nil or c:GetFieldID()<fid)
end
function c64262809.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c64262809.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c64262809.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c64262809.exfilter,tgp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c64262809.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c64262809.exfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,c:GetFieldID())
end
...@@ -54,5 +54,6 @@ function c65301952.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,5 +54,6 @@ function c65301952.setop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsSSetable,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsSSetable,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst()) Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end end
end end
...@@ -29,7 +29,7 @@ end ...@@ -29,7 +29,7 @@ end
function c68392533.eqlimit(e,c) function c68392533.eqlimit(e,c)
return c:IsRace(RACE_PSYCHO) return c:IsRace(RACE_PSYCHO)
end end
function c68392533.filter(c,tp) function c68392533.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PSYCHO) return c:IsFaceup() and c:IsRace(RACE_PSYCHO)
end end
function c68392533.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c68392533.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
--モーム
function c71717923.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71717923,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c71717923.descost)
e1:SetTarget(c71717923.destg)
e1:SetOperation(c71717923.desop)
c:RegisterEffect(e1)
end
function c71717923.costfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH)
and Duel.IsExistingMatchingCard(c71717923.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack())
end
function c71717923.filter(c,atk)
return c:IsFaceup() and c:IsDestructable() and c:GetDefence()<=atk
end
function c71717923.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c71717923.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c71717923.costfilter,1,1,nil)
e:SetLabel(g:GetFirst():GetAttack())
Duel.Release(g,REASON_COST)
end
function c71717923.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c71717923.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c71717923.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71717923.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetLabel())
Duel.Destroy(g,REASON_EFFECT)
end
...@@ -55,6 +55,7 @@ function c73915051.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,6 +55,7 @@ function c73915051.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_UNRELEASEABLE_SUM) e1:SetCode(EFFECT_UNRELEASEABLE_SUM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true) token:RegisterEffect(e1,true)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
......
--ダーク·パーシアス
function c76925842.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c76925842.atkval)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(76925842,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCost(c76925842.drcost)
e2:SetTarget(c76925842.drtg)
e2:SetOperation(c76925842.drop)
c:RegisterEffect(e2)
end
function c76925842.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK)*100
end
function c76925842.rfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function c76925842.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76925842.rfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c76925842.rfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c76925842.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c76925842.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
...@@ -12,7 +12,8 @@ function c7852878.initial_effect(c) ...@@ -12,7 +12,8 @@ function c7852878.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c7852878.condition(e,tp,eg,ep,ev,re,r,rp) function c7852878.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==e:GetHandler() and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefence() return Duel.GetAttackTarget()==e:GetHandler() and e:GetHandler():IsDefence()
and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefence()
end end
function c7852878.target(e,tp,eg,ep,ev,re,r,rp,chk) function c7852878.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
--青い忍者
function c9076207.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9076207,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c9076207.target)
e1:SetOperation(c9076207.operation)
c:RegisterEffect(e1)
end
function c9076207.filter(c)
return c:IsFacedown() or c:IsType(TYPE_SPELL)
end
function c9076207.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c9076207.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c9076207.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
if g:GetCount()>0 and g:GetFirst():IsFaceup() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end
function c9076207.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end
if tc:IsType(TYPE_SPELL) then Duel.Destroy(tc,REASON_EFFECT) end
end
end
--タン·ツイスター
function c91250514.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(91250514,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c91250514.condition)
e1:SetTarget(c91250514.target)
e1:SetOperation(c91250514.operation)
c:RegisterEffect(e1)
end
function c91250514.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_ADVANCE)==SUMMON_TYPE_ADVANCE
end
function c91250514.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c91250514.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,2,REASON_EFFECT)
Duel.BreakEffect()
if e:GetHandler():IsRelateToEffect(e) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
end
...@@ -22,7 +22,7 @@ function c92901944.initial_effect(c) ...@@ -22,7 +22,7 @@ function c92901944.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c92901944.cfilter(c,tp) function c92901944.cfilter(c,tp)
return c:IsSetCard(0x24) and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp return c:IsSetCard(0x24) and c:GetCode()~=92901944 and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end end
function c92901944.spcon(e,tp,eg,ep,ev,re,r,rp) function c92901944.spcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +28,7 @@ end
function c94878265.operation(e,tp,eg,ep,ev,re,r,rp) function c94878265.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
--水魔神-スーガ
function c98434877.initial_effect(c)
--atkdown
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98434877,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1)
e1:SetCondition(c98434877.condition)
e1:SetTarget(c98434877.target)
e1:SetOperation(c98434877.operation)
c:RegisterEffect(e1)
end
function c98434877.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==e:GetHandler()
end
function c98434877.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttacker():IsCanBeEffectTarget(e) end
Duel.SetTargetCard(Duel.GetAttacker())
end
function c98434877.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL)
e1:SetValue(0)
tc:RegisterEffect(e1)
end
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