Commit 3e5c3d21 authored by salix5's avatar salix5

fix

parent 1b7ef0dd
...@@ -80,11 +80,11 @@ function c23064604.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,11 +80,11 @@ function c23064604.tdop(e,tp,eg,ep,ev,re,r,rp)
tg1:Merge(tg2) tg1:Merge(tg2)
if Duel.SendtoGrave(tg1,REASON_EFFECT)~=0 and tg1:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE) then if Duel.SendtoGrave(tg1,REASON_EFFECT)~=0 and tg1:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE) then
local sg=nil local sg=nil
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil) local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
local tg1=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local fg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if tg:GetCount()>0 and (tg1:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(23064604,3))) then if hg:GetCount()>0 and (fg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(23064604,3))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
sg=tg:RandomSelect(tp,1) sg=hg:RandomSelect(tp,1)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil) sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
......
...@@ -39,12 +39,13 @@ function c6691855.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,12 +39,13 @@ function c6691855.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(500) e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--damage cal
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_UPDATE_DEFENCE) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetCondition(c6691855.defcon) e2:SetRange(LOCATION_SZONE)
e2:SetValue(c6691855.defval) e2:SetCondition(c6691855.damcon)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetOperation(c6691855.damop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Equip limit --Equip limit
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -56,10 +57,17 @@ function c6691855.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,10 +57,17 @@ function c6691855.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
end end
function c6691855.defcon(e) function c6691855.damcon(e)
local eq=e:GetHandler():GetEquipTarget() local eq=e:GetHandler():GetEquipTarget()
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and eq:IsRelateToBattle() and eq:IsDefencePos() return eq:IsRelateToBattle() and eq:IsDefencePos()
end end
function c6691855.defval(e,c) function c6691855.damop(e,tp,eg,ep,ev,re,r,rp)
return c:GetAttack() local c=e:GetHandler()
local atk=c:GetEquipTarget():GetAttack()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_DEFENCE)
e2:SetValue(atk)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL)
c:RegisterEffect(e2)
end 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