Commit 6a4cc7a2 authored by VanillaSalt's avatar VanillaSalt

fix

parent f96f3df4
......@@ -5,16 +5,15 @@ function c17988746.initial_effect(c)
e1:SetDescription(aux.Stringid(17988746,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_DAMAGE)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c17988746.condition)
e1:SetTarget(c17988746.target)
e1:SetOperation(c17988746.operation)
c:RegisterEffect(e1)
end
function c17988746.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and tp~=rp and bit.band(r,REASON_BATTLE)~=0 and Duel.GetAttacker():IsControler(1-tp)
return ep==tp and tp~=rp and Duel.GetAttacker():IsControler(1-tp)
end
function c17988746.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -42,7 +42,7 @@ end
function c38522377.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c38522377.spfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c38522377.spfilter,tp,LOCATION_MZONE,0,1,5,e:GetHandler())
local g=Duel.SelectTarget(tp,c38522377.spfilter,tp,LOCATION_MZONE,0,1,7,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c38522377.atkfilter(c,e)
......
......@@ -23,7 +23,7 @@ function c54497620.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c54497620.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c54497620.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c54497620.filter,tp,LOCATION_MZONE,0,1,5,nil)
local g=Duel.SelectTarget(tp,c54497620.filter,tp,LOCATION_MZONE,0,1,7,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c54497620.tfilter(c,e)
......
......@@ -24,7 +24,7 @@ function c54591086.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c54591086.rfilter,1,nil)
end
local rg=Duel.SelectReleaseGroup(tp,c54591086.rfilter,1,5,nil)
local rg=Duel.SelectReleaseGroup(tp,c54591086.rfilter,1,7,nil)
e:SetLabel(rg:GetCount())
Duel.Release(rg,REASON_COST)
end
......
......@@ -44,26 +44,19 @@ function c58383100.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c58383100.filter(c,ft)
return c:IsAbleToGrave() and (ft>0 or c:GetSequence()<5)
function c58383100.filter(c,tp)
return c:IsAbleToGrave() and Duel.GetMZoneCount(tp,c)>0
end
function c58383100.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local loc=LOCATION_HAND+LOCATION_ONFIELD
if ft==0 then loc=LOCATION_MZONE end
if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(c58383100.filter,tp,loc,0,1,e:GetHandler(),ft) end
if chk==0 then return Duel.IsExistingMatchingCard(c58383100.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
local ec=eg:GetFirst()
Duel.SetTargetCard(ec)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,loc)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,ec,1,0,0)
end
function c58383100.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return end
local loc=LOCATION_HAND+LOCATION_ONFIELD
if ft==0 then loc=LOCATION_MZONE end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c58383100.filter,tp,loc,0,1,1,nil,ft)
local tg=Duel.SelectMatchingCard(tp,c58383100.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
local tc=tg:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
local ec=Duel.GetFirstTarget()
......
......@@ -36,7 +36,7 @@ function c64631466.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_AVAILABLE_BD)
e4:SetCode(EVENT_DAMAGE)
e4:SetCode(EVENT_BATTLE_DAMAGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c64631466.damcon)
e4:SetOperation(c64631466.damop)
......@@ -44,7 +44,6 @@ function c64631466.initial_effect(c)
c:RegisterEffect(e4)
end
function c64631466.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=e:GetLabelObject()
return ec==nil or ec:GetFlagEffect(64631466)==0
end
......@@ -91,13 +90,13 @@ function c64631466.repval(e,re,r,rp)
end
function c64631466.damcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject():GetLabelObject()
return ec and ec:GetFlagEffect(64631466)~=0 and ep==tp and bit.band(r,REASON_BATTLE)~=0
return ec and ec:GetFlagEffect(64631466)~=0 and ep==tp
and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler())
end
function c64631466.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,ev,REASON_EFFECT)
end
function c64631466.adcon(e,tp,eg,ep,ev,re,r,rp)
function c64631466.adcon(e)
local ec=e:GetLabelObject():GetLabelObject()
return ec and ec:GetFlagEffect(64631466)~=0
end
......
......@@ -87,7 +87,7 @@ function c70298454.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c70298454.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 or bit.band(r,REASON_EFFECT)~=0
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c70298454.eqlimit(e,c)
return e:GetHandler():GetEquipTarget()==c
......
......@@ -54,15 +54,19 @@ function c71133680.atkop(e,tp,eg,ep,ev,re,r,rp)
local dc=Duel.SelectMatchingCard(tp,c71133680.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,tc):GetFirst()
if dc and Duel.Destroy(dc,REASON_EFFECT)~=0 then
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
local atk=dc:GetBaseAttack()
local def=dc:GetBaseDefense()
if atk<0 then atk=0 end
if def<0 then def=0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(dc:GetBaseAttack())
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(dc:GetBaseDefense())
e2:SetValue(def)
tc:RegisterEffect(e2)
end
end
......
......@@ -88,7 +88,7 @@ function c77411244.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
function c77411244.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 or bit.band(r,REASON_EFFECT)~=0
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c77411244.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:GetOwner()~=e:GetOwner()
......
......@@ -28,7 +28,7 @@ function c77505534.activate(e,tp,eg,ep,ev,re,r,rp)
if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(77505534,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=tg:Select(tp,1,5,nil)
local sg=tg:Select(tp,1,7,nil)
Duel.ChangePosition(sg,POS_FACEUP_DEFENSE)
end
end
......
......@@ -15,7 +15,7 @@ function c86516889.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFacedown() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN)
local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,5,nil)
local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,7,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c86516889.filter(c,e)
......
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