Commit 0c063d6e authored by POLYMER's avatar POLYMER

fix

parent e1c6ce34
......@@ -4,49 +4,49 @@ function c33700373.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsAttackBelow,2100),2,false)
--direct attack
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_DIRECT_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
c:RegisterEffect(e5)
--halve damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c33700373.damcon)
e3:SetOperation(c33700373.damop)
c:RegisterEffect(e3)
--tg
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
c:RegisterEffect(e1)
--damage reduce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c33700373.condition)
e2:SetOperation(c33700373.operation)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c33700373.atkcon)
e2:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
c:RegisterEffect(e2)
--can not be effect target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLED)
e3:SetCondition(c33700373.condition)
e3:SetOperation(c33700373.operation)
c:RegisterEffect(e3)
end
function c33700373.atkcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetAttackTarget()==nil and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c33700373.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetAttackTarget()==nil
return Duel.GetAttackTarget()==nil
end
function c33700373.operation(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetReset(RESET_PHASE+PHASE_END,2)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e3:SetTarget(c33700373.tg)
e3:SetValue(aux.tgoval)
Duel.RegisterEffect(e3,tp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(c33700373.etlimit)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1,true)
end
function c33700373.tg(e,c)
function c33700373.etlimit(e,c)
return c~=e:GetHandler()
end
function c33700373.damcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return ep~=tp and tc:IsControler(tp) and tc:GetBattleTarget()==nil
end
function c33700373.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
\ No newline at end of file
......@@ -44,7 +44,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and cm.f(cm.tab[1]) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and cm.f(cm.tab[1]) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
cm.tab = nil
......
......@@ -47,20 +47,19 @@ function cm.f(c)
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.rf,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
return true
end
return false
else return false end
end
function cm.rval(e,c)
return cm.rf(c,e:GetHandlerPlayer())
return cm.rf(c)
end
function cm.rf(c,tp)
return c:IsControler(tp) and c:IsFaceup() and (c:IsRace(RACE_AQUA) or c:IsRace(RACE_FISH) or c:IsRace(RACE_SEASERPENT)) and not c:IsReason(REASON_REPLACE)
function cm.rf(c)
return c:IsFaceup() and c:IsOnField() and (c:IsRace(RACE_AQUA) or c:IsRace(RACE_FISH) or c:IsRace(RACE_SEASERPENT)) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function cm.rop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
......
......@@ -67,7 +67,7 @@ function c49811330.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c49811330.sfilter(c,code)
function c49811330.sfilter(c,code1,code2,code3)
return c:IsCode(code1,code2,code3) and c:IsAbleToGraveAsCost()
--return c:IsCode(table.unpack(c49811330.tab))
end
......
......@@ -37,7 +37,20 @@ function c49811331.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=c:GetMaterial():Filter(c49811331.spfilter,nil,e,tp)
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,1,REASON_EFFECT)>0 and #mg>0 then
if Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP)>0 then
local tc=mg:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND,0,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if #sg>0 then
......
......@@ -75,7 +75,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local nnum=#Duel.GetOperatedGroup()
local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil):Select(tp,1,nnum,nil)
Duel.Destroy(dg,REASON_EFFECT)
Duel.Draw(tp,nnum,REASON_EFFECT)
Duel.Draw(tp,#Duel.GetOperatedGroup(),REASON_EFFECT)
end
end
end
......
......@@ -38,7 +38,7 @@ function c9910324.atkop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if not a or not d then return end
if d==c then a,d=d,a end
if not a==c or d:IsControler(tp) or not d:IsRelateToBattle() then return end
if a~=c or d:IsControler(tp) or not d:IsRelateToBattle() then return end
local atk=d:GetBaseAttack()
local def=d:GetBaseDefense()
local e1=Effect.CreateEffect(c)
......
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