Commit beeb6068 authored by POLYMER's avatar POLYMER

fix

parent 7dfda906
...@@ -67,28 +67,28 @@ function c11560717.cncon(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,28 +67,28 @@ function c11560717.cncon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ac=Duel.GetAttacker() local ac=Duel.GetAttacker()
local bc=Duel.GetAttackTarget() local bc=Duel.GetAttackTarget()
return ((ac and c==ac) or (bc and c==bc)) return ((ac and c==ac) or (bc and c==bc))
end end
function c11560717.cnop(e,tp,eg,ep,ev,re,r,rp) function c11560717.cnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local x=Duel.TossCoin(tp,1) local x=Duel.TossCoin(tp,1)
if x==1 then if x==1 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c:GetAttack()*2) e1:SetValue(c:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
c:RegisterEffect(e1) c:RegisterEffect(e1)
elseif x==0 then elseif x==0 and c:GetBaseDefense()>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c:GetBaseAttack()) e1:SetValue(c:GetBaseDefense())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c11560717.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c11560717.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -7,7 +7,7 @@ function c65130317.initial_effect(c) ...@@ -7,7 +7,7 @@ function c65130317.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1) e1:SetTargetRange(1,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK) and aux.TargetBoolFunction(Card.IsLevelAbove,4)) e1:SetTarget(c65130317.thfilter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -25,24 +25,27 @@ function c65130317.initial_effect(c) ...@@ -25,24 +25,27 @@ function c65130317.initial_effect(c)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c65130317.thfilter(e,c)
return c:IsLocation(LOCATION_DECK) and c:IsLevelAbove(4)
end
function c65130317.cfilter(c) function c65130317.cfilter(c)
return c:IsAttack(878) and c:IsDefense(1157) and c:IsFaceup() return c:IsAttack(878) and c:IsDefense(1157) and c:IsFaceup()
end end
function c65130317.filter2(c) function c65130317.thfilter2(c)
return c:IsCode(65130319,65130326) and c:IsAbleToHand() return c:IsCode(65130319,65130326) and c:IsAbleToHand()
end end
function c65130317.filter(c) function c65130317.thfilter1(c)
return c:IsAttack(878) and c:IsDefense(1157) and c:IsAbleToHand() return c:IsAttack(878) and c:IsDefense(1157) and c:IsAbleToHand()
end end
function c65130317.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c65130317.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65130317.filter,tp,LOCATION_DECK,0,1,nil) or Duel.IsExistingMatchingCard(c65130317.filter2,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c65130317.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,3,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c65130317.thfilter1,tp,LOCATION_DECK,0,1,nil) or Duel.IsExistingMatchingCard(c65130317.thfilter2,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c65130317.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c65130317.thop(e,tp,eg,ep,ev,re,r,rp) function c65130317.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(c65130317.filter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c65130317.thfilter1,tp,LOCATION_DECK,0,nil)
if Duel.IsExistingMatchingCard(c65130317.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,3,nil) then if Duel.IsExistingMatchingCard(c65130317.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,3,nil) then
g=Group.__add(g,Duel.GetMatchingGroup(c65130317.filter2,tp,LOCATION_DECK,0,nil)) g:Merge(Duel.GetMatchingGroup(c65130317.thfilter2,tp,LOCATION_DECK,0,nil))
end end
if g:GetCount()>0 then if g:GetCount()>0 then
local tc =g:Select(tp,1,1,nil) local tc =g:Select(tp,1,1,nil)
......
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