Commit 4ea21f25 authored by argon.sun's avatar argon.sun

tower

parent 7cf93bd8
......@@ -46,7 +46,7 @@ function c1992816.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
function c1992816.olcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()==0
return e:GetHandler():GetOverlayCount()==0 and e:GetHandler():IsType(TYPE_XYZ)
end
function c1992816.oltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsType(TYPE_MONSTER) end
......
......@@ -28,7 +28,7 @@ end
function c21924381.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and a:IsRelateToEffect(e) and a:IsFaceup() then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) and a:IsRelateToEffect(e) and a:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......
......@@ -26,7 +26,7 @@ function c87798440.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e3:SetCondition(c87798440.uncon)
e3:SetValue(1)
e3:SetValue(c87798440.repval)
c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
......@@ -51,6 +51,9 @@ end
function c87798440.uncon(e)
return e:GetHandler():IsStatus(STATUS_UNION)
end
function c87798440.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
function c87798440.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR)
end
......
--˩`ɥ롤ܩ`
--ニードル·ボール
function c94230224.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
......
......@@ -29,13 +29,19 @@ end
function c9583383.atkcon(e)
return not Duel.IsExistingMatchingCard(c9583383.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c9583383.rfilter(c)
return c:GetLevel()>0 and c:IsAbleToRemoveAsCost()
function c9583383.rfilter(c,tp)
local lv=c:GEtLevel()
return lv>0 and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c9583383.tfilter,tp,LOCATION_MZONE,0,1,nil,lv)
end
function c9583383.tfilter(c,clv)
local lv=c:GEtLevel()
return lv>0 and lv~=clv and c:IsFaceup() and c:IsSetCard(0x54)
end
function c9583383.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9583383.rfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c9583383.rfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c9583383.rfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c9583383.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
local lv=g:GetFirst():GetLevel()
Duel.SetTargetParam(lv)
Duel.Remove(g,POS_FACEUP,REASON_COST)
......@@ -48,8 +54,9 @@ function c9583383.lvop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
......
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