Commit 06669836 authored by wind2009's avatar wind2009

Fix

parent 68aa890f
No preview for this file type
...@@ -107,4 +107,4 @@ function s.codeop(e,tp,eg,ep,ev,re,r,rp) ...@@ -107,4 +107,4 @@ function s.codeop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(id+o) e1:SetValue(id+o)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -30,7 +30,7 @@ function s.initial_effect(c) ...@@ -30,7 +30,7 @@ function s.initial_effect(c)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--attribute --race
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CHANGE_RACE) e4:SetCode(EFFECT_CHANGE_RACE)
...@@ -64,7 +64,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp)
end end
function s.disfilter(c) function s.disfilter(c)
return c:IsFaceup() and (aux.NegateEffectMonsterFilter(c) or not c:IsCode(101304116)) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and (aux.NegateEffectMonsterFilter(c) or not c:IsCode(101304116))
end end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end
...@@ -99,4 +99,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,4 +99,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(101304116) e3:SetValue(101304116)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
end end
\ No newline at end of file
...@@ -99,4 +99,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,4 +99,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToChain(ev) then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToChain(ev) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -7,6 +7,7 @@ function s.initial_effect(c) ...@@ -7,6 +7,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -69,7 +70,9 @@ end ...@@ -69,7 +70,9 @@ end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsSSetable() end if chk==0 then return c:IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0) if c:IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -91,4 +94,4 @@ function s.actcon(e) ...@@ -91,4 +94,4 @@ function s.actcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return not e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED) return not e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED)
and not Duel.IsExistingMatchingCard(s.actfilter,tp,LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(s.actfilter,tp,LOCATION_MZONE,0,1,nil)
end end
\ No newline at end of file
...@@ -48,7 +48,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
end end
function s.disfilter(c) function s.disfilter(c)
return aux.NegateEffectMonsterFilter(c) or not c:IsCode(101304116) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and (aux.NegateEffectMonsterFilter(c) or not c:IsCode(101304116))
end end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end
...@@ -59,26 +59,28 @@ end ...@@ -59,26 +59,28 @@ end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(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:IsFaceup() and tc:IsRelateToChain() if tc:IsFaceup() and tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER)
and (tc:IsCanBeDisabledByEffect(e) or not tc:IsCode(101304116)) then and (tc:IsCanBeDisabledByEffect(e) or not tc:IsCode(101304116)) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(101304116) e3:SetValue(101304116)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
end end
\ No newline at end of file
...@@ -21,6 +21,7 @@ function s.initial_effect(c) ...@@ -21,6 +21,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--equip --equip
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_EQUIP) e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
...@@ -30,7 +31,7 @@ function s.initial_effect(c) ...@@ -30,7 +31,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.filter0(c) function s.filter0(c)
return c:IsFaceup() and c:IsCode(101304116) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave() return c:IsFaceup() and c:IsCode(101304116) and c:IsCanBeFusionMaterial()
end end
function s.filter1(c,e) function s.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
...@@ -44,7 +45,7 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,7 +45,7 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(s.filter0,tp,0,LOCATION_MZONE,nil) local mg2=Duel.GetMatchingGroup(s.filter0,tp,0,LOCATION_MZONE,nil):Filter(s.filter1,nil,e)
mg1:Merge(mg2) mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
...@@ -99,8 +100,10 @@ function s.eqfilter(c) ...@@ -99,8 +100,10 @@ function s.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x2db) return c:IsFaceup() and c:IsSetCard(0x2db)
end end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
end end
function s.sumfilter(c) function s.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsRace(RACE_SPELLCASTER) and c:IsAttack(1850) return c:IsSummonable(true,nil) and c:IsRace(RACE_SPELLCASTER) and c:IsAttack(1850)
...@@ -111,6 +114,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,6 +114,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
if not aux.NecroValleyFilter()(c) then return end if not aux.NecroValleyFilter()(c) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.Equip(tp,c,tc) if tc and Duel.Equip(tp,c,tc)
and Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
...@@ -122,4 +126,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -122,4 +126,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Summon(tp,sg:GetFirst(),true,nil) Duel.Summon(tp,sg:GetFirst(),true,nil)
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