Commit 846f1002 authored by Huangnan's avatar Huangnan

fix

parent 5d1d96f6
No preview for this file type
expansions/pics/12823300.jpg

67.4 KB | W: | H:

expansions/pics/12823300.jpg

86.9 KB | W: | H:

expansions/pics/12823300.jpg
expansions/pics/12823300.jpg
expansions/pics/12823300.jpg
expansions/pics/12823300.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -21,6 +21,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_RELEASE)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
......@@ -71,6 +72,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.thfilter2,1,e:GetHandler(),tp)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(aux.FALSE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -16,7 +16,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCountLimit(1,id+10000)
e2:SetCondition(s.stcon)
e2:SetTarget(s.sttg)
e2:SetOperation(s.stop)
......
......@@ -31,7 +31,7 @@ function cm.initial_effect(c)
e5:SetRange(LOCATION_SZONE)
e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e5:SetTargetRange(1,0)
e5:SetValue(cm.sptg)
e5:SetTarget(cm.sptg)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_SUMMON)
......
......@@ -3,7 +3,6 @@ local m=16104425
local cm=_G["c"..m]
Duel.LoadScript("c16199990.lua")
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
--splimit
local e0=Effect.CreateEffect(c)
......@@ -73,12 +72,12 @@ function cm.operation(e,tp)
Duel.Release(sg,REASON_EFFECT)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_PZONE)
end
function cm.spop(e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,true,POS_FACEUP)
end
end
function cm.seop(e,tp)
......
......@@ -48,11 +48,13 @@ function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if Duel.ChangePosition(tc,POS_FACEDOWN)~=0 then
if tc:IsType(TYPE_CONTINUOUS) then
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
local seq=tc:GetSequence()
local zone=0
if seq<5 then
......@@ -80,6 +82,11 @@ function cm.posop(e,tp,eg,ep,ev,re,r,rp)
if #tg>0 then
Duel.BreakEffect()
Duel.ChangePosition(tg,POS_FACEDOWN)
for zc in aux.Next(tg) do
if zc:IsType(TYPE_CONTINUOUS) then
Duel.RaiseEvent(zc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
end
end
......
......@@ -50,24 +50,22 @@ function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g:SelectSubGroup(tp,aux.dncheck,false,1,1)
if sg1:GetCount()>0 then
Duel.SendtoGrave(sg1,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetTarget(cm.splimit2)
e0:Reset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit2(e,c)
return not c:IsRace(RACE_AQUA) and c:IsLocation(LOCATION_EXTRA)
function cm.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_AQUA)
end
function cm.tgfilter2(c)
......@@ -91,20 +89,19 @@ function cm.teop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.filter(c,e,tp)
return c:IsRace(RACE_AQUA) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsRace(RACE_AQUA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if c:IsRace(RACE_AQUA) and tc:IsType(TYPE_MONSTER) and tc:IsRelateToEffect(e) then
if tc:IsRace(RACE_AQUA) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
......
......@@ -49,8 +49,8 @@ function c23100078.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c23100078.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,24400046,0,TYPES_TOKEN_MONSTER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,24400046)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,23100106,0,TYPES_TOKEN_MONSTER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,23100106)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function c23100078.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -72,13 +72,13 @@ function c23100080.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c23100080.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,23100106,0,TYPES_TOKEN_MONSTER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) end
and Duel.IsPlayerCanSpecialSummonMonster(tp,23100106,0,TYPES_TOKEN_MONSTER+TYPE_TUNER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c23100080.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,23100106,0,TYPES_TOKEN_MONSTER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
or not Duel.IsPlayerCanSpecialSummonMonster(tp,23100106,0,TYPES_TOKEN_MONSTER+TYPE_TUNER,0,1000,1,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,23100106)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -8,6 +8,7 @@ function c23100116.initial_effect(c)
e1:SetCountLimit(1,23100116)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c23100116.spcon)
e1:SetOperation(c23100116.spop)
c:RegisterEffect(e1)
--summon with no tribute
local e2=Effect.CreateEffect(c)
......@@ -54,6 +55,14 @@ function c23100116.spcon(e,c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c23100116.filter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c23100116.spop(e,tp,eg,ep,ev,re,r,rp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(1500)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
end
function c23100116.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
......@@ -83,7 +92,7 @@ function c23100116.lvop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2)
end
function c23100116.thfilter(c)
return c.named_with_ZhanShuRenXing and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
return c.named_with_ZhanShuRenXing and c:IsAbleToHand()
end
function c23100116.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c23100116.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -97,15 +97,28 @@ function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_RELEASE)
local g=g1:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST)
else
if #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_TODECK)
local tc=tg:Select(tp,1,1,nil):GetFirst()
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_COST)
else
elseif #ng>0 then
local a=#g1>0
local b=#tg>0
if a and b then
local ct=Duel.SelectOption(tp,aux.Stringid(m,3),aux.Stringid(m,4))
if ct==0 then
Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_RELEASE)
local g=g1:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST)
else
Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_TODECK)
local tc=tg:Select(tp,1,1,nil):GetFirst()
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
elseif a and not b then
Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_RELEASE)
local g=g1:Select(tp,1,1,nil)
Duel.Release(g,REASON_COST)
elseif b and not a then
Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_TODECK)
local tc=tg:Select(tp,1,1,nil):GetFirst()
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
end
end
......
......@@ -10,21 +10,15 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.tgcon)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
--
local e2=e1:Clone()
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.tgcon)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
......@@ -40,9 +34,9 @@ function cm.initial_effect(c)
end
--tograve
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.tgfilter1,1,nil,tp)
return eg:IsExists(cm.tgfilter1,1,nil)
end
function cm.tgfilter1(c,tp)
function cm.tgfilter1(c)
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
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