Commit 43cc74c8 authored by POLYMER's avatar POLYMER

fix

parent 1b1e3775
...@@ -76,24 +76,25 @@ function c11634014.tghop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,24 +76,25 @@ function c11634014.tghop(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)
end end
function c11634014.tehckfil(c) function c11634014.tehckfil(c,tp)
local rc=nil local rc=nil
if c:IsReason(REASON_BATTLE) then if not (c:IsSetCard(0x145) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)) then return false end
rc=c:GetReasonCard() if c:IsReason(REASON_BATTLE) then
elseif c:IsReason(REASON_EFFECT) then rc=c:GetReasonCard()
elseif c:IsReason(REASON_EFFECT) then
rc=c:GetReasonEffect():GetHandler() rc=c:GetReasonEffect():GetHandler()
end end
if not (rc and rc:IsSummonLocation(LOCATION_EXTRA)) then return false end if not (rc and rc:IsSummonLocation(LOCATION_EXTRA)) then return false end
if c:IsReason(REASON_BATTLE) then if c:IsReason(REASON_BATTLE) then
local bc=Duel.GetAttacker() local bc=Duel.GetAttacker()
return bc and bc==rc return bc and bc==rc
elseif c:IsReason(REASON_EFFECT) then elseif c:IsReason(REASON_EFFECT) then
return true return true
end end
end end
function c11634014.tehcon(e,tp,eg,ep,ev,re,r,rp) 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 end
function c11634014.tehcost(e,tp,eg,ep,ev,re,r,rp,chk) function c11634014.tehcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
......
...@@ -68,14 +68,14 @@ function c11634016.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,14 +68,14 @@ function c11634016.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c11634016.cpfil(c) 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 end
function c11634016.cptg(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.IsExistingMatchingCard(c11634016.cpfil,tp,LOCATION_GRAVE,0,1,e:GetHandler()) and e:GetHandler():IsAbleToDeckAsCost() end
e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetCategory(0) e:SetCategory(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=Duel.SelectMatchingCard(tp,c11634016.cpfil,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()):GetFirst() local tc=Duel.SelectMatchingCard(tp,c11634016.cpfil,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()):GetFirst()
local sg=Group.FromCards(e:GetHandler(),tc) local sg=Group.FromCards(e:GetHandler(),tc)
Duel.SendtoDeck(sg,nil,2,REASON_COST) Duel.SendtoDeck(sg,nil,2,REASON_COST)
local te=tc:CheckActivateEffect(true,true,false) local te=tc:CheckActivateEffect(true,true,false)
......
...@@ -6,16 +6,20 @@ function s.initial_effect(c) ...@@ -6,16 +6,20 @@ 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)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) 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:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE) e2:SetTargetRange(0,1)
e2:SetTarget(s.target) e2:SetValue(s.aclimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=Effect.CreateEffect(c)
e3:SetCode(EFFECT_CANNOT_TRIGGER) 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) c:RegisterEffect(e3)
-- --
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -72,12 +76,18 @@ end ...@@ -72,12 +76,18 @@ end
function s.actcon(e) function s.actcon(e)
return e:GetHandler():GetFlagEffect(id)>0 or Duel.IsExistingMatchingCard(s.actfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) return e:GetHandler():GetFlagEffect(id)>0 or Duel.IsExistingMatchingCard(s.actfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
function s.target(e,c) function s.aclimit(e,re,tp)
local ct=Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_EXTRA,0) 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) return c:IsLevelAbove(1) and c:IsLevelAbove(ct)
end end
function s.cfilter(c,tp) 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()) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end end
function s.thfilter(c,code) function s.thfilter(c,code)
...@@ -85,7 +95,7 @@ function s.thfilter(c,code) ...@@ -85,7 +95,7 @@ function s.thfilter(c,code)
end end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 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()) e:SetLabel(rg:GetFirst():GetCode())
Duel.Release(rg,REASON_COST) Duel.Release(rg,REASON_COST)
end end
...@@ -106,7 +116,7 @@ function s.rfilter(c,e,tp) ...@@ -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()) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode(),c:GetAttack(),c:GetDefense())
end end
function s.spfilter(c,e,tp,code,atk,def) 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 end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.CheckReleaseGroup(tp,s.rfilter,1,nil,e,tp) end
......
...@@ -43,7 +43,7 @@ end ...@@ -43,7 +43,7 @@ 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)
if chk==0 then if chk==0 then
local loc=0 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) return loc~=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) 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