Commit 0c063d6e authored by POLYMER's avatar POLYMER

fix

parent e1c6ce34
...@@ -4,49 +4,49 @@ function c33700373.initial_effect(c) ...@@ -4,49 +4,49 @@ function c33700373.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsAttackBelow,2100),2,false) aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsAttackBelow,2100),2,false)
--direct attack --direct attack
local e5=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_DIRECT_ATTACK) e1:SetCode(EFFECT_DIRECT_ATTACK)
e5:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_MZONE,0)
c:RegisterEffect(e5) c:RegisterEffect(e1)
--halve damage --damage reduce
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 e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_BATTLE_DAMAGE) e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetCondition(c33700373.condition) e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c33700373.operation) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c33700373.atkcon)
e2:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
c:RegisterEffect(e2) 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 end
function c33700373.condition(e,tp,eg,ep,ev,re,r,rp) function c33700373.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetAttackTarget()==nil return Duel.GetAttackTarget()==nil
end end
function c33700373.operation(e,tp,eg,ep,ev,re,r,rp) function c33700373.operation(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(e:GetHandler()) local c=e:GetHandler()
e3:SetType(EFFECT_TYPE_FIELD) local e1=Effect.CreateEffect(c)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetType(EFFECT_TYPE_FIELD)
e3:SetReset(RESET_PHASE+PHASE_END,2) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e1:SetRange(LOCATION_MZONE)
e3:SetTarget(c33700373.tg) e1:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetValue(aux.tgoval) e1:SetTarget(c33700373.etlimit)
Duel.RegisterEffect(e3,tp) e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1,true)
end end
function c33700373.tg(e,c) function c33700373.etlimit(e,c)
return c~=e:GetHandler() return c~=e:GetHandler()
end 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) ...@@ -44,7 +44,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() 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) Duel.Draw(tp,1,REASON_EFFECT)
end end
cm.tab = nil cm.tab = nil
......
...@@ -47,20 +47,19 @@ function cm.f(c) ...@@ -47,20 +47,19 @@ function cm.f(c)
end end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.rf,1,nil) 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 if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) 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) Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
return true return true
end else return false end
return false
end end
function cm.rval(e,c) function cm.rval(e,c)
return cm.rf(c,e:GetHandlerPlayer()) return cm.rf(c)
end end
function cm.rf(c,tp) function cm.rf(c)
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) 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 end
function cm.rop(e,tp,eg,ep,ev,re,r,rp) function cm.rop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
......
...@@ -67,7 +67,7 @@ function c49811330.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -67,7 +67,7 @@ function c49811330.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end 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(code1,code2,code3) and c:IsAbleToGraveAsCost()
--return c:IsCode(table.unpack(c49811330.tab)) --return c:IsCode(table.unpack(c49811330.tab))
end end
......
...@@ -37,7 +37,20 @@ function c49811331.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,20 @@ function c49811331.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local mg=c:GetMaterial():Filter(c49811331.spfilter,nil,e,tp) 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 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) 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) local sg=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_HAND,0,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if #sg>0 then if #sg>0 then
......
...@@ -75,7 +75,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local nnum=#Duel.GetOperatedGroup() local nnum=#Duel.GetOperatedGroup()
local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil):Select(tp,1,nnum,nil) local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil):Select(tp,1,nnum,nil)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
Duel.Draw(tp,nnum,REASON_EFFECT) Duel.Draw(tp,#Duel.GetOperatedGroup(),REASON_EFFECT)
end end
end end
end end
......
...@@ -38,7 +38,7 @@ function c9910324.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c9910324.atkop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if not a or not d then return end if not a or not d then return end
if d==c then a,d=d,a 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 atk=d:GetBaseAttack()
local def=d:GetBaseDefense() local def=d:GetBaseDefense()
local e1=Effect.CreateEffect(c) 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