Commit d6b7494f authored by Momobako's avatar Momobako

Push by Appveyor

parent 0ef1f0ac
......@@ -12,8 +12,6 @@ function c1156013.initial_effect(c)
c:RegisterEffect(e0)
--
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetDescription(aux.Stringid(1156013,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
......
......@@ -53,8 +53,32 @@ function c22250102.atkop(e,tp,eg,ep,ev,re,r,rp)
if ac:IsRelateToBattle() and tc:IsRelateToBattle() and c:IsRelateToEffect(e) then
if c:IsPosition(POS_DEFENSE) then Duel.ChangePosition(c,POS_FACEUP_ATTACK) end
if (c22250102.IsRiviera(ac) and ac:IsControler(tp) and tc~=nil and ac~=c) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-300)
e1:SetReset(RESET_EVENT+0xfe0000)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-300)
e1:SetReset(RESET_EVENT+0xfe0000)
tc:RegisterEffect(e1)
Duel.CalculateDamage(c,tc)
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-300)
e1:SetReset(RESET_EVENT+0xfe0000)
ac:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-300)
e1:SetReset(RESET_EVENT+0xfe0000)
ac:RegisterEffect(e1)
Duel.CalculateDamage(c,ac)
end
end
......
......@@ -40,16 +40,15 @@ function c22250161.filter(c,e,zone)
return c22250161.IsRiviera(c) and c:IsType(TYPE_MONSTER) and c:IsSummonable(true,e,0,zone)
end
function c22250161.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local zone=e:GetHandler():GetLinkedZone()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and zone~=0 and Duel.IsExistingMatchingCard(c22250161.filter,tp,LOCATION_HAND,0,1,nil,e,0,zone) end
local c=e:GetHandler()
local zone=c:GetLinkedZone()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and zone~=0 and Duel.GetMZoneCount(tp,g,tp,LOCATION_REASON_TOFIELD,zone)>0 and Duel.IsExistingMatchingCard(c22250161.filter,tp,LOCATION_HAND,0,1,nil,e,0,zone) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c22250161.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=e:GetHandler():GetLinkedZone()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or zone==0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or zone==0 or Duel.GetMZoneCount(tp,g,tp,LOCATION_REASON_TOFIELD,zone)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c22250161.filter,tp,LOCATION_HAND,0,1,1,nil,e,0,zone)
local tc=g:GetFirst()
......
......@@ -6,6 +6,7 @@ function c22251102.initial_effect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(2,22251102+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c22251102.cost)
e1:SetTarget(c22251102.target)
......@@ -45,7 +46,6 @@ end
function c22251102.target(e,tp,eg,ep,ev,re,r,rp,chk)
local flag=Duel.GetFlagEffect(tp,22251102)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
if e:GetLabel()==0 then e:SetProperty(EFFECT_FLAG_PLAYER_TARGET) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
......@@ -55,8 +55,9 @@ function c22251102.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
elseif e:GetLabel()==1 then
while Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>2 do
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT,nil)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
while Duel.GetFieldGroupCount(p,LOCATION_HAND,0)>2 do
Duel.DiscardHand(p,Card.IsDiscardable,1,1,REASON_EFFECT,nil)
end
end
end
......
......@@ -55,7 +55,7 @@ function c22251502.IsRiviera(c)
return m and m.named_with_Riviera
end
function c22251502.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c22251502.IsRiviera(c)
end
function c22251502.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c22251502.thfilter(chkc) 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