Commit f7f837af authored by POLYMER's avatar POLYMER

fix

parent 46b1805d
No preview for this file type
......@@ -46,7 +46,8 @@ function s.htgop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(s.Spfi1ter,tp,0x08,0,c,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local zone=Duel.GetLocationCount(tp,0x04)
if #g>0 and zone>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -77,6 +77,7 @@ function cm.tnop(e,tp,eg,ep,ev,re,r,rp)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetCountLimit(1)
e3:SetCondition(cm.discon)
e3:SetTarget(cm.distg)
e3:SetOperation(cm.disop)
......
--我 推 的 孩 子
local m=43990013
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,43990016)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c43990013.opcost)
c:RegisterEffect(e1)
--Destroy
-- local e2=Effect.CreateEffect(c)
-- e2:SetCategory(CATEGORY_TOHAND)
-- e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
-- e2:SetCode(EVENT_DESTROYED)
-- e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
-- e2:SetRange(LOCATION_FZONE)
-- e2:SetCondition(c43990013.decon)
-- e2:SetTarget(c43990013.detg)
-- e2:SetOperation(c43990013.deop)
-- c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,43990013)
e3:SetCondition(c43990013.thcon)
e3:SetTarget(c43990013.thtg)
e3:SetOperation(c43990013.thop)
c:RegisterEffect(e3)
--atk/def up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY))
e2:SetValue(c43990013.val)
c:RegisterEffect(e2)
end
function c43990013.atkfilter(c)
return c:IsCode(43990016)
end
function c43990013.val(e,c)
return Duel.GetMatchingGroupCount(c43990013.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*300
end
function c43990013.costfilter(c)
return c:IsCode(43990016) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c43990013.opcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990013.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c43990013.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c43990013.defilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsCode(43990016)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c43990013.decon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c43990013.defilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c43990013.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c43990013.deop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
function c43990013.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end
function c43990013.thfilter(c)
return aux.IsCodeListed(c,43990016) and not c:IsCode(43990013) and c:IsAbleToHand()
end
function c43990013.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990013.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c43990013.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c43990013.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
--15年 の 嘘
local m=43990014
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,43990014)
aux.AddCodeList(c,43990016)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--destroy
-- local e1=Effect.CreateEffect(c)
-- e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE)
-- e1:SetType(EFFECT_TYPE_QUICK_O)
-- e1:SetCode(EVENT_FREE_CHAIN)
-- e1:SetRange(LOCATION_SZONE)
-- e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
-- e1:SetCountLimit(1)
-- e1:SetTarget(c43990014.destg)
-- e1:SetOperation(c43990014.desop)
-- c:RegisterEffect(e1)
--Draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_SZONE+LOCATION_GRAVE)
e2:SetCountLimit(1,43990014)
e2:SetCondition(c43990014.drcon)
e2:SetTarget(c43990014.drtg)
e2:SetOperation(c43990014.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_LEAVE_GRAVE)
c:RegisterEffect(e3)
--destroy
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_CHAINING)
e6:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e6:SetRange(LOCATION_SZONE)
e6:SetCondition(c43990014.decon)
e6:SetTarget(c43990014.detg)
e6:SetOperation(c43990014.deop)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_DESTROY+CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e7:SetCode(EVENT_ATTACK_ANNOUNCE)
e7:SetRange(LOCATION_SZONE)
e7:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e7:SetCondition(c43990014.decon2)
e7:SetTarget(c43990014.detg2)
e7:SetOperation(c43990014.deop2)
c:RegisterEffect(e7)
--untarget
-- local e4=Effect.CreateEffect(c)
-- e4:SetType(EFFECT_TYPE_FIELD)
-- e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
-- e4:SetRange(LOCATION_SZONE)
-- e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
-- e4:SetTargetRange(LOCATION_MZONE,0)
-- e4:SetTarget(c43990014.atktg)
-- e4:SetValue(1)
-- c:RegisterEffect(e4)
--atkup
-- local e5=Effect.CreateEffect(c)
-- e5:SetType(EFFECT_TYPE_FIELD)
-- e5:SetCode(EFFECT_UPDATE_ATTACK)
-- e5:SetRange(LOCATION_SZONE)
-- e5:SetTargetRange(LOCATION_MZONE,0)
-- e5:SetTarget(c43990014.atktg)
-- e5:SetValue(500)
-- c:RegisterEffect(e5)
end
function c43990014.decon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER)
end
function c43990014.detg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) and Duel.IsExistingMatchingCard(c43990014.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c43990014.deop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c43990014.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c43990014.decon2(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c43990014.detg2(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
if chk==0 then return tc:IsOnField() end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c43990014.deop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c43990014.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c43990014.atktg(e,c)
return aux.IsCodeListed(c,43990016) and c:IsFaceup()
end
function c43990014.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCode(43990016) and c:IsAbleToGrave()
end
function c43990014.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(c43990014.tgfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c43990014.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c43990014.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
end
function c43990014.drconf(c,tp)
return c:IsCode(43990016) and c:IsPreviousControler(tp)
end
function c43990014.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c43990014.drconf,1,nil,tp)
end
function c43990014.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(c43990014.tgfilter,tp,LOCATION_DECK,0,1,nil) end
c:ResetFlagEffect(43990014)
if c:IsLocation(LOCATION_GRAVE) then
Duel.RegisterFlagEffect(tp,43990014,0,0,1)
c:RegisterFlagEffect(43990014,0,0,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,LOCATION_GRAVE)
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c43990014.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c43990014.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and c:GetFlagEffect(43990014)~=0 then
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
\ No newline at end of file
--新 生 B小 町
local m=43990015
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,43990015)
aux.AddCodeList(c,43990016)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--CATEGORY_DISABLE
-- local e1=Effect.CreateEffect(c)
-- e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TOGRAVE)
-- e1:SetType(EFFECT_TYPE_QUICK_O)
-- e1:SetCode(EVENT_FREE_CHAIN)
-- e1:SetRange(LOCATION_SZONE)
-- e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
-- e1:SetCountLimit(1)
-- e1:SetTarget(c43990015.destg)
-- e1:SetOperation(c43990015.desop)
-- c:RegisterEffect(e1)
--Draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_SZONE+LOCATION_GRAVE)
e2:SetCountLimit(1,43990015)
e2:SetCondition(c43990015.drcon)
e2:SetTarget(c43990015.drtg)
e2:SetOperation(c43990015.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_LEAVE_GRAVE)
c:RegisterEffect(e3)
--untarget
-- local e4=Effect.CreateEffect(c)
-- e4:SetType(EFFECT_TYPE_FIELD)
-- e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
-- e4:SetRange(LOCATION_SZONE)
-- e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
-- e4:SetTargetRange(LOCATION_MZONE,0)
-- e4:SetTarget(c43990015.atktg)
-- e4:SetValue(1)
-- c:RegisterEffect(e4)
--atkup
-- local e5=Effect.CreateEffect(c)
-- e5:SetType(EFFECT_TYPE_FIELD)
-- e5:SetCode(EFFECT_UPDATE_ATTACK)
-- e5:SetRange(LOCATION_SZONE)
-- e5:SetTargetRange(LOCATION_MZONE,0)
-- e5:SetTarget(c43990015.atktg)
-- e5:SetValue(500)
-- c:RegisterEffect(e5)
--Draw
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_TODECK)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetRange(LOCATION_SZONE)
e6:SetCountLimit(1)
e6:SetCondition(c43990015.spcon)
e6:SetTarget(c43990015.sptg)
e6:SetOperation(c43990015.spop)
c:RegisterEffect(e6)
end
function c43990015.spconf(c,tp)
return aux.IsCodeListed(c,43990016) and c:IsPreviousControler(tp)
end
function c43990015.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c43990015.spconf,1,nil,tp)
end
function c43990015.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCode(43990016) and c:IsAbleToGrave()
end
function c43990015.spfilter(c,e,tp)
return aux.IsCodeListed(c,43990016) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c43990015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c43990015.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c43990015.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c43990015.spop(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,c43990015.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c43990015.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c43990015.atktg(e,c)
return aux.IsCodeListed(c,43990016) and c:IsFaceup()
end
function c43990015.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(c43990015.tgfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c43990015.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tg=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=tg:GetFirst()
if tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c43990015.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c43990015.drconf(c,tp)
return c:IsCode(43990016) and c:IsPreviousControler(tp)
end
function c43990015.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c43990015.drconf,1,nil,tp)
end
function c43990015.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(c43990015.tgfilter,tp,LOCATION_DECK,0,1,nil) end
c:ResetFlagEffect(43990015)
if c:IsLocation(LOCATION_GRAVE) then
Duel.RegisterFlagEffect(tp,43990015,0,0,1)
c:RegisterFlagEffect(43990015,0,0,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,LOCATION_GRAVE)
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c43990015.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c43990015.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and c:GetFlagEffect(43990015)~=0 then
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
\ No newline at end of file
--利 益 熏 心 的 蓝 宝 石
local m=43990017
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,43990016)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCost(c43990017.spcost)
e1:SetTarget(c43990017.sptg)
e1:SetOperation(c43990017.spop)
c:RegisterEffect(e1)
--stt
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,43990017)
e2:SetCost(c43990017.thcost)
e2:SetTarget(c43990017.thtg)
e2:SetOperation(c43990017.thop)
c:RegisterEffect(e2)
end
function c43990017.cfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost()
end
function c43990017.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990017.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c43990017.cfilter,1,1,REASON_COST,e:GetHandler())
end
function c43990017.tdfilter(c)
return c:IsCode(43990016) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c43990017.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,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c43990017.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
function c43990017.thcostfilter(c)
return c:IsCode(43990016) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function c43990017.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990017.thcostfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c43990017.thcostfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c43990017.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c43990017.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)
end
end
\ No newline at end of file
--不 知 可 否 的 红 宝 石
local m=43990018
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,43990016)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCost(c43990018.spcost)
e1:SetTarget(c43990018.sptg)
e1:SetOperation(c43990018.spop)
c:RegisterEffect(e1)
--stt
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,43990018)
e2:SetCost(c43990018.sacost)
e2:SetTarget(c43990018.satg)
e2:SetOperation(c43990018.saop)
c:RegisterEffect(e2)
end
function c43990018.cfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost()
end
function c43990018.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990018.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c43990018.cfilter,1,1,REASON_COST,e:GetHandler())
end
function c43990018.tdfilter(c)
return c:IsCode(43990016) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c43990018.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,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c43990018.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
function c43990018.sacostfilter(c)
return c:IsCode(43990016) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function c43990018.sacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990018.sacostfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c43990018.sacostfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c43990018.stfilter(c,tp)
return aux.IsCodeListed(c,43990016) and c:CheckActivateEffect(false,true,false)~=nil and (c:GetType()==0x20002 or c:GetType()==0x20004 or c:GetType()==0x80002) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c43990018.satg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c43990018.stfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,tp) end
end
function c43990018.saop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c43990018.stfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and tc:GetType()==0x80002 then
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
end
\ No newline at end of file
--掌 握 体 验 派 的 女 演 员
local m=43990019
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,43990016)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,43990019)
e1:SetCost(c43990019.drcost)
e1:SetTarget(c43990019.drtg)
e1:SetOperation(c43990019.drop)
c:RegisterEffect(e1)
--can't be target
-- local e2=Effect.CreateEffect(c)
-- e2:SetType(EFFECT_TYPE_FIELD)
-- e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
-- e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
-- e2:SetRange(LOCATION_MZONE)
-- e2:SetTargetRange(LOCATION_MZONE,0)
-- e2:SetCondition(c43990019.condition)
-- e2:SetTarget(c43990019.tglimit)
-- e2:SetValue(aux.tgoval)
-- c:RegisterEffect(e2)
--
-- local e3=Effect.CreateEffect(c)
-- e3:SetType(EFFECT_TYPE_FIELD)
-- e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
-- e3:SetRange(LOCATION_MZONE)
-- e3:SetTargetRange(0,LOCATION_MZONE)
-- e3:SetCondition(c43990019.condition)
-- e3:SetValue(c43990019.atlimit)
-- c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,43991019)
e4:SetCondition(c43990019.spcon)
e4:SetTarget(c43990019.sptg)
e4:SetOperation(c43990019.spop)
c:RegisterEffect(e4)
end
function c43990019.atlimit(e,c)
return not c:IsCode(43990016)
end
function c43990019.tglimit(e,c)
return not c:IsCode(43990016)
end
function c43990019.spcfilter(c)
return c:IsFaceup() and c:IsCode(43990017)
end
function c43990019.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c43990019.spcfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c43990019.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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c43990019.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c43990019.cfilter(c)
return c:IsFaceup() and c:IsCode(43990016)
end
function c43990019.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c43990019.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c43990019.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsAbleToGraveAsCost() and b2 end
if b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,c)
local gc=g:GetFirst()
e:SetLabel(gc:GetCode())
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c43990019.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCode(43990016) and c:IsAbleToGrave()
end
function c43990019.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990019.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c43990019.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c43990019.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(43990019,0)) then
Duel.BreakEffect()
if Duel.Draw(tp,1,REASON_EFFECT)~=0 and e:GetLabel()==43990016 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(43990019,0)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
--爱 舔 小 苏 打 的 天 才 女 童 星
local m=43990020
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,43990016)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,43990020)
e1:SetCost(c43990020.drcost)
e1:SetTarget(c43990020.drtg)
e1:SetOperation(c43990020.drop)
c:RegisterEffect(e1)
-- local e2=Effect.CreateEffect(c)
-- e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
-- e2:SetProperty(EFFECT_FLAG_DELAY)
-- e2:SetCode(EVENT_SPSUMMON_SUCCESS)
-- e2:SetRange(LOCATION_MZONE)
-- e2:SetCondition(c43990020.lpcon1)
-- e2:SetOperation(c43990020.lpop1)
-- c:RegisterEffect(e2)
-- --sp_summon effect
-- local e3=Effect.CreateEffect(c)
-- e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
-- e3:SetCode(EVENT_SPSUMMON_SUCCESS)
-- e3:SetRange(LOCATION_MZONE)
-- e3:SetCondition(c43990020.regcon)
-- e3:SetOperation(c43990020.regop)
-- c:RegisterEffect(e3)
-- local e31=Effect.CreateEffect(c)
-- e31:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
-- e31:SetCode(EVENT_CHAIN_SOLVED)
-- e31:SetRange(LOCATION_MZONE)
-- e31:SetCondition(c43990020.lpcon2)
-- e31:SetOperation(c43990020.lpop2)
-- e31:SetLabelObject(e3)
-- c:RegisterEffect(e31)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,43991020)
e4:SetCondition(c43990020.spcon)
e4:SetTarget(c43990020.sptg)
e4:SetOperation(c43990020.spop)
c:RegisterEffect(e4)
end
function c43990020.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c43990020.cccfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c43990020.spcfilter(c)
return c:IsFaceup() and c:IsCode(43990018)
end
function c43990020.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c43990020.spcfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c43990020.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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c43990020.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c43990020.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsAbleToGraveAsCost() and b2 end
if b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,c)
local gc=g:GetFirst()
e:SetLabel(gc:GetCode())
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c43990020.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCode(43990016) and c:IsAbleToGrave()
end
function c43990020.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43990020.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c43990020.setfilter(c)
return aux.IsCodeListed(c,43990016) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c43990020.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c43990020.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c43990020.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(43990020,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,c43990020.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if Duel.SSet(tp,sg:GetFirst())~=0 and e:GetLabel()==43990016 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(43990020,0)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c43990020.cccfilter(c)
return c:IsFaceup() and c:IsCode(43990016)
end
function c43990020.cfilter(c,sp)
return c:IsType(TYPE_EFFECT)
and c:IsSummonPlayer(sp) and c:IsFaceup()
end
function c43990020.lpcon1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.IsExistingMatchingCard(c43990020.cccfilter,tp,LOCATION_ONFIELD,0,1,nil) and eg:IsExists(c43990020.cfilter,1,nil,1-tp)
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function c43990020.lpop1(e,tp,eg,ep,ev,re,r,rp)
local lg=eg:Filter(c43990020.cfilter,nil,1-tp)
local rnum=lg:GetSum(Card.GetAttack)
if Duel.Recover(tp,rnum,REASON_EFFECT)<1 then return end
Duel.RegisterFlagEffect(tp,43990020,RESET_PHASE+PHASE_END,0,1)
end
function c43990020.regcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return eg:IsExists(c43990020.cfilter,1,nil,1-tp)
and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function c43990020.regop(e,tp,eg,ep,ev,re,r,rp)
local lg=eg:Filter(c43990020.cfilter,nil,1-tp)
local g=e:GetLabelObject()
if g==nil or #g==0 then
lg:KeepAlive()
e:SetLabelObject(lg)
else
g:Merge(lg)
end
Duel.RegisterFlagEffect(tp,60643554,RESET_CHAIN,0,1)
end
function c43990020.lpcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c43990020.cccfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.GetFlagEffect(tp,60643554)>0
end
function c43990020.lpop2(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(tp,60643554)
local lg=e:GetLabelObject():GetLabelObject()
local rnum=lg:GetSum(Card.GetAttack)
local g=Group.CreateGroup()
g:KeepAlive()
e:GetLabelObject():SetLabelObject(g)
lg:DeleteGroup()
if Duel.Recover(tp,rnum,REASON_EFFECT)<1 then return end
Duel.RegisterFlagEffect(tp,43990020,RESET_PHASE+PHASE_END,0,1)
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