Commit ea25a853 authored by POLYMER's avatar POLYMER

fix

parent 82fd47e0
...@@ -15,6 +15,7 @@ function cm.initial_effect(c) ...@@ -15,6 +15,7 @@ function cm.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.hspcon) e1:SetCondition(cm.hspcon)
e1:SetTarget(cm.hsptg)
e1:SetOperation(cm.hspop) e1:SetOperation(cm.hspop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -32,20 +33,23 @@ function cm.initial_effect(c) ...@@ -32,20 +33,23 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.hspfilter(c,ft,tp) function cm.hspfilter(c,tp)
return cm.MagicCombineDemon(c) return cm.MagicCombineDemon(c)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end end
function cm.hspcon(e,c) function cm.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return Duel.CheckReleaseGroupEx(tp,cm.hspfilter,1,REASON_SPSUMMON,false,nil,tp)
return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,cm.hspfilter,1,nil,ft,tp)
end end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c) function cm.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(cm.hspfilter,nil,tp)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter,1,1,nil,ft,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
Duel.Release(g,REASON_COST) local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end end
function cm.filter(c,tp) function cm.filter(c,tp)
return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsType(TYPE_SPELL) return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsType(TYPE_SPELL)
......
...@@ -23,6 +23,7 @@ function cm.initial_effect(c) ...@@ -23,6 +23,7 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.sprcon) e2:SetCondition(cm.sprcon)
e2:SetTarget(cm.sprtg)
e2:SetOperation(cm.sprop) e2:SetOperation(cm.sprop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -65,19 +66,26 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,19 +66,26 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1)
end end
end end
function cm.sprfilter(c,ft,tp) function cm.sprfilter(c,tp)
return c:GetOriginalRace()==RACE_ZOMBIE and c:GetOriginalAttribute()==ATTRIBUTE_WATER return c:GetOriginalRace()==RACE_ZOMBIE and c:GetOriginalAttribute()==ATTRIBUTE_WATER
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end end
function cm.sprcon(e,c) function cm.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return Duel.CheckReleaseGroupEx(tp,cm.sprfilter,1,REASON_SPSUMMON,false,nil,tp)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,cm.sprfilter,1,REASON_SPSUMMON,false,nil,ft,tp) end
function cm.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(cm.sprfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c) function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local g=e:GetLabelObject()
local g=Duel.SelectReleaseGroupEx(tp,cm.sprfilter,1,1,REASON_SPSUMMON,false,nil,ft,tp)
Duel.Release(g,REASON_SPSUMMON) Duel.Release(g,REASON_SPSUMMON)
end end
function cm.cfilter(c) function cm.cfilter(c)
......
...@@ -14,7 +14,7 @@ cm[0]=0 ...@@ -14,7 +14,7 @@ cm[0]=0
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,0) local s=Duel.SelectField(tp,1,LOCATION_MZONE,0,0x60)
e:SetLabel(s,tp) e:SetLabel(s,tp)
Duel.Hint(HINT_ZONE,tp,s) Duel.Hint(HINT_ZONE,tp,s)
end end
......
--战吼的岩城 --战吼的岩城
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--c:SetCardData(CARDDATA_TYPE,TYPE_SPELL+TYPE_FIELD+TYPE_QUICKPLAY)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
...@@ -15,6 +16,12 @@ function s.initial_effect(c) ...@@ -15,6 +16,12 @@ function s.initial_effect(c)
e0:SetHintTiming(TIMING_BATTLE_PHASE+TIMING_BATTLE_START+TIMING_BATTLE_END) e0:SetHintTiming(TIMING_BATTLE_PHASE+TIMING_BATTLE_START+TIMING_BATTLE_END)
e0:SetCondition(s.condition) e0:SetCondition(s.condition)
c:RegisterEffect(e0) c:RegisterEffect(e0)
local Effect_IsHasType=Effect.IsHasType
function Effect.IsHasType(e,type)
if e==e0 and type==EFFECT_TYPE_ACTIVATE then return true end
if e==e0 and type==EFFECT_TYPE_QUICK_O then return false end
return Effect_IsHasType(e,type)
end
--immune --immune
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
...@@ -39,14 +46,14 @@ function s.initial_effect(c) ...@@ -39,14 +46,14 @@ function s.initial_effect(c)
-- --
if not s.globle_check then if not s.globle_check then
s.globle_check=true s.globle_check=true
local ge0=Effect.CreateEffect(c) --[[local ge0=Effect.CreateEffect(c)
ge0:SetType(EFFECT_TYPE_FIELD) ge0:SetType(EFFECT_TYPE_FIELD)
ge0:SetCode(EFFECT_ACTIVATE_COST) ge0:SetCode(EFFECT_ACTIVATE_COST)
ge0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) ge0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
ge0:SetCost(aux.FALSE) ge0:SetCost(aux.FALSE)
ge0:SetTargetRange(1,1) ge0:SetTargetRange(1,1)
ge0:SetTarget(s.actarget) ge0:SetTarget(s.actarget)
Duel.RegisterEffect(ge0,0) Duel.RegisterEffect(ge0,0)]]
--Activate to field --Activate to field
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD) ge1:SetType(EFFECT_TYPE_FIELD)
...@@ -66,18 +73,22 @@ function s.actarget(e,te,tp) ...@@ -66,18 +73,22 @@ function s.actarget(e,te,tp)
end end
function s.actarget2(e,te,tp) function s.actarget2(e,te,tp)
local tc=te:GetHandler() local tc=te:GetHandler()
if tc:GetOriginalCode()==id and te:IsHasType(EFFECT_TYPE_QUICK_O) and tc:IsLocation(LOCATION_HAND) and tc:IsType(TYPE_SPELL) then
--Debug.Message("0")
e:SetLabelObject(te) e:SetLabelObject(te)
return tc:GetOriginalCode()==id and te:IsHasType(EFFECT_TYPE_QUICK_O) and tc:IsLocation(LOCATION_HAND) and tc:IsType(TYPE_SPELL) return true
end
return false
end end
function s.costop(e,tp,eg,ep,ev,re,r,rp) function s.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject() local te=e:GetLabelObject()
local tc=te:GetHandler() local tc=te:GetHandler()
local tp=te:GetHandlerPlayer() local tp=te:GetHandlerPlayer()
local te2=te:Clone() --local te2=te:Clone()
tc:RegisterEffect(te2) --tc:RegisterEffect(te2)
te2:UseCountLimit(tp) --te2:UseCountLimit(tp)
te:SetValue(id) --te:SetValue(id)
te:SetType(EFFECT_TYPE_ACTIVATE) --te:SetType(EFFECT_TYPE_ACTIVATE)
if tc:IsType(TYPE_FIELD) then if tc:IsType(TYPE_FIELD) then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
......
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