Commit a43bbf76 authored by wind2009's avatar wind2009

Merge branch 'develop' into develop-8888

parents 984755c3 a3b6b284
...@@ -7,6 +7,7 @@ function c1154611.initial_effect(c) ...@@ -7,6 +7,7 @@ function c1154611.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c1154611.target) e1:SetTarget(c1154611.target)
e1:SetOperation(c1154611.activate) e1:SetOperation(c1154611.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -13,14 +13,19 @@ function c14731897.initial_effect(c) ...@@ -13,14 +13,19 @@ function c14731897.initial_effect(c)
e1:SetOperation(c14731897.activate) e1:SetOperation(c14731897.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c14731897.filter(c) function c14731897.sumfilter(c)
return c:IsFaceup() and c:IsDefenseAbove(0) return c:IsFaceup() and c:IsDefenseAbove(0)
end end
function c14731897.filter(c,def)
return c:IsFaceup() and c:IsDefenseAbove(0) and not c:IsDefense(def)
end
function c14731897.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c14731897.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c14731897.filter(chkc) end local g=Duel.GetMatchingGroup(c14731897.sumfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingTarget(c14731897.filter,tp,LOCATION_MZONE,0,1,nil) end local sum=g:GetSum(Card.GetBaseDefense)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c14731897.filter(chkc,sum) end
if chk==0 then return Duel.IsExistingTarget(c14731897.filter,tp,LOCATION_MZONE,0,1,nil,sum) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c14731897.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c14731897.filter,tp,LOCATION_MZONE,0,1,1,nil,sum)
end end
function c14731897.activate(e,tp,eg,ep,ev,re,r,rp) function c14731897.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
--Double Dai --Double Dai
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Sp Sm from deck --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.sdcon) e1:SetTarget(s.sptg)
e1:SetTarget(s.sdtg) e1:SetOperation(s.spop)
e1:SetOperation(s.sdop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Sp Sm below level
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(s.sltg)
e2:SetOperation(s.slop)
c:RegisterEffect(e2)
end
function s.sdcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,nil)
end end
function s.sdfilter(c,e,tp) function s.sdfilter(c,e,tp)
return c:IsRace(RACE_WARRIOR) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_WARRIOR) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.sdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.sdfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.sdop(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,s.sdfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.slfilter(c,e,tp) function s.slfilter(c,e,tp)
local lv=c:GetLevel() local lv=c:GetLevel()
return c:IsFaceup() and lv>0 and Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,lv,e,tp) return c:IsRace(RACE_WARRIOR) and c:IsFaceup() and lv>0 and Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,lv,e,tp)
end end
function s.lvfilter(c,lv,e,tp) function s.lvfilter(c,lv,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.sltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.slfilter(chkc,e,tp) end if chkc then return e:GetLabel()==1 and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b1 = not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(s.slfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.sdfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local b2 = Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SelectTarget(tp,s.slfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e,tp) and Duel.IsExistingTarget(s.slfilter,tp,LOCATION_MZONE,0,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,0),0},
{b2,aux.Stringid(id,1),1})
e:SetLabel(op)
if op==0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.slfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
end end
function s.slop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local op = e:GetLabel()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() or not tc:IsType(TYPE_MONSTER) then return end local g
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.lvfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc:GetLevel(),e,tp) if op==0 then
if sg:GetCount()>0 then g = Duel.SelectMatchingCard(tp,s.sdfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) else
local tc = Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() or not tc:IsType(TYPE_MONSTER) then return end
g = Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.lvfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc:GetLevel(),e,tp)
end
if g and g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -7,7 +7,7 @@ function c17548456.initial_effect(c) ...@@ -7,7 +7,7 @@ function c17548456.initial_effect(c)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17548456,0)) e1:SetDescription(aux.Stringid(17548456,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c17548456.descon) e1:SetCondition(c17548456.descon)
......
...@@ -6,6 +6,7 @@ function c24903843.initial_effect(c) ...@@ -6,6 +6,7 @@ function c24903843.initial_effect(c)
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c24903843.target) e1:SetTarget(c24903843.target)
e1:SetOperation(c24903843.activate) e1:SetOperation(c24903843.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -35,7 +35,7 @@ function s.rgfilter(c,e,tp) ...@@ -35,7 +35,7 @@ function s.rgfilter(c,e,tp)
return c:IsRace(RACE_FISH) and c:IsAbleToRemove() and c:IsFaceupEx() return c:IsRace(RACE_FISH) and c:IsAbleToRemove() and c:IsFaceupEx()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsPlayerCanRemove(tp) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -94,5 +94,6 @@ function c33814281.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,5 +94,6 @@ function c33814281.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33814281.thfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33814281.thfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
end end
...@@ -69,6 +69,7 @@ function c35622739.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,6 +69,7 @@ function c35622739.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c35622739.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c35622739.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
...@@ -13,6 +13,7 @@ function c3734202.initial_effect(c) ...@@ -13,6 +13,7 @@ function c3734202.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,3734202) e2:SetCountLimit(1,3734202)
e2:SetCost(c3734202.spcost1) e2:SetCost(c3734202.spcost1)
e2:SetTarget(c3734202.sptg1) e2:SetTarget(c3734202.sptg1)
...@@ -25,6 +26,7 @@ function c3734202.initial_effect(c) ...@@ -25,6 +26,7 @@ function c3734202.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,3734202) e3:SetCountLimit(1,3734202)
e3:SetCost(c3734202.spcost2) e3:SetCost(c3734202.spcost2)
e3:SetTarget(c3734202.sptg2) e3:SetTarget(c3734202.sptg2)
......
...@@ -7,7 +7,7 @@ function c38491199.initial_effect(c) ...@@ -7,7 +7,7 @@ function c38491199.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCondition(c38491199.negcon) e1:SetCondition(c38491199.negcon)
e1:SetCost(c38491199.negcost) e1:SetCost(c38491199.negcost)
...@@ -20,7 +20,7 @@ function c38491199.negcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c38491199.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c38491199.negcon(e,tp,eg,ep,ev,re,r,rp) function c38491199.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp)
end end
function c38491199.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c38491199.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -36,29 +36,37 @@ end ...@@ -36,29 +36,37 @@ end
function c40456412.target(e,tp,eg,ep,ev,re,r,rp,chk) function c40456412.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.GetMatchingGroup(c40456412.desfilter,tp,LOCATION_ONFIELD,0,nil) local g1=Duel.GetMatchingGroup(c40456412.desfilter,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(c40456412.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp) local g2=Duel.GetMatchingGroup(c40456412.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp)
local b1=Duel.GetFlagEffect(tp,40456412+1)==0 local b1=(Duel.GetFlagEffect(tp,40456412+1)==0 or not e:IsCostChecked())
and g1:GetCount()>0 and g2:GetCount()>0 and g1:GetCount()>0 and g2:GetCount()>0
local b2=Duel.GetFlagEffect(tp,40456412+2)==0 local b2=(Duel.GetFlagEffect(tp,40456412+2)==0 or not e:IsCostChecked())
and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c40456412.psfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.IsExistingMatchingCard(c40456412.psfilter,tp,LOCATION_EXTRA,0,1,nil)
local b3=Duel.GetFlagEffect(tp,40456412+3)==0 local b3=(Duel.GetFlagEffect(tp,40456412+3)==0 or not e:IsCostChecked())
and Duel.IsExistingMatchingCard(c40456412.ssfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c40456412.ssfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 or b3 end if chk==0 then return b1 or b2 or b3 end
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(40456412,1)}, {b1,aux.Stringid(40456412,1)},
{b2,aux.Stringid(40456412,2)}, {b2,aux.Stringid(40456412,2)},
{b3,aux.Stringid(40456412,3)}) {b3,aux.Stringid(40456412,3)})
Duel.RegisterFlagEffect(tp,40456412+op,RESET_PHASE+PHASE_END,0,1) if e:IsCostChecked() then
Duel.RegisterFlagEffect(tp,40456412+op,RESET_PHASE+PHASE_END,0,1)
end
if op==1 then if op==1 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) if e:IsCostChecked() then
e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
end
e:SetOperation(c40456412.spop) e:SetOperation(c40456412.spop)
elseif op==2 then elseif op==2 then
e:SetCategory(0) if e:IsCostChecked() then
e:SetCategory(0)
end
e:SetOperation(c40456412.psop) e:SetOperation(c40456412.psop)
else else
e:SetCategory(0) if e:IsCostChecked() then
e:SetCategory(0)
end
e:SetOperation(c40456412.ssop) e:SetOperation(c40456412.ssop)
end end
end end
......
...@@ -8,6 +8,10 @@ function c425934.initial_effect(c) ...@@ -8,6 +8,10 @@ function c425934.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,1) e1:SetTargetRange(1,1)
e1:SetCode(EFFECT_CANNOT_DISCARD_HAND) e1:SetCode(EFFECT_CANNOT_DISCARD_HAND)
e1:SetTarget(c425934.target)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c425934.target(e,dc,re,r)
return r&REASON_COST==REASON_COST
end
...@@ -18,6 +18,7 @@ function s.initial_effect(c) ...@@ -18,6 +18,7 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA) e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(s.spcon) e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--remove --remove
...@@ -68,10 +69,19 @@ function s.spcon(e,c) ...@@ -68,10 +69,19 @@ function s.spcon(e,c)
local fg=Duel.GetMatchingGroup(s.fusfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) local fg=Duel.GetMatchingGroup(s.fusfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return fg:CheckSubGroup(s.fselect,2,2) return fg:CheckSubGroup(s.fselect,2,2)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local cp=c:GetControler()
local g=Duel.GetMatchingGroup(s.fusfilter,cp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(cp,s.fselect,true,2,2)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c) function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local fg=Duel.GetMatchingGroup(s.fusfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) local sg=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=fg:SelectSubGroup(tp,s.fselect,false,2,2)
c:SetMaterial(sg) c:SetMaterial(sg)
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
end end
......
...@@ -53,7 +53,7 @@ function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,7 +53,7 @@ function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -47,6 +47,7 @@ function c49655592.initial_effect(c) ...@@ -47,6 +47,7 @@ function c49655592.initial_effect(c)
e5:SetTargetRange(0,1) e5:SetTargetRange(0,1)
e5:SetCode(EFFECT_CANNOT_DISCARD_HAND) e5:SetCode(EFFECT_CANNOT_DISCARD_HAND)
e5:SetCondition(c49655592.excon) e5:SetCondition(c49655592.excon)
e5:SetTarget(c49655592.extarget)
e5:SetValue(1) e5:SetValue(1)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
...@@ -95,3 +96,6 @@ end ...@@ -95,3 +96,6 @@ end
function c49655592.excon(e) function c49655592.excon(e)
return e:GetHandler():IsLevelAbove(7) return e:GetHandler():IsLevelAbove(7)
end end
function c49655592.extarget(e,dc,re,r)
return r&REASON_COST==REASON_COST
end
...@@ -22,7 +22,8 @@ function c51124303.initial_effect(c) ...@@ -22,7 +22,8 @@ function c51124303.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c51124303.spfilter(c,e,tp,mc) function c51124303.spfilter(c,e,tp,mc)
return c:IsSetCard(0xb4) and bit.band(c:GetType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc,tp)) local mg=Group.FromCards(mc)
return c:IsSetCard(0xb4) and bit.band(c:GetType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc,tp)) and (not c.mat_group_check or c.mat_group_check(mg,tp))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
and mc:IsCanBeRitualMaterial(c) and mc:IsCanBeRitualMaterial(c)
end end
......
...@@ -6,6 +6,7 @@ function c51606429.initial_effect(c) ...@@ -6,6 +6,7 @@ function c51606429.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c51606429.target) e1:SetTarget(c51606429.target)
e1:SetOperation(c51606429.activate) e1:SetOperation(c51606429.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,0)) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
...@@ -81,7 +81,7 @@ end ...@@ -81,7 +81,7 @@ end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,1)) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.sumop(e,tp,eg,ep,ev,re,r,rp) function s.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
......
...@@ -41,7 +41,7 @@ function c52518793.atkval(e,c) ...@@ -41,7 +41,7 @@ function c52518793.atkval(e,c)
return e:GetHandler():GetCounter(0x7)*100 return e:GetHandler():GetCounter(0x7)*100
end end
function c52518793.cfilter(c,tp) function c52518793.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK) return c:IsSummonLocation(LOCATION_DECK) and c:GetOriginalType()&TYPE_MONSTER~=0
end end
function c52518793.accon(e,tp,eg,ep,ev,re,r,rp) function c52518793.accon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c52518793.cfilter,1,nil,tp) return eg:IsExists(c52518793.cfilter,1,nil,tp)
......
...@@ -55,7 +55,7 @@ function c53701259.initial_effect(c) ...@@ -55,7 +55,7 @@ function c53701259.initial_effect(c)
--remove --remove
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD) e7:SetType(EFFECT_TYPE_FIELD)
e7:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e7:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e7:SetCode(EFFECT_TO_GRAVE_REDIRECT) e7:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e7:SetRange(LOCATION_SZONE) e7:SetRange(LOCATION_SZONE)
e7:SetValue(LOCATION_REMOVED) e7:SetValue(LOCATION_REMOVED)
......
...@@ -56,7 +56,7 @@ end ...@@ -56,7 +56,7 @@ end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e) local tg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) local dg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if dg:GetCount()>0 then if dg:GetCount()>0 then
Duel.HintSelection(dg) Duel.HintSelection(dg)
......
...@@ -7,6 +7,7 @@ function c56246017.initial_effect(c) ...@@ -7,6 +7,7 @@ function c56246017.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c56246017.cost) e1:SetCost(c56246017.cost)
e1:SetTarget(c56246017.target) e1:SetTarget(c56246017.target)
e1:SetOperation(c56246017.activate) e1:SetOperation(c56246017.activate)
......
...@@ -35,7 +35,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,7 +35,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local co=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local co=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,co,nil) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,co,nil)
......
...@@ -19,24 +19,28 @@ function s.dfilter(c,tp) ...@@ -19,24 +19,28 @@ function s.dfilter(c,tp)
end end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.dfilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.dfilter(chkc,tp) end
local b1=Duel.GetFlagEffect(tp,id)==0 local b1=(Duel.GetFlagEffect(tp,id)==0 or not e:IsCostChecked())
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.GetFlagEffect(tp,id+o)==0 local b2=(Duel.GetFlagEffect(tp,id+o)==0 or not e:IsCostChecked())
and Duel.IsExistingTarget(s.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) and Duel.IsExistingTarget(s.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(id,0)},{b2,aux.Stringid(id,1)}) local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(id,0)},{b2,aux.Stringid(id,1)})
if op==1 then if op==1 then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) if e:IsCostChecked() then
e:SetProperty(0) e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e:SetProperty(0)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
e:SetOperation(s.sop) e:SetOperation(s.sop)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
else else
e:SetCategory(CATEGORY_DAMAGE) if e:IsCostChecked() then
e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetCategory(CATEGORY_DAMAGE)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1)
end
e:SetOperation(s.dop) e:SetOperation(s.dop)
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectTarget(tp,s.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp):GetFirst() local tc=Duel.SelectTarget(tp,s.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp):GetFirst()
local atk=tc:GetBaseAttack() local atk=tc:GetBaseAttack()
......
...@@ -6,6 +6,7 @@ function c64765016.initial_effect(c) ...@@ -6,6 +6,7 @@ function c64765016.initial_effect(c)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c64765016.target) e1:SetTarget(c64765016.target)
e1:SetOperation(c64765016.activate) e1:SetOperation(c64765016.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -27,7 +27,7 @@ function c66722103.initial_effect(c) ...@@ -27,7 +27,7 @@ function c66722103.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c66722103.condition(e,tp,eg,ep,ev,re,r,rp) function c66722103.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end end
function c66722103.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c66722103.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -186,4 +186,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -186,4 +186,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -42,11 +42,13 @@ function c71978434.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,11 +42,13 @@ function c71978434.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end end
function c71978434.rmop(e,tp,eg,ep,ev,re,r,rp) function c71978434.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_HAND,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
local g1=g:Filter(Card.IsAbleToRemove,nil)
if g1:GetCount()==0 then Duel.ShuffleHand(1-tp) return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g1:Select(tp,1,1,nil):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleHand(1-tp) Duel.ShuffleHand(1-tp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -36,7 +36,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function s.desfilter(c,tp) function s.desfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:GetOwner()==tp return c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:GetPreviousControler()==tp
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
......
...@@ -40,7 +40,7 @@ function s.initial_effect(c) ...@@ -40,7 +40,7 @@ function s.initial_effect(c)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e4:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e4:SetCost(s.atkcost) e4:SetCost(s.atkcost)
e4:SetOperation(s.atkop) e4:SetOperation(s.atkop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
......
...@@ -54,7 +54,7 @@ function c80627281.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +54,7 @@ function c80627281.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCondition(c80627281.immcon) e1:SetCondition(c80627281.immcon)
e1:SetValue(c80627281.efilter) e1:SetValue(c80627281.efilter)
e1:SetOwnerPlayer(tp) e1:SetOwnerPlayer(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CONTROL)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
......
...@@ -17,8 +17,10 @@ function s.initial_effect(c) ...@@ -17,8 +17,10 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(id) e2:SetCode(EFFECT_TREAT_AS_2_XMATERIAL)
e2:SetRange(LOCATION_MZONE) e2:SetValue(id)
e2:SetRange(0xff)
e2:SetTarget(s.sxyzfilter)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--material effect --material effect
...@@ -33,134 +35,9 @@ function s.initial_effect(c) ...@@ -33,134 +35,9 @@ function s.initial_effect(c)
e3:SetTarget(s.xyztg) e3:SetTarget(s.xyztg)
e3:SetOperation(s.xyzop) e3:SetOperation(s.xyzop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not s.global_check then
s.global_check=true
Drake_shark_AddXyzProcedure=aux.AddXyzProcedure
function aux.AddXyzProcedure(card_c,function_f,int_lv,int_ct,function_alterf,int_dese,int_maxc,function_op)
if card_c:IsAttribute(ATTRIBUTE_WATER) and int_ct>=3 then
if function_alterf then
Drake_shark_XyzLevelFreeOperationAlter=Auxiliary.XyzLevelFreeOperationAlter
function Auxiliary.XyzLevelFreeOperationAlter(f,gf,minc,maxc,alterf,alterdesc,alterop)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
if og:GetCount()==minc and og:IsExists(s.xfilter,1,nil) then
local ttc=og:Filter(s.xfilter,nil):GetFirst()
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
if mg:GetCount()==minc and mg:IsExists(s.xfilter,1,nil) then
local ttc=mg:Filter(s.xfilter,nil):GetFirst()
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
else
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
end
aux.AddXyzProcedureLevelFree(card_c,s.f(function_f,int_lv,card_c),s.gf(int_ct,card_c:GetOwner()),int_ct-1,int_ct,function_alterf,int_dese,function_op)
Auxiliary.XyzLevelFreeOperationAlter=Drake_shark_XyzLevelFreeOperationAlter
else
Drake_shark_XyzLevelFreeOperation=Auxiliary.XyzLevelFreeOperation
function Auxiliary.XyzLevelFreeOperation(f,gf,minct,maxct)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
if og:GetCount()==minct and og:IsExists(s.xfilter,1,nil) then
local ttc=og:Filter(s.xfilter,nil):GetFirst()
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
if mg:GetCount()==minct and mg:IsExists(s.xfilter,1,nil) then
local ttc=mg:Filter(s.xfilter,nil):GetFirst()
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
else
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
end
aux.AddXyzProcedureLevelFree(card_c,s.f(function_f,int_lv,card_c),s.gf(int_ct,card_c:GetOwner()),int_ct-1,int_ct)
Auxiliary.XyzLevelFreeOperation=Drake_shark_XyzLevelFreeOperation
end
else
if function_alterf then
Drake_shark_AddXyzProcedure(card_c,function_f,int_lv,int_ct,function_alterf,int_dese,int_maxc,function_op)
else
Drake_shark_AddXyzProcedure(card_c,function_f,int_lv,int_ct,nil,nil,int_maxc,nil)
end
end
end
end
end
function s.f(function_f,int_lv,card_c)
return function (c)
return c:IsXyzLevel(card_c,int_lv) and (not function_f or function_f(c))
end
end
function s.gf(int_ct,int_tp)
return function (g)
return g:GetCount()==int_ct or g:GetCount()==int_ct-1 and g:IsExists(s.xfilter,1,nil,int_tp)
end
end end
function s.xfilter(c,tp) function s.sxyzfilter(e,c)
return c:IsHasEffect(id,tp) return c:IsAttribute(ATTRIBUTE_WATER)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW) return not e:GetHandler():IsReason(REASON_DRAW)
......
...@@ -40,7 +40,10 @@ function c87800375.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +40,10 @@ function c87800375.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
if Duel.SendtoHand(sg,nil,REASON_EFFECT)~=0 then ct=ct-1 end if Duel.SendtoHand(sg,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,sg)
ct=ct-1
end
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
if ct>0 then Duel.SortDecktop(tp,tp,ct) end if ct>0 then Duel.SortDecktop(tp,tp,ct) end
end end
......
...@@ -77,6 +77,7 @@ function c92586237.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,6 +77,7 @@ function c92586237.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c92586237.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,code) local g=Duel.SelectMatchingCard(tp,c92586237.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,code)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
......
...@@ -81,6 +81,7 @@ function c92607427.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,6 +81,7 @@ function c92607427.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c92607427.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c92607427.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
...@@ -23,7 +23,7 @@ function c94187078.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,7 +23,7 @@ function c94187078.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c94187078.splimit) e1:SetTarget(Auxiliary.DrytronSpSummonLimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
--cant special summon summonable card check --cant special summon summonable card check
...@@ -35,9 +35,6 @@ function c94187078.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,9 +35,6 @@ function c94187078.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c94187078.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
end
function c94187078.filter(c,e,tp) function c94187078.filter(c,e,tp)
return c:IsSetCard(0x154) and c:IsCanBeSpecialSummoned(e,0,tp,false,aux.DrytronSpSummonType(c)) return c:IsSetCard(0x154) and c:IsCanBeSpecialSummoned(e,0,tp,false,aux.DrytronSpSummonType(c))
end end
......
...@@ -13,16 +13,25 @@ function c99788587.initial_effect(c) ...@@ -13,16 +13,25 @@ function c99788587.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c99788587.condition(e,tp,eg,ep,ev,re,r,rp) function c99788587.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAllColumn() return e:GetHandler():IsAllColumn() and e:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c99788587.target(e,tp,eg,ep,ev,re,r,rp,chk) function c99788587.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local c=e:GetHandler()
e:SetLabel(aux.GetColumn(c)+1)
local g=e:GetHandler():GetColumnGroup() local g=e:GetHandler():GetColumnGroup()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c99788587.opfilter(c,col)
return aux.GetColumn(c)==col
end
function c99788587.activate(e,tp,eg,ep,ev,re,r,rp) function c99788587.activate(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetColumnGroup() local col=e:GetLabel()
if g:GetCount()>0 then if col>0 then
Duel.Destroy(g,REASON_EFFECT) col=col-1
local g=Duel.GetMatchingGroup(c99788587.opfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e),col)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end end
end end
...@@ -604,6 +604,7 @@ EFFECT_LIMIT_SPECIAL_SUMMON_POSITION =368 --不能以特定表示形式特殊召 ...@@ -604,6 +604,7 @@ EFFECT_LIMIT_SPECIAL_SUMMON_POSITION =368 --不能以特定表示形式特殊召
EFFECT_TUNER =369 --同调召唤时可以当作调整(百檎龙-苹果鳞虫) EFFECT_TUNER =369 --同调召唤时可以当作调整(百檎龙-苹果鳞虫)
EFFECT_KAISER_COLOSSEUM =370 --皇帝斗技场 EFFECT_KAISER_COLOSSEUM =370 --皇帝斗技场
EFFECT_REPLACE_DAMAGE =371 --伤害由特定行动代替 EFFECT_REPLACE_DAMAGE =371 --伤害由特定行动代替
EFFECT_TREAT_AS_2_XMATERIAL =372 --需3只以上作素材的超量怪兽时可以作为2只数量
EFFECT_FLAG_EFFECT =0x20000000 --标记类效果,即RegisterFlagEffect()创建的效果 EFFECT_FLAG_EFFECT =0x20000000 --标记类效果,即RegisterFlagEffect()创建的效果
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发) --下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
......
...@@ -430,6 +430,13 @@ end ...@@ -430,6 +430,13 @@ end
---@param maxct? integer ---@param maxct? integer
---@param alterop? function ---@param alterop? function
function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,alterdesc,maxct,alterop) function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,alterdesc,maxct,alterop)
if ct>=3 then
Auxiliary.AddXyzProcedureWith3MoreMaterial(c,f,lv,ct,alterf,alterdesc,maxct,alterop)
else
Auxiliary.AddXyzProcedureNormal(c,f,lv,ct,alterf,alterdesc,maxct,alterop)
end
end
function Auxiliary.AddXyzProcedureNormal(c,f,lv,ct,alterf,alterdesc,maxct,alterop)
if not maxct then maxct=ct end if not maxct then maxct=ct end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(1165) e1:SetDescription(1165)
...@@ -449,6 +456,53 @@ function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,alterdesc,maxct,alterop) ...@@ -449,6 +456,53 @@ function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,alterdesc,maxct,alterop)
e1:SetValue(SUMMON_TYPE_XYZ) e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function Auxiliary.AddXyzProcedureWith3MoreMaterial(c,f,lv,ct,alterf,alterdesc,maxct,alterop)
local ff=function (fc)
return fc:IsXyzLevel(c,lv) and (not f or f(fc))
end
local gf=function (g)
local gct=g:GetCount()
local eg=g:Filter(Auxiliary.AddXyzProcedureWith3MoreMaterialGfFilter,nil,c:GetOwner(),c)
if #eg>0 then
gct=gct+eg:GetClassCount(Auxiliary.AddXyzProcedureWith3MoreMaterialGfValue,c:GetOwner(),c)
end
local tc=g:GetFirst()
while tc do
local te=tc:IsHasEffect(EFFECT_XYZ_LEVEL,c:GetOwner())
if te then
local evf=te:GetValue()
if evf then
local ev=evf(te,tc,c)
local lmct=(ev>>12)&0xf
if lmct>0 and lmct>g:GetCount() then
return false
end
end
end
tc=g:GetNext()
end
return gct>=ct
end
local minc=ct-2
local maxc=ct
local e1=Effect.CreateEffect(c)
e1:SetDescription(1165)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
if alterf then
e1:SetCondition(Auxiliary.XyzLevelFreeConditionAlter(ff,gf,minc,maxc,alterf,alterdesc,alterop))
e1:SetTarget(Auxiliary.XyzLevelFreeTargetAlter(ff,gf,minc,maxc,alterf,alterdesc,alterop))
e1:SetOperation(Auxiliary.XyzLevelFreeOperationAlterWith3MoreMaterial(ff,gf,minc,maxc,alterf,alterdesc,alterop))
else
e1:SetCondition(Auxiliary.XyzLevelFreeCondition(ff,gf,minc,maxc))
e1:SetTarget(Auxiliary.XyzLevelFreeTarget(ff,gf,minc,maxc))
e1:SetOperation(Auxiliary.XyzLevelFreeOperationWith3MoreMaterial(f,gf,minc,maxc))
end
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
end
--Xyz Summon(normal) --Xyz Summon(normal)
function Auxiliary.XyzCondition(f,lv,minct,maxct) function Auxiliary.XyzCondition(f,lv,minct,maxct)
--og: use special material --og: use special material
...@@ -862,6 +916,134 @@ function Auxiliary.XyzLevelFreeOperationAlter(f,gf,minct,maxct,alterf,alterdesc, ...@@ -862,6 +916,134 @@ function Auxiliary.XyzLevelFreeOperationAlter(f,gf,minct,maxct,alterf,alterdesc,
end end
end end
end end
--Xyz summon(with EFFECT_TREAT_AS_2_XMATERIAL)
function Auxiliary.AddXyzProcedureWith3MoreMaterialGfFilter(c,tp,xc)
local te=c:IsHasEffect(EFFECT_TREAT_AS_2_XMATERIAL,tp)
if te then
local etg=te:GetTarget()
return not etg or etg(te,xc)
end
return false
end
function Auxiliary.AddXyzProcedureWith3MoreMaterialGfValue(c,tp,xc)
local te=c:IsHasEffect(EFFECT_TREAT_AS_2_XMATERIAL,tp)
if te then
local etg=te:GetTarget()
if not etg or etg(te,xc) then
return te:GetValue()
end
end
end
function Auxiliary.XyzLevelFreeOperationAlterWith3MoreMaterial(f,gf,minc,maxc,alterf,alterdesc,alterop)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
Auxiliary.Solve2XMaterial(tp,og,maxc,minc)
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
Auxiliary.Solve2XMaterial(tp,mg,maxc,minc)
if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
else
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
end
function Auxiliary.XyzLevelFreeOperationWith3MoreMaterial(f,gf,minct,maxct)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
Auxiliary.Solve2XMaterial(tp,og,maxct,minct)
local sg=Group.CreateGroup()
local tc=og:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=og:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
c:SetMaterial(og)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
Auxiliary.Solve2XMaterial(tp,mg,maxct,minct)
if e:GetLabel()==1 then
local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
else
local sg=Group.CreateGroup()
local tc=mg:GetFirst()
while tc do
local sg1=tc:GetOverlayGroup()
sg:Merge(sg1)
tc=mg:GetNext()
end
Duel.SendtoGrave(sg,REASON_RULE)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
mg:DeleteGroup()
end
end
end
function Auxiliary.Solve2XMaterialEffectFilter(c,tp)
local te=c:IsHasEffect(EFFECT_TREAT_AS_2_XMATERIAL,tp)
return te:GetValue()
end
function Auxiliary.Solve2XMaterialGroupCheck(g,tp)
return g:GetClassCount(Auxiliary.Solve2XMaterialEffectFilter,tp)==g:GetCount()
end
function Auxiliary.Solve2XMaterial(tp,g,maxct,minct)
if g:GetCount()<maxct and g:GetCount()>=minct and maxct==minct+2 then
local et=maxct-g:GetCount()
local exg=g:Filter(Card.IsHasEffect,nil,EFFECT_TREAT_AS_2_XMATERIAL,tp)
local ext=exg:GetClassCount(Auxiliary.Solve2XMaterialEffectFilter,tp)
if (et==0 or et==ext) and #exg>0 then
for ttc in Auxiliary.Next(exg) do
local tte=ttc:IsHasEffect(EFFECT_TREAT_AS_2_XMATERIAL,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp)
end
end
elseif #exg>0 then
local st=et
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD)
local reg=exg:SelectSubGroup(tp,Auxiliary.Solve2XMaterialGroupCheck,false,st,st,tp)
for ttc in Auxiliary.Next(reg) do
local tte=ttc:IsHasEffect(EFFECT_TREAT_AS_2_XMATERIAL,tp)
if tte then
Duel.Hint(HINT_CARD,0,ttc:GetCode())
tte:UseCountLimit(tp)
end
end
end
end
end
--Fusion Summon --Fusion Summon
......
...@@ -1052,7 +1052,7 @@ function Auxiliary.DrytronSpSummonCost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -1052,7 +1052,7 @@ function Auxiliary.DrytronSpSummonCost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function Auxiliary.DrytronSpSummonLimit(e,c,sump,sumtype,sumpos,targetp,se) function Auxiliary.DrytronSpSummonLimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard() return c:IsSummonableCard() and c:GetOriginalType()&(TYPE_SPELL|TYPE_TRAP|TYPE_TRAPMONSTER)==0
end end
function Auxiliary.DrytronSpSummonTarget(e,tp,eg,ep,ev,re,r,rp,chk) function Auxiliary.DrytronSpSummonTarget(e,tp,eg,ep,ev,re,r,rp,chk)
local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local res=e:GetLabel()==100 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
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