Commit cb308fc3 authored by POLYMER's avatar POLYMER

fix

parent 4f13f675
No preview for this file type
--Dargon Rose Princess
function c63790300.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c63790300.mfilter,1,1)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(63790300,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,63790300)
e1:SetCondition(c63790300.thcon)
e1:SetTarget(c63790300.thtg)
e1:SetOperation(c63790300.thop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(63790300,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c63790300.secost)
e3:SetTarget(c63790300.setg)
e3:SetOperation(c63790300.seop)
e3:SetCountLimit(1,63790301)
c:RegisterEffect(e3)
end
function c63790300.mfilter(c)
return c:IsLevelBelow(4) and (c:IsLinkRace(RACE_PLANT) or c:IsSetCard(0x1123))
end
function c63790300.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c63790300.thfilter(c)
return (c:IsCode(71645242) or c:IsCode(84335863)) and c:IsAbleToHand()
end
function c63790300.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63790300.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c63790300.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c63790300.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
function c63790300.secost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c63790300.sefilter(c)
return c:IsSetCard(0x1123) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c63790300.setg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63790300.sefilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c63790300.seop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c63790300.sefilter,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
\ No newline at end of file
--Gem Angel of Rose
function c63790302.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(63790302,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,63790302)
e1:SetTarget(c63790302.sptg1)
e1:SetOperation(c63790302.spop1)
c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(aux.indoval)
c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(63790302,1))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,63790303)
e4:SetCondition(c63790302.drcon)
e4:SetCost(c63790302.cost)
e4:SetTarget(c63790302.drtg)
e4:SetOperation(c63790302.drop)
c:RegisterEffect(e4)
end
function c63790302.rmfilter1(c)
return c:IsAbleToRemove()
end
function c63790302.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c63790302.rmfilter1,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(c63790302.rmfilter1,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,c63790302.rmfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(tp,c63790302.rmfilter1,tp,0,LOCATION_GRAVE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,2,1-tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c63790302.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c63790302.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c63790302.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c63790302.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,1)
end
function c63790302.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.Draw(p,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:Select(p,1,1,nil)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--Rosemagic
function c63790304.initial_effect(c)
aux.AddCodeList(c,73580471)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c63790304.target)
e1:SetOperation(c63790304.activate)
e1:SetCountLimit(1,63790304)
c:RegisterEffect(e1)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(63790304,1))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_REMOVED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,63790305)
e5:SetCondition(c63790304.thcon)
e5:SetTarget(c63790304.thtg)
e5:SetOperation(c63790304.thop)
c:RegisterEffect(e5)
--activate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(63790304,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,63790304)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c63790304.acttg)
e4:SetOperation(c63790304.actop)
c:RegisterEffect(e4)
end
function c63790304.filter(c,e,tp)
return c:IsSetCard(0x123) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)
end
function c63790304.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c63790304.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c63790304.activate(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,c63790304.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(63790304,RESET_EVENT+RESETS_STANDARD,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetCondition(c63790304.descon)
e2:SetOperation(c63790304.desop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetCountLimit(1)
Duel.RegisterEffect(e2,tp)
end
Duel.SpecialSummonComplete()
end
function c63790304.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffect(63790304)~=0 then
return true
else
e:Reset()
return false
end
end
function c63790304.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
function c63790304.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIONS) and re:GetHandler():IsCode(73580471,40139997)
end
function c63790304.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c63790304.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
function c63790304.actfilter(c,tp)
return (c:IsCode(71645242) or c:IsCode(84335863)) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c63790304.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63790304.actfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) end
end
function c63790304.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c63790304.actfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,FACE_UP,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
--Brightless Dagron Rose
function c63790306.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,63790306)
e1:SetTarget(c63790306.sptg)
e1:SetOperation(c63790306.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c63790306.thcon)
e2:SetDescription(aux.Stringid(63790306,0))
e2:SetCountLimit(1,63790307)
e2:SetTarget(c63790306.thtg)
e2:SetOperation(c63790306.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCondition(c63790306.tkcon)
e3:SetDescription(aux.Stringid(63790306,1))
e3:SetTarget(c63790306.tktg)
e3:SetOperation(c63790306.tkop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c63790306.starget)
e4:SetOperation(c63790306.soperation)
c:RegisterEffect(e4)
end
function c63790306.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x123) and not c:IsCode(63790306) and c:IsAbleToDeck()
end
function c63790306.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c63790306.tdfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c63790306.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c63790306.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c63790306.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
function c63790306.thfilter(c)
return c:IsSetCard(0X123) and c:IsAbleToHand() and not c:IsCode(63790306)
end
function c63790306.cfilter(c)
return c:IsFaceup() and c:IsCode(71645242)
end
function c63790306.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c63790306.cfilter,tp,LOCATION_FZONE+LOCATION_GRAVE,0,1,nil)
end
function c63790306.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63790306.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c63790306.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c63790306.thfilter,tp,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 c63790306.wfilter(c)
return c:IsFaceup() and c:IsCode(84335863)
end
function c63790306.tkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c63790306.wfilter,tp,LOCATION_FZONE+LOCATION_GRAVE,0,1,nil)
end
function c63790306.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c63790306.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK) then
local token=Duel.CreateToken(tp,76524507)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
function c63790306.sufilter(c,e,tp)
return c:IsSetCard(0x1123) and c:IsSummonable(true,nil)
end
function c63790306.starget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c63790306.sufilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c63790306.soperation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,c63790306.sufilter,tp,LOCATION_HAND,0,1,1,nil)
local sc=sg:GetFirst()
if sc then
Duel.Summon(tp,sc,true,nil)
end
end
--Mirage of Dead Flower
function c63790308.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(63790308,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,63790308)
e1:SetTarget(c63790308.target)
e1:SetOperation(c63790308.operation)
c:RegisterEffect(e1)
--change effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c63790308.chcon)
e2:SetOperation(c63790308.chop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCondition(c63790308.tkcon)
e3:SetOperation(c63790308.tkop)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCondition(c63790308.hucon)
e4:SetOperation(c63790308.huop)
c:RegisterEffect(e4)
end
function c63790308.filter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and c:IsLevelAbove(5)
end
function c63790308.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c63790308.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c63790308.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,aux.NecroValleyFilter(c63790308.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c63790308.chcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(99092624)
end
function c63790308.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,c63790308.repop)
end
function c63790308.repop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_FZONE,LOCATION_FZONE)+Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_FIELD)
if ct==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
repeat
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,tp)
local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,71645243,0,0x4011,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp)
if not (b1 or b2) then break end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(99092624,1),aux.Stringid(99092624,2))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(99092624,1))
else
op=Duel.SelectOption(tp,aux.Stringid(99092624,2))+1
end
local p=tp
if op>0 then p=1-tp end
local token=Duel.CreateToken(tp,99092625)
Duel.SpecialSummonStep(token,0,tp,p,false,false,POS_FACEUP_DEFENSE)
ct=ct-1
until ct==0 or not Duel.SelectYesNo(tp,aux.Stringid(99092624,0))
Duel.SpecialSummonComplete()
if Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
function c63790308.spfilter(c,e,tp)
return c:IsCode(63790308) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c63790308.tkcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(53503015)
end
function c63790308.tkop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,c63790308.tkpop)
end
function c63790308.tkpop(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,aux.NecroValleyFilter(c63790308.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
Duel.BreakEffect()
local opt=e:GetLabel()
if opt==1 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c63790308.drop)
Duel.RegisterEffect(e1,tp)
elseif opt==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c63790308.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c63790308.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,53503015)
if Duel.Draw(tp,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
function c63790308.spfilter1(c,e,tp)
return c:IsSetCard(0x1123) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c63790308.hucon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(69167267)
end
function c63790308.huop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,c63790308.hupop)
end
function c63790308.hupop(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,aux.NecroValleyFilter(c63790308.spfilter1),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.BreakEffect()
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
end
\ No newline at end of file
--Whisper of Bramble
function c63790400.initial_effect(c)
--nontuner
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_NONTUNER)
e1:SetValue(c63790400.ntval)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63790400,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,63790400)
e2:SetCondition(c63790400.spcon)
e2:SetTarget(c63790400.sptg)
e2:SetOperation(c63790400.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetOperation(c63790400.sppop)
c:RegisterEffect(e3)
--lv
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63790400,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,63790401)
e2:SetTarget(c63790400.tgtg)
e2:SetOperation(c63790400.tgop)
c:RegisterEffect(e2)
end
function c63790400.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x123)
end
function c63790400.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsExistingMatchingCard(c63790400.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c63790400.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 c63790400.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
function c63790400.sppop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
end
function c63790400.lvfilter(c)
return c:GetLevel()>0 and c:IsSetCard(0x123)
end
function c63790400.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63790400.lvfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c63790400.lvfilter,tp,LOCATION_GRAVE,0,1,1,nil)
e:SetLabelObject(g:GetFirst())
local lv=e:GetHandler():GetLevel()
if chk==0 then return lv>0 end
local opt
if e:GetLabelObject():GetLevel()<lv then
opt=Duel.SelectOption(tp,aux.Stringid(63790400,2),aux.Stringid(63790400,3))
else
opt=Duel.SelectOption(tp,aux.Stringid(63790400,2))
end
e:SetLabel(opt)
end
function c63790400.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabelObject():GetLevel()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
if e:GetLabel()==0 then
e1:SetValue(lv)
else
e1:SetValue(-lv)
end
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c63790400.ntval(e,c)
return e:GetHandler():IsControler(c:GetControler()) and (c:IsRace(RACE_PLANT) or c:IsRace(RACE_DRAGON))
end
--Flower Unloose The Fire
function c63790402.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(63790402,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,63790402)
e1:SetCondition(c63790402.thcon)
e1:SetTarget(c63790402.thtg)
e1:SetOperation(c63790402.thop)
c:RegisterEffect(e1)
--spsummon (self)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63790402,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,63790403)
e2:SetCondition(c63790402.condition)
e2:SetTarget(c63790402.negtg)
e2:SetOperation(c63790402.negop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(63790402,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,63790404)
e3:SetTarget(c63790402.sptg)
e3:SetOperation(c63790402.spop)
c:RegisterEffect(e3)
end
function c63790402.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c63790402.thfilter(c)
return c:IsCode(99092624,53503015,69167267) and c:IsAbleToHand()
end
function c63790402.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63790402.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c63790402.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c63790402.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
function c63790402.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and rp==tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c63790402.negfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and aux.disfilter1(c)
end
function c63790402.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63790402.negfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c63790402.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local ag=Duel.SelectMatchingCard(tp,c63790402.negfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=ag:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
function c63790402.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 c63790402.filter(c)
return c:IsFaceup() and c:IsSetCard(0x123)
end
function c63790402.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local ct=Duel.GetMatchingGroupCount(c63790402.filter,tp,LOCATION_REMOVED,0,nil)
if ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
Duel.SpecialSummonComplete()
end
--Another Rose
function c63790405.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(63790405,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,63790405)
e1:SetCost(c63790405.cost)
e1:SetTarget(c63790405.target)
e1:SetOperation(c63790405.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63790405,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,63790406)
e2:SetCost(c63790405.spcost)
e2:SetTarget(c63790405.sptg)
e2:SetOperation(c63790405.spop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(63790405,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,63790407)
e3:SetCondition(c63790405.thcon)
e3:SetTarget(c63790405.thtg)
e3:SetOperation(c63790405.thop)
c:RegisterEffect(e3)
end
function c63790405.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c63790405.filter(c)
return c:IsRace(RACE_PLANT) and c:IsLevelAbove(5) and c:IsAbleToHand()
end
function c63790405.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c63790405.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c63790405.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c63790405.filter,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
function c63790405.cfilter(c)
return c:IsCode(63790304) and c:IsAbleToGraveAsCost()
end
function c63790405.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63790405.cfilter,tp,LOCATION_DECK,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c63790405.cfilter,tp,LOCATION_DECK,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c63790405.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 c63790405.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)
end
function c63790405.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
return c:IsLocation(LOCATION_GRAVE) and (rc:IsSetCard(0x1123) or rc:IsRace(RACE_PLANT))and r&REASON_SYNCHRO+REASON_LINK~=0
end
function c63790405.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c63790405.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
...@@ -111,7 +111,7 @@ function s.initial_effect(c) ...@@ -111,7 +111,7 @@ function s.initial_effect(c)
Duel.RegisterEffect(sge5,0) Duel.RegisterEffect(sge5,0)
local sge6=sge4:Clone() local sge6=sge4:Clone()
sge6:SetCode(EVENT_SPSUMMON_SUCCESS) sge6:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(sge6,0) Duel.RegisterEffect(sge6,0)
end end
local control_player=0 local control_player=0
if _Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end if _Duel.GetFieldGroupCount(1,LOCATION_DECK,0)>0 then control_player=1 end
...@@ -400,6 +400,15 @@ function s.resetop(e,tp,eg,ep,ev,re,r,rp) ...@@ -400,6 +400,15 @@ function s.resetop(e,tp,eg,ep,ev,re,r,rp)
te:SetValue(val) te:SetValue(val)
e:Reset() e:Reset()
end end
function s.resetcard(c)
local ini=s.initial_effect
if c.initial_effect then
s.initial_effect=function() end
c:ReplaceEffect(id,0)
c.initial_effect(c)
s.initial_effect=ini
end
end
function s.menucon(e,tp,eg,ep,ev,re,r,rp) function s.menucon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
local bool=Duel.GetAttacker()==nil and ph==PHASE_BATTLE_STEP or ph==PHASE_MAIN1 or ph==PHASE_MAIN2 local bool=Duel.GetAttacker()==nil and ph==PHASE_BATTLE_STEP or ph==PHASE_MAIN1 or ph==PHASE_MAIN2
...@@ -533,7 +542,7 @@ function s.movespop(e,tp,eg,ep,ev,re,r,rp) ...@@ -533,7 +542,7 @@ function s.movespop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0x73,0,c,TYPE_MONSTER) local g=Duel.GetMatchingGroup(Card.IsType,tp,0x73,0,c,TYPE_MONSTER)
local sg=g:Select(tp,0,99,nil) local sg=g:Select(tp,0,99,nil)
--if #sg==0 then --if #sg==0 then
-- sg=_Group.RandomSelect(g,tp,math.min(3,#g)) -- sg=_Group.RandomSelect(g,tp,math.min(3,#g))
--end --end
for tc in aux.Next(sg) do for tc in aux.Next(sg) do
local cardtype=tc:GetType() local cardtype=tc:GetType()
...@@ -614,7 +623,7 @@ end ...@@ -614,7 +623,7 @@ end
function s.printcard(e,tp) function s.printcard(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
local codetable={} local codetable={}
local ac=s.AnnounceCard(tp) local ac=_Duel.AnnounceCard(tp)
table.insert(codetable,ac) table.insert(codetable,ac)
if KOISHI_CHECK and IO_CHECK and Duel.SelectYesNo(tp,aux.Stringid(id,15)) then if KOISHI_CHECK and IO_CHECK and Duel.SelectYesNo(tp,aux.Stringid(id,15)) then
local luatable=s.get_lua_numbers("script") local luatable=s.get_lua_numbers("script")
...@@ -688,11 +697,7 @@ function s.printcard(e,tp) ...@@ -688,11 +697,7 @@ function s.printcard(e,tp)
end end
cm.initial_effect=addinit cm.initial_effect=addinit
end end
local ini=s.initial_effect s.resetcard(tc)
s.initial_effect=function() end
tc:ReplaceEffect(id,0)
s.initial_effect=ini
tc.initial_effect(tc)
end end
end end
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
...@@ -1186,7 +1191,7 @@ function s.mindcontrol(e,tp) ...@@ -1186,7 +1191,7 @@ function s.mindcontrol(e,tp)
local dg=Duel.SelectMatchingCard(tp,f,sp,LOCATION_HAND,0,min,max,nc,...) local dg=Duel.SelectMatchingCard(tp,f,sp,LOCATION_HAND,0,min,max,nc,...)
return Duel.SendtoGrave(dg,r) return Duel.SendtoGrave(dg,r)
end end
function Duel.RemoveOverlayCard(sp,...) return _Duel.DRemoveOverlayCard(tp,...) end function Duel.RemoveOverlayCard(sp,...) return _Duel.RemoveOverlayCard(tp,...) end
function Duel.SelectMatchingCard(sp,f,p,sl,ol,max,min,ex,...) function Duel.SelectMatchingCard(sp,f,p,sl,ol,max,min,ex,...)
local sg=Duel.GetMatchingGroup(f,p,sl,ol,ex,...) local sg=Duel.GetMatchingGroup(f,p,sl,ol,ex,...)
Duel.ConfirmCards(tp,sg:Filter(s.confirmfilter,nil,tp)) Duel.ConfirmCards(tp,sg:Filter(s.confirmfilter,nil,tp))
...@@ -1222,11 +1227,11 @@ function s.mindcontrol(e,tp) ...@@ -1222,11 +1227,11 @@ function s.mindcontrol(e,tp)
return _Duel.SelectDisableField(tp,count,ol,sl,filter) return _Duel.SelectDisableField(tp,count,ol,sl,filter)
end end
end end
function Duel.SelectField(p,count,sl,ol,filter) function Duel.SelectField(p,count,sl,ol,filter,...)
if tp==p then if tp==p then
return _Duel.SelectField(tp,count,sl,ol,filter) return _Duel.SelectField(tp,count,sl,ol,filter,...)
else else
return _Duel.SelectField(tp,count,ol,sl,filter) return _Duel.SelectField(tp,count,ol,sl,filter,...)
end end
end end
...@@ -1318,7 +1323,7 @@ function s.mindcontrol(e,tp) ...@@ -1318,7 +1323,7 @@ function s.mindcontrol(e,tp)
ge4:SetTargetRange(0,LOCATION_HAND) ge4:SetTargetRange(0,LOCATION_HAND)
ge4:SetLabelObject(e4) ge4:SetLabelObject(e4)
Duel.RegisterEffect(ge4,tp) Duel.RegisterEffect(ge4,tp)
s.mindplayer=tp
s.controltable={sge,ge0,ge1,ge2,ge3,ge4} s.controltable={sge,ge0,ge1,ge2,ge3,ge4}
if not KOISHI_CHECK then return end if not KOISHI_CHECK then return end
local g=Duel.GetFieldGroup(0,0x7f,0x7f) local g=Duel.GetFieldGroup(0,0x7f,0x7f)
...@@ -1354,15 +1359,7 @@ function s.mindcontrol(e,tp) ...@@ -1354,15 +1359,7 @@ function s.mindcontrol(e,tp)
end end
cm.initial_effect=addinit cm.initial_effect=addinit
end end
local ini=s.initial_effect s.resetcard(tc)
s.initial_effect=function() end
for tc in aux.Next(g) do
if tc.initial_effect then
tc:ReplaceEffect(id,0)
tc.initial_effect(tc)
end
end
s.initial_effect=ini
end end
else else
Debug.Message("骇入结束") Debug.Message("骇入结束")
...@@ -1460,46 +1457,44 @@ function s.sumactivate(e,tp,eg,ep,ev,re,r,rp) ...@@ -1460,46 +1457,44 @@ function s.sumactivate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local s1=c:IsSummonable(false,nil) local s1=c:IsSummonable(false,nil)
local s2=c:IsMSetable(false,nil) local s2=c:IsMSetable(false,nil)
if (s1 and s2 and Duel.SelectPosition(1-tp,c,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or (s1 and not s2) then if (s1 and s2 and _Duel.SelectPosition(s.mindplayer,c,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or (s1 and not s2) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOZONE) local zone=Duel.SelectField(tp,1,LOCATION_MZONE,LOCATION_MZONE,~s.sumzone(c,1-tp),c:GetOriginalCode())
local zone=Duel.SelectField(1-tp,1,LOCATION_MZONE,LOCATION_MZONE,~s.sumzone(c,1-tp))
if zone<0x10000 then if zone<0x10000 then
Duel.Summon(tp,c,false,nil,0,zone) Duel.Summon(1-s.mindplayer,c,false,nil,0,zone)
else else
Duel.Summon(tp,c,false,nil,0,zone/0x10000) Duel.Summon(1-s.mindplayer,c,false,nil,0,zone/0x10000)
end end
elseif s2 then elseif s2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOZONE) local zone=Duel.SelectField(tp,1,LOCATION_MZONE,LOCATION_MZONE,~s.sumzone(c,1-tp),c:GetOriginalCode())
local zone=Duel.SelectField(1-tp,1,LOCATION_MZONE,LOCATION_MZONE,~s.sumzone(c,1-tp))
if zone<0x10000 then if zone<0x10000 then
Duel.MSet(tp,c,false,nil,0,zone) Duel.MSet(1-s.mindplayer,c,false,nil,0,zone)
else else
Duel.MSet(tp,c,false,nil,0,zone/0x10000) Duel.MSet(1-s.mindplayer,c,false,nil,0,zone/0x10000)
end end
end end
end end
function s.sptarget(e,tp,eg,ep,ev,re,r,rp,chk) function s.spscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsSpecialSummonable() or c:IsSynchroSummonable(nil) or c:IsXyzSummonable(nil) or c:IsLinkSummonable(nil) end return s.Control_Mode and tp~=e:GetHandler():GetOwner() and c:IsSpecialSummonable()
end end
function s.spscon(e,tp,eg,ep,ev,re,r,rp) function s.sptarget(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
return s.Control_Mode and tp~=e:GetHandler():GetOwner() and (c:IsSpecialSummonable() or c:IsSynchroSummonable(nil) or c:IsXyzSummonable(nil) or c:IsLinkSummonable(nil)) if chk==0 then return c:IsSpecialSummonable() end
end end
function s.spactivate(e,tp,eg,ep,ev,re,r,rp) function s.spactivate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local s1=c:IsSpecialSummonable() if not c:IsSpecialSummonable() then return end
local s2=c:IsSynchroSummonable(nil) local s1=c:IsSpecialSummonable(SUMMON_TYPE_FUSION)
local s3=c:IsXyzSummonable(nil) local s2=c:IsSpecialSummonable(SUMMON_TYPE_SYNCHRO)
local s4=c:IsLinkSummonable(nil) local s3=c:IsSpecialSummonable(SUMMON_TYPE_XYZ)
local s4=c:IsSpecialSummonable(SUMMON_TYPE_LINK)
local op=0 local op=0
if s1 and not s2 and not s3 and not s4 then if s1 or s2 or s3 or s4 then
op=1 op=aux.SelectFromOptions(s.mindplayer,{s1,1169},{s2,1164},{s3,1165},{s4,1166})
else
op=aux.SelectFromOptions(tp,{s2,1164},{s3,1165},{s4,1166})+1
end end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOZONE) local zoneable=s.spsumzone(c,1-tp)
local zone=Duel.SelectField(1-tp,1,LOCATION_MZONE,LOCATION_MZONE,~s.spsumzone(c,1-tp)) if zoneable==0 then return end
local zone=Duel.SelectField(tp,1,LOCATION_MZONE,LOCATION_MZONE,~zoneable,c:GetOriginalCode())
--zone limit --zone limit
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -1507,15 +1502,17 @@ function s.spactivate(e,tp,eg,ep,ev,re,r,rp) ...@@ -1507,15 +1502,17 @@ function s.spactivate(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1) e1:SetTargetRange(1,1)
e1:SetValue(zone) e1:SetValue(zone)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,s.mindplayer)
if op==1 then if op==0 then
Duel.SpecialSummonRule(tp,c) Duel.SpecialSummonRule(1-s.mindplayer,c,0)
elseif op==1 then
Duel.SpecialSummonRule(1-s.mindplayer,c,SUMMON_TYPE_FUSION)
elseif op==2 then elseif op==2 then
Duel.SynchroSummon(tp,c,nil) Duel.SpecialSummonRule(1-s.mindplayer,c,SUMMON_TYPE_SYNCHRO)
elseif op==3 then elseif op==3 then
Duel.XyzSummon(tp,c,nil) Duel.SpecialSummonRule(1-s.mindplayer,c,SUMMON_TYPE_XYZ)
elseif op==4 then elseif op==4 then
Duel.LinkSummon(tp,c,nil) Duel.SpecialSummonRule(1-s.mindplayer,c,SUMMON_TYPE_LINK)
end end
e1:Reset() e1:Reset()
end end
...@@ -1914,21 +1911,13 @@ function s.wildop() ...@@ -1914,21 +1911,13 @@ function s.wildop()
s.SetCountLimit(e,1,EFFECT_COUNT_CODE_CHAIN) s.SetCountLimit(e,1,EFFECT_COUNT_CODE_CHAIN)
end end
for tc in aux.Next(g) do for tc in aux.Next(g) do
local ini=s.initial_effect s.resetcard(tc)
s.initial_effect=function() end
tc:ReplaceEffect(id,0)
s.initial_effect=ini
if tc.initial_effect then tc.initial_effect(tc) end
end end
Effect.SetCountLimit=s.SetCountLimit Effect.SetCountLimit=s.SetCountLimit
else else
Debug.Message("歼灭模式 关") Debug.Message("歼灭模式 关")
for tc in aux.Next(g) do for tc in aux.Next(g) do
local ini=s.initial_effect s.resetcard(tc)
s.initial_effect=function() end
tc:ReplaceEffect(id,0)
s.initial_effect=ini
if tc.initial_effect then tc.initial_effect(tc) end
end end
end end
end end
......
...@@ -23,6 +23,7 @@ function c67200928.initial_effect(c) ...@@ -23,6 +23,7 @@ function c67200928.initial_effect(c)
e2:SetCode(EVENT_TO_DECK) e2:SetCode(EVENT_TO_DECK)
e2:SetCountLimit(1,67200928) e2:SetCountLimit(1,67200928)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c67200928.tecon)
e2:SetTarget(c67200928.tetg) e2:SetTarget(c67200928.tetg)
e2:SetOperation(c67200928.teop) e2:SetOperation(c67200928.teop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -44,6 +45,9 @@ function c67200928.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,6 +45,9 @@ function c67200928.negop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
-- --
function c67200928.tecon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function c67200928.filter(c) function c67200928.filter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xa67a) and not c:IsCode(67200928) return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xa67a) and not c:IsCode(67200928)
end end
......
...@@ -47,10 +47,10 @@ function c88990180.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,10 +47,10 @@ function c88990180.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c88990180.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c88990180.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsCanAddCounter(0x100e,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,0x100e,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,0x100e,1)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0x100e,1) Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0x100e,1)
end end
function c88990180.ctop(e,tp,eg,ep,ev,re,r,rp) function c88990180.ctop(e,tp,eg,ep,ev,re,r,rp)
......
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