Commit 43cc74c8 authored by POLYMER's avatar POLYMER

fix

parent 1b1e3775
......@@ -76,8 +76,9 @@ function c11634014.tghop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c11634014.tehckfil(c)
function c11634014.tehckfil(c,tp)
local rc=nil
if not (c:IsSetCard(0x145) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)) then return false end
if c:IsReason(REASON_BATTLE) then
rc=c:GetReasonCard()
elseif c:IsReason(REASON_EFFECT) then
......@@ -92,7 +93,7 @@ function c11634014.tehckfil(c)
end
end
function c11634014.tehcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11634014.tehckfil,1,nil)
return eg:IsExists(c11634014.tehckfil,1,nil,tp)
end
function c11634014.tehcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
......
......@@ -68,7 +68,7 @@ function c11634016.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function c11634016.cpfil(c)
return c:IsSetCard(0x145) and c:IsType(TYPE_SPELL) and c:IsAbleToDeckAsCost() and c:CheckActivateEffect(true,true,false)~=nil
return c:IsSetCard(0x145) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_RITUAL) and c:IsAbleToDeckAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function c11634016.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11634016.cpfil,tp,LOCATION_GRAVE,0,1,e:GetHandler()) and e:GetHandler():IsAbleToDeckAsCost() end
......
......@@ -6,16 +6,20 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(s.target)
e2:SetTargetRange(0,1)
e2:SetValue(s.aclimit)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_TRIGGER)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetRange(LOCATION_SZONE)
e3:SetTarget(s.atktarget)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
......@@ -72,12 +76,18 @@ end
function s.actcon(e)
return e:GetHandler():GetFlagEffect(id)>0 or Duel.IsExistingMatchingCard(s.actfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function s.target(e,c)
local ct=Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_EXTRA,0)
function s.aclimit(e,re,tp)
local ct=Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_EXTRA)
local c=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and c:IsLevelAbove(1) and c:IsLevelAbove(ct)
end
function s.atktarget(e,c)
local ct=Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_EXTRA)
return c:IsLevelAbove(1) and c:IsLevelAbove(ct)
end
function s.cfilter(c,tp)
return (c:IsFaceup() or c:IsControler(tp)) and c:IsSetCard(0x145)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x145)
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function s.thfilter(c,code)
......@@ -85,7 +95,7 @@ function s.thfilter(c,code)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil,tp) end
local rg=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,false,nil,nil,tp)
local rg=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil,tp)
e:SetLabel(rg:GetFirst():GetCode())
Duel.Release(rg,REASON_COST)
end
......@@ -106,7 +116,7 @@ function s.rfilter(c,e,tp)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode(),c:GetAttack(),c:GetDefense())
end
function s.spfilter(c,e,tp,code,atk,def)
return c:IsSetCard(0x145) and c:IsAttack(atk) and c:IsDefense(def) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsAttack(atk) and c:IsDefense(def) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.rfilter,1,nil,e,tp) end
......
......@@ -43,7 +43,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND+LOCATION_DECK end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 then loc=loc+LOCATION_HAND+LOCATION_DECK end
return loc~=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
......
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