Commit a3053cba authored by Huangnan's avatar Huangnan

fix

parent d6bfea04
No preview for this file type
...@@ -1741,7 +1741,7 @@ ...@@ -1741,7 +1741,7 @@
52300095 0 --和平主义者 逆转复苏 52300095 0 --和平主义者 逆转复苏
52300175 1 --和平主义者的合神融合 52300175 1 --和平主义者的合神融合
52300185 1 --和平主义者 龙巢 52300185 1 --和平主义者 龙巢
52300185 0 --和平主义者 通往光明 52300085 0 --和平主义者 通往光明
52300180 1 --和平主义者 屠龙之始 52300180 1 --和平主义者 屠龙之始
52300100 1 --和平主义者的期待 泡影 52300100 1 --和平主义者的期待 泡影
......
...@@ -35,11 +35,13 @@ function s.spfilter(c,e,tp) ...@@ -35,11 +35,13 @@ function s.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0 and if chk==0 then return Duel.GetMZoneCount(tp)>0 and
Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) and c:IsDiscardable() end Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) and c:IsDiscardable() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
if Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)~=0 then if Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -59,7 +61,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +61,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local sc=g:GetFirst() local sc=g:GetFirst()
while sc do while sc do
local atk=sc:GetAttack() local atk=sc:GetAttack()
local def=sc:GetDefense() local def=sc:GetDefense()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -38,7 +38,7 @@ function cm.initial_effect(c) ...@@ -38,7 +38,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.fumfilter(c) function cm.fumfilter(c)
return c:IsSetCard(0x829) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x829) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function cm.tffilter(c,tp) function cm.tffilter(c,tp)
return c:IsCode(18700785) return c:IsCode(18700785)
...@@ -47,20 +47,16 @@ end ...@@ -47,20 +47,16 @@ end
function cm.tffilter2(c) function cm.tffilter2(c)
return c:IsCode(18700785) and c:IsFaceup() return c:IsCode(18700785) and c:IsFaceup()
end end
function cm.tffilter3(c) function cm.tffilter4(c,tp)
return c:IsSetCard(0x829) and c:IsAbleToHand() return c:IsCode(18700785) and c:IsFaceup() and Duel.IsExistingMatchingCard(cm.fumfilter,tp,LOCATION_DECK,0,1,nil)
end
function cm.tffilter4(c)
return c:IsCode(18700785) and c:IsFaceup() and Duel.IsExistingMatchingCard(cm.tffilter3,tp,LOCATION_DECK,0,1,nil)
end end
function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil,tp))
and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil,tp)) or (Duel.IsExistingMatchingCard(cm.tffilter2,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.fumfilter,tp,LOCATION_DECK,0,1,nil)) end
or (Duel.IsExistingMatchingCard(cm.tffilter2,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.tffilter3,tp,LOCATION_DECK,0,1,nil)) end
end end
function cm.tfop(e,tp,eg,ep,ev,re,r,rp) function cm.tfop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil,tp) local b1=Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil,tp)
local b2=Duel.IsExistingMatchingCard(cm.tffilter4,tp,LOCATION_SZONE,0,1,nil) local b2=Duel.IsExistingMatchingCard(cm.tffilter4,tp,LOCATION_SZONE,0,1,nil,tp)
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,1)}, {b1,aux.Stringid(m,1)},
{b2,aux.Stringid(m,2)}) {b2,aux.Stringid(m,2)})
...@@ -73,18 +69,18 @@ function cm.tfop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,18 +69,18 @@ function cm.tfop(e,tp,eg,ep,ev,re,r,rp)
end end
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,cm.tffilter3,tp,LOCATION_DECK,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.fumfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
end end
function cm.tfilter(c) function cm.tfilter(c,tp)
return c:IsSetCard(0x829) and c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c) return c:IsSetCard(0x829) and c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c)
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,cm.tfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.tfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
...@@ -92,14 +88,14 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -92,14 +88,14 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.thfilter(c,tc) function cm.thfilter(c,tc)
return c:IsSetCard(0x829) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x829) and c:IsType(TYPE_MONSTER)
and not c:IsCode(tc:GetCode())
and c:IsAbleToHand() and c:IsAbleToHand()
and not c:IsCode(tc:GetCode())
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -8,10 +8,10 @@ function cm.initial_effect(c) ...@@ -8,10 +8,10 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TODECK+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget(cm.tdtg) e1:SetTarget(cm.settg)
e1:SetOperation(cm.tdop) e1:SetOperation(cm.tdop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -25,26 +25,28 @@ function cm.initial_effect(c) ...@@ -25,26 +25,28 @@ function cm.initial_effect(c)
end end
function cm.tdfilter(c) function cm.tdfilter(c,tp)
return c:IsSetCard(0x829) and c:IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c) return c:IsSetCard(0x829) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c)
end end
function cm.thfilter(c,tc) function cm.thfilter(c,tc)
return c:IsSetCard(0x3829) and c:IsType(TYPE_MONSTER) and not c:IsCode(tc:GetCode()) and c:IsAbleToHand() return c:IsSetCard(0x3829) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(tc:GetCode())
end end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE) if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.tdop(e,tp) function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local tc=Duel.GetFirstTarget()
local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 then
if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,g:GetFirst()) local sg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc)
if #sg>0 then if #sg>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
end end
end end
\ No newline at end of file
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