Commit 8effb276 authored by wind2009's avatar wind2009

Fix

parent 7a18e51c
No preview for this file type
...@@ -41,7 +41,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
if tc:IsFaceup() and tc:IsRelateToChain() and ct>0 then if tc:IsFaceup() and tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER) and ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2))
local lv=Duel.AnnounceLevel(tp,1,ct) local lv=Duel.AnnounceLevel(tp,1,ct)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -17,7 +17,6 @@ function s.initial_effect(c) ...@@ -17,7 +17,6 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCondition(s.eacon) e2:SetCondition(s.eacon)
e2:SetCost(s.eacost) e2:SetCost(s.eacost)
...@@ -29,7 +28,6 @@ function s.initial_effect(c) ...@@ -29,7 +28,6 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND) e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,id+o) e3:SetCountLimit(1,id+o)
e3:SetCost(aux.bfgcost) e3:SetCost(aux.bfgcost)
e3:SetTarget(s.thtg) e3:SetTarget(s.thtg)
...@@ -49,7 +47,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -49,7 +47,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToChain() then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
......
...@@ -14,7 +14,6 @@ function s.initial_effect(c) ...@@ -14,7 +14,6 @@ function s.initial_effect(c)
--set --set
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
...@@ -69,7 +68,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +68,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c:IsSetCard(0x10ae,0xae) and not c:IsCode(id) return c:IsSetCard(0x10af,0xae) and not c:IsCode(id)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -81,7 +80,8 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -81,7 +80,8 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then if c:IsRelateToChain() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
and Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):Select(tp,1,1,nil) local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):Select(tp,1,1,nil)
if #g>0 then if #g>0 then
Duel.BreakEffect() Duel.BreakEffect()
...@@ -96,6 +96,10 @@ function s.pencon(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,6 +96,10 @@ function s.pencon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
local c=e:GetHandler()
if c:IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
end end
function s.penop(e,tp,eg,ep,ev,re,r,rp) function s.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -3,7 +3,7 @@ local s,id,o=GetID() ...@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcMix(c,false,true,s.fusfilter1,s.fusfilter2,s.fusfilter3,s.fusfilter4) aux.AddFusionProcMix(c,false,true,s.fusfilter1,s.fusfilter2,s.fusfilter3,s.fusfilter4)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST) aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_SPSUMMON)
aux.EnablePendulumAttribute(c,false) aux.EnablePendulumAttribute(c,false)
--splimit --splimit
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -149,6 +149,7 @@ end ...@@ -149,6 +149,7 @@ end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do for tc in aux.Next(g) do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
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_DISABLE) e1:SetCode(EFFECT_DISABLE)
...@@ -168,10 +169,14 @@ function s.pencon(e,tp,eg,ep,ev,re,r,rp) ...@@ -168,10 +169,14 @@ function s.pencon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
local c=e:GetHandler()
if c:IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
end end
function s.penop(e,tp,eg,ep,ev,re,r,rp) function s.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
end end
\ No newline at end of file
...@@ -37,7 +37,7 @@ function s.cfilter(c) ...@@ -37,7 +37,7 @@ function s.cfilter(c)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local loc=LOCATION_REMOVED local loc=LOCATION_REMOVED
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then loc=loc+LOCATION_GRAVE end if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then loc=loc+LOCATION_GRAVE end
if chkc then return chkc:IsLocation(loc) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(loc) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.spfilter,tp,loc,0,1,nil,e,tp) end and Duel.IsExistingTarget(s.spfilter,tp,loc,0,1,nil,e,tp) end
......
...@@ -18,7 +18,6 @@ function s.initial_effect(c) ...@@ -18,7 +18,6 @@ function s.initial_effect(c)
--damage --damage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
...@@ -78,7 +77,9 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -78,7 +77,9 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if dam<0 then dam=0 end if dam<0 then dam=0 end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam) Duel.SetTargetParam(dam)
if dam>0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
end end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(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)
......
...@@ -11,7 +11,6 @@ function s.initial_effect(c) ...@@ -11,7 +11,6 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetTarget(s.destg) e1:SetTarget(s.destg)
e1:SetOperation(s.desop) e1:SetOperation(s.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -30,17 +29,20 @@ function s.initial_effect(c) ...@@ -30,17 +29,20 @@ function s.initial_effect(c)
e2:SetOperation(s.negop) e2:SetOperation(s.negop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.desfilter(c)
return c:IsSetCard(0xaf,0xae)
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() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToChain() then Duel.Destroy(tc,REASON_EFFECT) end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2)) e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -52,7 +54,6 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +54,6 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
end end
function s.pendvalue(e,c) function s.pendvalue(e,c)
return c:IsSetCard(0xaf) return c:IsSetCard(0xaf)
...@@ -62,7 +63,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +63,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and loc==LOCATION_HAND and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) return ep==1-tp and loc==LOCATION_HAND and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end end
function s.cfilter1(c,tp) function s.cfilter1(c,tp)
return c:IsSetCard(0xaf) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_GRAVE,0,1,c) and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_GRAVE,0,1,c)
end end
function s.cfilter2(c) function s.cfilter2(c)
...@@ -71,7 +72,7 @@ end ...@@ -71,7 +72,7 @@ end
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_GRAVE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,s.cfilter1,tp,LOCATION_GRAVE,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,s.cfilter1,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,s.cfilter2,tp,LOCATION_GRAVE,0,1,1,g1) local g2=Duel.SelectMatchingCard(tp,s.cfilter2,tp,LOCATION_GRAVE,0,1,1,g1)
Duel.Remove(g1+g2,POS_FACEUP,REASON_COST) Duel.Remove(g1+g2,POS_FACEUP,REASON_COST)
......
...@@ -57,7 +57,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -57,7 +57,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsAbleToRemove() and chkc:IsControler(1-tp) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsAbleToRemove() and chkc:IsControler(1-tp) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil) local g=aux.SelectTargetFromFieldFirst(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
...@@ -89,6 +89,7 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,6 +89,7 @@ function s.recop(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.Recover(p,d,REASON_EFFECT) Duel.Recover(p,d,REASON_EFFECT)
if rp==1-tp then if rp==1-tp then
Duel.BreakEffect()
Duel.Recover(p,500,REASON_EFFECT) Duel.Recover(p,500,REASON_EFFECT)
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