Commit 89a2d427 authored by argon.sun's avatar argon.sun

update

parent 34fd244d
--サンダー·シーホース
function c48049769.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(48049769,0))
e1:SetCategory(CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c48049769.cost)
e1:SetTarget(c48049769.target)
e1:SetOperation(c48049769.operation)
c:RegisterEffect(e1)
end
function c48049769.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) and Duel.GetFlagEffect(tp,48049769)==0 and e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
--oath effects
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,48049769,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c48049769.filter(c)
return c:IsRace(RACE_THUNDER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==4 and c:IsAttackBelow(1600) and c:IsAbleToHand()
end
function c48049769.filter1(c,g)
return g:IsExists(Card.IsCode,1,c,c:GetCode())
end
function c48049769.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c48049769.filter,tp,LOCATION_DECK,0,nil)
return g:IsExists(c48049769.filter1,1,nil,g)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c48049769.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c48049769.filter,tp,LOCATION_DECK,0,nil)
local sg=g:Filter(c48049769.filter1,nil,g)
if sg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=sg:Select(tp,1,1,nil)
local hc=sg:Filter(Card.IsCode,hg:GetFirst(),hg:GetFirst():GetCode()):GetFirst()
hg:AddCard(hc)
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
end
--マイティ·ウォリアー
function c53981499.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53981499,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c53981499.damcon)
e1:SetTarget(c53981499.damtg)
e1:SetOperation(c53981499.damop)
c:RegisterEffect(e1)
end
function c53981499.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc:IsType(TYPE_MONSTER)
end
function c53981499.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local dam=bc:GetAttack()/2
if dam<0 then dam=0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c53981499.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
......@@ -67,8 +67,9 @@ function c61344030.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function c61344030.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetPreviousControler()==tp
and e:GetHandler():GetReasonPlayer()==1-tp
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY)
and c:GetPreviousControler()==tp and c:GetReasonPlayer()==1-tp
end
function c61344030.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true 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