Commit ea25a853 authored by POLYMER's avatar POLYMER

fix

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