Commit 0a3f4358 authored by wind2009's avatar wind2009

Fix F・HERO シャイニング・フレア・ウィングマン

parent b316b6e0
......@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,aux.FilterBoolFunction(Card.IsFusionType,TYPE_FUSION),s.matfilter2,1,true,true)
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionType,TYPE_FUSION),s.matfilter2,true)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
......@@ -26,7 +26,7 @@ function s.initial_effect(c)
e2:SetCondition(aux.bdgcon)
e2:SetTarget(s.damtg)
e2:SetOperation(s.damop)
c:RegisterEffect(e2)
c:RegisterEffect(e2)
end
function s.matfilter2(c)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE)
......@@ -45,19 +45,23 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()<5 or not Duel.IsPlayerCanDraw(tp) then return end
if g:GetCount()<5 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=g:Select(tp,5,5,nil)
if Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then
Duel.ShuffleDeck(tp)
Duel.HintSelection(dg)
if Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0
and dg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e:GetHandler():RegisterEffect(e1)
if Duel.IsPlayerCanDraw(tp,2) then
Duel.Draw(tp,2,REASON_EFFECT)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -68,14 +72,17 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if dam<0 then dam=0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
if dam>0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsRelateToChain() then
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dam=tc:GetAttack()
if dam<0 then dam=0 end
Duel.Damage(p,dam,REASON_EFFECT)
if dam>0 then
Duel.Damage(p,dam,REASON_EFFECT)
end
end
end
\ No newline at end of file
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