Commit 3fc4973b authored by nanahira's avatar nanahira

Merge branch 'master' of git.mycard.moe:alstroemeria-silentlove/ygopro-222DIY-cards

parents efc8a07d 727545ee
Pipeline #825 passed with stages
in 39 minutes and 13 seconds
No preview for this file type
...@@ -27,7 +27,7 @@ function c1160043.initial_effect(c) ...@@ -27,7 +27,7 @@ function c1160043.initial_effect(c)
end end
-- --
function c1160043.cfilter1(c) function c1160043.cfilter1(c)
return c:GetLevel()==1 and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsType(TYPE_MONSTER) return c:GetLevel()==1 and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsType(TYPE_MONSTER) and c:GetPreviousAttackOnField()>=400
end end
function c1160043.con1(e,tp,eg,ep,ev,re,r,rp) function c1160043.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -52,13 +52,9 @@ function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,13 +52,9 @@ function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(cm.actlimit) e1:SetValue(aux.TRUE)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0))
end
function cm.actlimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end end
--e2 --e2
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -74,7 +74,7 @@ function c33700071.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +74,7 @@ function c33700071.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c33700071.aclimit(e,re,tp) function c33700071.aclimit(e,re,tp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(tc:GetCode())
end end
function c33700071.confilter(c) function c33700071.confilter(c)
return c:IsSetCard(0x442) and c:IsFaceup() and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x442) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
...@@ -91,8 +91,8 @@ function c33700071.effcon2(e) ...@@ -91,8 +91,8 @@ function c33700071.effcon2(e)
return g:GetClassCount(Card.GetCode)>=e:GetLabel() return g:GetClassCount(Card.GetCode)>=e:GetLabel()
end end
function c33700071.tg(e,c) function c33700071.tg(e,c)
return c:GetLevel()>e:GetHandler():GetLevel() and not c:IsImmuneToEffect(e) return c:GetLevel()>e:GetHandler():GetLevel()
end end
function c33700071.tg2(e,c) function c33700071.tg2(e,c)
return c:GetAttack()>e:GetHandler():GetAttack() and not c:IsImmuneToEffect(e) return c:GetAttack()>e:GetHandler():GetAttack()
end end
\ No newline at end of file
...@@ -33,7 +33,7 @@ function c33700088.initial_effect(c) ...@@ -33,7 +33,7 @@ function c33700088.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
e3:SetCondition(c33700088.actcon) e3:SetCondition(c33700088.actcon)
e3:SetValue(c33700088.limit) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Destroy --Destroy
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -81,7 +81,7 @@ function c33700088.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,7 @@ function c33700088.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c33700088.aclimit(e,re,tp) function c33700088.aclimit(e,re,tp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(tc:GetCode())
end end
function c33700088.effcon(e) function c33700088.effcon(e)
local g=Duel.GetMatchingGroup(c33700088.confilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c33700088.confilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)
...@@ -109,9 +109,6 @@ function c33700088.actcon(e) ...@@ -109,9 +109,6 @@ function c33700088.actcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (g:GetClassCount(Card.GetCode)>=12 or e:GetLabel()==33700090) and Duel.GetTurnPlayer()==e:GetHandlerPlayer() return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (g:GetClassCount(Card.GetCode)>=12 or e:GetLabel()==33700090) and Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end end
function c33700088.limit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c33700088.confilter(c) function c33700088.confilter(c)
return c:IsSetCard(0x442) and c:IsFaceup() and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x442) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end end
......
...@@ -32,7 +32,7 @@ function c33700089.initial_effect(c) ...@@ -32,7 +32,7 @@ function c33700089.initial_effect(c)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
e3:SetCondition(c33700089.actcon) e3:SetCondition(c33700089.actcon)
effect_list[7]=e3 effect_list[7]=e3
e3:SetValue(c33700089.limit) e3:SetValue(aux.TRUE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Destroy --Destroy
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -98,9 +98,6 @@ function c33700089.actcon(e) ...@@ -98,9 +98,6 @@ function c33700089.actcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (g:GetClassCount(Card.GetCode)>=7 or e:GetLabel()==33700090) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer() return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (g:GetClassCount(Card.GetCode)>=7 or e:GetLabel()==33700090) and Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end end
function c33700089.limit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c33700089.confilter(c) function c33700089.confilter(c)
return c:IsSetCard(0x442) and c:IsFaceup() and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x442) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end end
......
...@@ -21,15 +21,12 @@ function c33700905.initial_effect(c) ...@@ -21,15 +21,12 @@ function c33700905.initial_effect(c)
e3:SetCode(EFFECT_CANNOT_ACTIVATE) e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1) e3:SetTargetRange(1,1)
e3:SetValue(c33700905.aclimit) e3:SetValue(aux.TRUE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c33700905.disable(e,c) function c33700905.disable(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
end end
function c33700905.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c33700905.activate(e,tp,eg,ep,ev,re,r,rp) function c33700905.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
......
...@@ -158,7 +158,7 @@ end ...@@ -158,7 +158,7 @@ end
function c50218345.actval(e,re,rp) function c50218345.actval(e,re,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER)
and rc:IsType(TYPE_FUSION) and not rc:IsImmuneToEffect(e) and rc:IsType(TYPE_FUSION)
end end
function c50218345.hdcon(e,tp,eg,ep,ev,re,r,rp) function c50218345.hdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
......
--季神-阿可透布儿 --季神-阿可透布儿
function c50218350.initial_effect(c) function c50218350.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--splimit --splimit
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD) e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e0:SetRange(LOCATION_PZONE) e0:SetRange(LOCATION_PZONE)
e0:SetTargetRange(1,0) e0:SetTargetRange(1,0)
e0:SetTarget(c50218350.splimit) e0:SetTarget(c50218350.splimit)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--rsum --rsum
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,50218350) e1:SetCountLimit(1,50218350)
e1:SetTarget(c50218350.rtg) e1:SetTarget(c50218350.rtg)
e1:SetOperation(c50218350.rop) e1:SetOperation(c50218350.rop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act limit --act limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetCondition(c50218350.actcon) e2:SetCondition(c50218350.actcon)
e2:SetValue(c50218350.actval) e2:SetValue(c50218350.actval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--remove --remove
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE) e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,50218351) e3:SetCountLimit(1,50218351)
e3:SetCondition(c50218350.rmcon) e3:SetCondition(c50218350.rmcon)
e3:SetTarget(c50218350.rmtg) e3:SetTarget(c50218350.rmtg)
e3:SetOperation(c50218350.rmop) e3:SetOperation(c50218350.rmop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--draw --draw
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW) e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_RELEASE) e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,50218351) e4:SetCountLimit(1,50218351)
e4:SetTarget(c50218350.drtg) e4:SetTarget(c50218350.drtg)
e4:SetOperation(c50218350.drop) e4:SetOperation(c50218350.drop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c50218350.splimit(e,c,tp,sumtp,sumpos) function c50218350.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xcb3) return not c:IsSetCard(0xcb3)
end end
function c50218350.filter(c,e,tp,m,ft) function c50218350.filter(c,e,tp,m,ft)
if not c:IsSetCard(0xcb3) or bit.band(c:GetType(),0x81)~=0x81 if not c:IsSetCard(0xcb3) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if ft>0 then if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c) return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else else
return mg:IsExists(c50218350.rfilter,1,nil,tp,mg,c) return mg:IsExists(c50218350.rfilter,1,nil,tp,mg,c)
end end
end end
function c50218350.rfilter(c,tp,mg,rc) function c50218350.rfilter(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c) Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc) return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end else return false end
end end
function c50218350.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218350.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c50218350.filter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp,mg,ft) return ft>-1 and Duel.IsExistingMatchingCard(c50218350.filter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_REMOVED)
end end
function c50218350.rop(e,tp,eg,ep,ev,re,r,rp) function c50218350.rop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c50218350.filter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,c50218350.filter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,e,tp,mg,ft)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil local mat=nil
if ft>0 then if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c50218350.rfilter,1,1,nil,tp,mg,tc) mat=mg:FilterSelect(tp,c50218350.rfilter,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat) Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2) mat:Merge(mat2)
end end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
end end
function c50218350.actcon(e,tp,eg,ep,ev,re,r,rp) function c50218350.actcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end end
function c50218350.actval(e,re,rp) function c50218350.actval(e,re,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER)
and rc:IsType(TYPE_SYNCHRO) and not rc:IsImmuneToEffect(e) and rc:IsType(TYPE_SYNCHRO)
end end
function c50218350.rmcon(e,tp,eg,ep,ev,re,r,rp) function c50218350.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c50218350.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218350.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c50218350.rmop(e,tp,eg,ep,ev,re,r,rp) function c50218350.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
function c50218350.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218350.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c50218350.drop(e,tp,eg,ep,ev,re,r,rp) function c50218350.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
\ No newline at end of file
--季神-娄温布儿 --季神-娄温布儿
function c50218355.initial_effect(c) function c50218355.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--splimit --splimit
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD) e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e0:SetRange(LOCATION_PZONE) e0:SetRange(LOCATION_PZONE)
e0:SetTargetRange(1,0) e0:SetTargetRange(1,0)
e0:SetTarget(c50218355.splimit) e0:SetTarget(c50218355.splimit)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--rsum --rsum
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,50218355) e1:SetCountLimit(1,50218355)
e1:SetTarget(c50218355.rtg) e1:SetTarget(c50218355.rtg)
e1:SetOperation(c50218355.rop) e1:SetOperation(c50218355.rop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act limit --act limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetCondition(c50218355.actcon) e2:SetCondition(c50218355.actcon)
e2:SetValue(c50218355.actval) e2:SetValue(c50218355.actval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tograve --tograve
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,50218356) e3:SetCountLimit(1,50218356)
e3:SetCondition(c50218355.descon) e3:SetCondition(c50218355.descon)
e3:SetTarget(c50218355.destg) e3:SetTarget(c50218355.destg)
e3:SetOperation(c50218355.desop) e3:SetOperation(c50218355.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--draw --draw
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW) e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_RELEASE) e4:SetCode(EVENT_RELEASE)
e4:SetCountLimit(1,50218356) e4:SetCountLimit(1,50218356)
e4:SetTarget(c50218355.drtg) e4:SetTarget(c50218355.drtg)
e4:SetOperation(c50218355.drop) e4:SetOperation(c50218355.drop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c50218355.splimit(e,c,tp,sumtp,sumpos) function c50218355.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xcb3) return not c:IsSetCard(0xcb3)
end end
function c50218355.filter(c,e,tp,m,ft) function c50218355.filter(c,e,tp,m,ft)
if not c:IsSetCard(0xcb3) or bit.band(c:GetType(),0x81)~=0x81 if not c:IsSetCard(0xcb3) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if ft>0 then if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c) return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else else
return mg:IsExists(c50218355.rfilter,1,nil,tp,mg,c) return mg:IsExists(c50218355.rfilter,1,nil,tp,mg,c)
end end
end end
function c50218355.rfilter(c,tp,mg,rc) function c50218355.rfilter(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c) Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc) return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end else return false end
end end
function c50218355.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218355.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c50218355.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg,ft) return ft>-1 and Duel.IsExistingMatchingCard(c50218355.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c50218355.rop(e,tp,eg,ep,ev,re,r,rp) function c50218355.rop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c50218355.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,c50218355.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg,ft)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil local mat=nil
if ft>0 then if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c50218355.rfilter,1,1,nil,tp,mg,tc) mat=mg:FilterSelect(tp,c50218355.rfilter,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat) Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2) mat:Merge(mat2)
end end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
end end
function c50218355.actcon(e,tp,eg,ep,ev,re,r,rp) function c50218355.actcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end end
function c50218355.actval(e,re,rp) function c50218355.actval(e,re,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER)
and rc:IsType(TYPE_XYZ) and not rc:IsImmuneToEffect(e) and rc:IsType(TYPE_XYZ)
end end
function c50218355.descon(e,tp,eg,ep,ev,re,r,rp) function c50218355.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end end
function c50218355.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218355.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetFieldGroup(tp,0,LOCATION_FZONE+LOCATION_SZONE) local g=Duel.GetFieldGroup(tp,0,LOCATION_FZONE+LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end end
function c50218355.desop(e,tp,eg,ep,ev,re,r,rp) function c50218355.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_FZONE+LOCATION_SZONE) local g=Duel.GetFieldGroup(tp,0,LOCATION_FZONE+LOCATION_SZONE)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
function c50218355.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218355.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c50218355.drop(e,tp,eg,ep,ev,re,r,rp) function c50218355.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
\ No newline at end of file
This diff is collapsed.
...@@ -9,7 +9,7 @@ function cm.initial_effect(c) ...@@ -9,7 +9,7 @@ function cm.initial_effect(c)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(cm.actlimit) e1:SetValue(aux.TRUE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.actlimit(e,re,tp) function cm.actlimit(e,re,tp)
......
...@@ -60,7 +60,6 @@ function c60159911.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -60,7 +60,6 @@ function c60159911.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
end end
function c60159911.aclimit(e,re,tp) function c60159911.aclimit(e,re,tp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and e:GetHandler():GetSummonLocation()==LOCATION_HAND and e:GetHandler():IsFaceup() and re:IsActiveType(TYPE_MONSTER) and bit.band(re:GetHandler():GetSummonLocation(),LOCATION_EXTRA+LOCATION_GRAVE)~=0 return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and e:GetHandler():GetSummonLocation()==LOCATION_HAND and e:GetHandler():IsFaceup() and re:IsActiveType(TYPE_MONSTER) and bit.band(re:GetHandler():GetSummonLocation(),LOCATION_EXTRA+LOCATION_GRAVE)~=0
and not re:GetHandler():IsImmuneToEffect(e)
end end
function c60159911.ctcon(e,tp,eg,ep,ev,re,r,rp) function c60159911.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -18,13 +18,10 @@ function c77707025.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,13 +18,10 @@ function c77707025.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetValue(c77707025.aclimit) e2:SetValue(1)
e2:SetCondition(c77707025.actcon) e2:SetCondition(c77707025.actcon)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c77707025.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c77707025.actcon(e) function c77707025.actcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
......
...@@ -65,7 +65,7 @@ function c81012046.mat_filter(c) ...@@ -65,7 +65,7 @@ function c81012046.mat_filter(c)
end end
function c81012046.limval(e,re,rp) function c81012046.limval(e,re,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsType(TYPE_PENDULUM) and not rc:IsType(TYPE_RITUAL) and not rc:IsImmuneToEffect(e) return re:IsActiveType(TYPE_MONSTER) and rc:IsType(TYPE_PENDULUM) and not rc:IsType(TYPE_RITUAL)
end end
function c81012046.descon(e,tp,eg,ep,ev,re,r,rp) function c81012046.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
......
...@@ -49,7 +49,6 @@ function c81012063.initial_effect(c) ...@@ -49,7 +49,6 @@ function c81012063.initial_effect(c)
e6:SetHintTiming(0,TIMING_DRAW_PHASE) e6:SetHintTiming(0,TIMING_DRAW_PHASE)
e6:SetCountLimit(1,81012963) e6:SetCountLimit(1,81012963)
e6:SetCost(c81012063.actcost) e6:SetCost(c81012063.actcost)
e6:SetOperation(c81012063.actop) e6:SetOperation(c81012063.actop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
......
...@@ -56,7 +56,7 @@ function c81040010.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c81040010.actop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetCondition(c81040010.actcon) e1:SetCondition(c81040010.actcon)
e1:SetValue(c81040010.actlimit) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
...@@ -64,6 +64,3 @@ function c81040010.actcon(e) ...@@ -64,6 +64,3 @@ function c81040010.actcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c81040010.actlimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
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