Commit 81224db7 authored by Nemo Ma's avatar Nemo Ma

fix

parent 14903c6d
......@@ -32,31 +32,11 @@ function c1008007.initial_effect(c)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c1008007.target)
e4:SetOperation(c1008007.operation)
c:RegisterEffect(e4)
--creat void
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1008007,1))
e5:SetCategory(CATEGORY_EQUIP)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_SINGLE)
e5:SetCode(1008001)
e5:SetRange(LOCATION_MZONE)
e5:SetTarget(c1008007.voidtg)
e5:SetOperation(c1008007.voidop)
c:RegisterEffect(e5)
--send remove
local e6=Effect.CreateEffect(c)
e6:SetCode(EFFECT_SEND_REPLACE)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e6:SetRange(LOCATION_MZONE)
e6:SetTarget(c1008007.reptarget)
e6:SetOperation(c1008007.repoperation)
c:RegisterEffect(e6)
end
function c1008007.actcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
......
function c115632163.initial_effect(c)
c:EnableCounterPermit(0x1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_CHAIN_END+TIMING_END_PHASE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c115632163.ctcon)
e3:SetOperation(c115632163.ctop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER))
e4:SetValue(c115632163.atkval)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c115632163.thcon)
e5:SetTarget(c115632163.thtg)
e5:SetOperation(c115632163.thop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_SSET)
c:RegisterEffect(e7)
c:EnableCounterPermit(0x1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_CHAIN_END+TIMING_END_PHASE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c115632163.ctcon)
e3:SetOperation(c115632163.ctop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER))
e4:SetValue(c115632163.atkval)
c:RegisterEffect(e4)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_LEAVE_FIELD_P)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e8:SetOperation(c115632163.regop)
c:RegisterEffect(e8)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(c115632163.thcon)
e5:SetTarget(c115632163.thtg)
e5:SetOperation(c115632163.thop)
e5:SetLabelObject(e8)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_SSET)
c:RegisterEffect(e7)
end
function c115632163.ctcon(e,tp,eg,ep,ev,re,r,rp)
if not re then return false end
local c=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and c:IsSetCard(0x306e) and e:GetHandler():GetFlagEffect(1)>0
if not re then return false end
local c=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and c:IsSetCard(0x306e) and e:GetHandler():GetFlagEffect(1)>0
end
function c115632163.ctcon(e,tp,eg,ep,ev,re,r,rp)
if not re then return false end
local c=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and c:IsSetCard(0x306e) and e:GetHandler():GetFlagEffect(1)>0
if not re then return false end
local c=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and c:IsSetCard(0x306e) and e:GetHandler():GetFlagEffect(1)>0
end
function c115632163.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1,1)
e:GetHandler():AddCounter(0x1,1)
end
function c115632163.atkval(e,c)
return e:GetHandler():GetCounter(0x1)*100
return e:GetHandler():GetCounter(0x1)*100
end
function c115632163.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x1)
e:SetLabel(ct)
end
function c115632163.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0x1)
e:SetLabel(ct)
return ct>0 and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_DESTROY)
local c=e:GetHandler()
local ct=e:GetLabelObject():GetLabel()
e:SetLabel(ct)
return ct>0 and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_DESTROY)
end
function c115632163.filter(c,lv)
return c:IsLevelBelow(lv) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
return c:IsLevelBelow(lv) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function c115632163.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c115632163.filter,tp,LOCATION_DECK,0,1,nil,e:GetLabel()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(c115632163.filter,tp,LOCATION_DECK,0,1,nil,e:GetLabel()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c115632163.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c115632163.filter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c115632163.filter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
......@@ -40,16 +40,19 @@ function c115848157.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c115848157.sptg)
e1:SetOperation(c115848157.spop)
e1:SetReset(RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c115848157.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemove() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,LOCATION_DECK)
end
function c115848157.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Remove(c,POS_FACEUP,REASON_EFFECT)==0 then return end
Duel.Draw(tp,1,REASON_EFFECT)
end
......@@ -80,7 +80,7 @@ function c123064604.discon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end
function c123064604.sumfilter(c,lv)
return c:GetLevel()>=lv and c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) and not c:IsPublic()
return c:GetLevel()>=lv and (c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)) and not c:IsPublic()
end
function c123064604.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=eg:GetFirst()
......@@ -109,11 +109,10 @@ function c123064604.disop(e,tp,eg,ep,ev,re,r,rp)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
Duel.NegateActivation(ev)
else
Duel.MSet(tp,tc,true,nil,1)
Duel.NegateActivation(ev)
end
Duel.NegateActivation(ev)
end
end
function c123064604.cfilter(c)
......
......@@ -37,7 +37,7 @@ function c46260002.initial_effect(c)
end
c46260002.fit_monster={46260003}
function c46260002.spfilter(c,e,tp,mc)
return bit.band(c:GetType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc,tp)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and mc:IsCanBeRitualMaterial(c)
return bit.band(c:GetOriginalType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc,tp)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and mc:IsCanBeRitualMaterial(c)
end
function c46260002.rfilter(c,mc)
local mlv=mc:GetRitualLevel(c)
......@@ -75,7 +75,7 @@ function c46260002.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
return mg:IsExists(c46260002.filter,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_PZONE)
end
function c46260002.rop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......@@ -91,7 +91,7 @@ function c46260002.rop(e,tp,eg,ep,ev,re,r,rp)
local mat=mg:FilterSelect(tp,c46260002.filter,1,1,nil,e,tp)
local mc=mat:GetFirst()
if not mc then return end
local sg=Duel.GetMatchingGroup(c46260002.spfilter,tp,LOCATION_HAND,0,mc,e,tp,mc)
local sg=Duel.GetMatchingGroup(c46260002.spfilter,tp,LOCATION_HAND+LOCATION_PZONE,0,mc,e,tp,mc)
if mc:IsLocation(LOCATION_MZONE) then ft=ft+1 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local b1=sg:IsExists(c46260002.rfilter,1,nil,mc)
......@@ -119,7 +119,7 @@ function c46260002.rop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(tg) do
tc:SetMaterial(mat)
end
Duel.ReleaseRitualMaterial(mat)
Duel.SendtoGrave(mat,REASON_RELEASE+REASON_EFFECT+REASON_RITUAL)
Duel.BreakEffect()
for tc in aux.Next(tg) do
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
......
--从两仪中诞生的五行星
function c46260004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,46260004)
e1:SetOperation(c46260004.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,46260004)
e1:SetOperation(c46260004.activate)
c:RegisterEffect(e1)
end
function c46260004.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c46260004.regop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local g=Group.CreateGroup()
g:KeepAlive()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetOperation(c46260004.effop)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetLabelObject(g)
Duel.RegisterEffect(e3,tp)
e1:SetLabelObject(e3)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c46260004.regop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local g=Group.CreateGroup()
g:KeepAlive()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetOperation(c46260004.effop)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetLabelObject(g)
Duel.RegisterEffect(e3,tp)
e1:SetLabelObject(e3)
end
function c46260004.regfilter(c)
return c:IsSummonType(SUMMON_TYPE_RITUAL)
return c:IsSummonType(SUMMON_TYPE_RITUAL)
end
function c46260004.regop1(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():GetLabelObject():Merge(eg:Filter(Card.IsSummonType,nil,SUMMON_TYPE_RITUAL))
e:GetLabelObject():GetLabelObject():Merge(eg:Filter(Card.IsSummonType,nil,SUMMON_TYPE_RITUAL))
end
function c46260004.filter(c,e,tp,mg)
if bit.band(c:GetType(),0x81)~=0x81 or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg1=mg:Clone()
mg1:RemoveCard(c)
return mg1:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,e:GetLabel(),c)
if bit.band(c:GetType(),0x81)~=0x81 or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg1=mg:Clone()
mg1:RemoveCard(c)
return mg1:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,e:GetLabel(),c)
end
function c46260004.mfilter(c,e)
return c:GetLevel()>0 and c:IsReleasableByEffect()
return c:GetLevel()>0 and c:IsReleasableByEffect()
end
function c46260004.effop(e,tp,eg,ep,ev,re,r,rp)
local n=e:GetLabelObject():GetClassCount(Card.GetAttribute)
Duel.Hint(HINT_CARD,0,46260004)
if n<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local mg=Duel.GetMatchingGroup(c46260004.mfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c46260004.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,mg)
local tc=tg:GetFirst()
if tc then
mg:RemoveCard(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,n,tc)
tc:SetMaterial(mat)
Duel.SendtoGrave(mat,REASON_RELEASE+REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
local n=e:GetLabelObject():GetClassCount(Card.GetAttribute)
Duel.Hint(HINT_CARD,0,46260004)
if n<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local mg=Duel.GetMatchingGroup(c46260004.mfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c46260004.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,mg)
local tc=tg:GetFirst()
if tc then
mg:RemoveCard(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,n,tc)
tc:SetMaterial(mat)
Duel.SendtoGrave(mat,REASON_RELEASE+REASON_EFFECT+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
......@@ -43,5 +43,6 @@ function c84500028.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,LOCATION_DECK)
end
function c84500028.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
......@@ -45,6 +45,7 @@ function c84500029.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c84500029.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tg=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if not tg then return end
......
......@@ -45,6 +45,7 @@ function c84500031.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c84500031.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local tg=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if not tg then return end
......
function c84500032.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,84500032)
e1:SetCost(c84500032.spcost)
e1:SetTarget(c84500032.target)
e1:SetOperation(c84500032.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(84500032,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c84500032.drtg)
e2:SetOperation(c84500032.drop)
c:RegisterEffect(e2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,84500032)
e1:SetCost(c84500032.spcost)
e1:SetTarget(c84500032.target)
e1:SetOperation(c84500032.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(84500032,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c84500032.drtg)
e2:SetOperation(c84500032.drop)
c:RegisterEffect(e2)
end
function c84500032.spcost(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)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c84500032.spfilter(c,e,tp)
return c:IsCode(84500026) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsCode(84500026) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c84500032.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c84500032.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c84500032.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c84500032.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.GetFirstMatchingCard(c84500032.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.GetFirstMatchingCard(c84500032.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
function c84500032.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,LOCATION_DECK)
end
function c84500032.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Draw(tp,1,REASON_EFFECT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(c84500032.imvalue)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(c84500032.imvalue)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.Draw(tp,1,REASON_EFFECT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(c84500032.imvalue)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(c84500032.imvalue)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
function c84500032.imvalue(e,re)
return re:GetOwnerPlayer()~=e:GetOwnerPlayer()
return re:GetOwnerPlayer()~=e:GetOwnerPlayer()
end
\ No newline at end of file
function c84500033.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,84500033)
e1:SetCost(c84500033.spcost)
e1:SetTarget(c84500033.target)
e1:SetOperation(c84500033.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(84500033,0))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c84500033.drtg)
e2:SetOperation(c84500033.drop)
c:RegisterEffect(e2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,84500033)
e1:SetCost(c84500033.spcost)
e1:SetTarget(c84500033.target)
e1:SetOperation(c84500033.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(84500033,0))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c84500033.drtg)
e2:SetOperation(c84500033.drop)
c:RegisterEffect(e2)
end
function c84500033.spcost(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)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c84500033.spfilter(c,e,tp)
return c:IsCode(84500026) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsCode(84500026) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c84500033.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c84500033.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c84500033.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c84500033.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.GetFirstMatchingCard(c84500033.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.GetFirstMatchingCard(c84500033.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
function c84500033.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c84500033.drop(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.Destroy(Duel.GetFieldGroup(tp,0,LOCATION_MZONE),REASON_EFFECT)
if n>0 then
Duel.Damage(1-tp,n*200,REASON_EFFECT)
end
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
local n=Duel.Destroy(Duel.GetFieldGroup(tp,0,LOCATION_MZONE),REASON_EFFECT)
if n>0 then
Duel.Damage(1-tp,n*200,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -49,15 +49,17 @@ function c9910504.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c9910504.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
local mg=Duel.GetRitualMaterial(tp)
local atkg=Duel.GetMatchingGroup(c9910504.atkfilter2,tp,LOCATION_MZONE,0,nil,e)
local g1=Duel.GetMatchingGroup(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,nil,c9910504.filter,e,tp,mg,nil,Card.GetLevel,"Greater")
local g2=Duel.GetMatchingGroup(c9910504.filter2,tp,LOCATION_HAND,0,nil,e,tp,atkg)
g1:Merge(g2)
if g1:GetCount()==0 then return end
g:Merge(g1)
g:Merge(g2)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g1:Select(tp,1,1,nil):GetFirst()
if not g2:IsContains(tc) or Duel.SelectOption(tp,aux.Stringid(9910504,0),aux.Stringid(9910504,1))==0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
if g1:IsContains(tc) and (not g2:IsContains(tc) or Duel.SelectOption(tp,aux.Stringid(9910504,0),aux.Stringid(9910504,1))==0) then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
......
......@@ -76,7 +76,7 @@ function c9910509.indcon(e)
local tc=c:GetEquipTarget()
return tc:IsAttribute(ATTRIBUTE_FIRE)
end
function c9910509.thcfilter(c)
function c9910509.thcfilter(c,tp)
return c:IsSetCard(0xa950) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c9910509.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
......@@ -84,9 +84,9 @@ function c9910509.thfilter(c,code)
return c:IsSetCard(0xa950) and c:IsType(TYPE_MONSTER) and not c:IsCode(code) and c:IsAbleToHand()
end
function c9910509.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910509.thcfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c9910509.thcfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9910509.thcfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c9910509.thcfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.Remove(g,POS_FACEUP,REASON_COST)
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