Commit bcae02dc authored by DailyShana's avatar DailyShana

CATEGROY_ANNOUNCE

parent 1219bc46
......@@ -32,14 +32,16 @@ function c10406322.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,0)
local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
function c10406322.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
......
......@@ -18,11 +18,11 @@ function c10809984.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac)
e:GetHandler():SetHint(CHINT_CARD,ac)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
function c10809984.drop(e,tp,eg,ep,ev,re,r,rp)
local ac=e:GetLabel()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,hg)
......
......@@ -15,11 +15,11 @@ function c15800838.target(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac)
e:GetHandler():SetHint(CHINT_CARD,ac)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
function c15800838.operation(e,tp,eg,ep,ev,re,r,rp)
local ac=e:GetLabel()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,hg)
......
......@@ -25,14 +25,16 @@ function c22796548.target(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,0)
local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
function c22796548.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or not Duel.IsPlayerCanDiscardDeck(tp,1) then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
......
......@@ -14,10 +14,12 @@ function c29417188.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac)
e:GetHandler():SetHint(CHINT_CARD,ac)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
function c29417188.operation(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
e:GetHandler():SetHint(CHINT_CARD,ac)
--forbidden
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -25,7 +27,7 @@ function c29417188.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_FORBIDDEN)
e1:SetTargetRange(0x7f,0x7f)
e1:SetTarget(c29417188.bantg)
e1:SetLabel(e:GetLabel())
e1:SetLabel(ac)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
......@@ -33,7 +35,7 @@ function c29417188.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(0x7f,0x7f)
e2:SetTarget(c29417188.bantg)
e2:SetLabel(e:GetLabel())
e2:SetLabel(ac)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp)
end
......
......@@ -14,11 +14,11 @@ function c33423043.target(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac)
e:GetHandler():SetHint(CHINT_CARD,ac)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
function c33423043.operation(e,tp,eg,ep,ev,re,r,rp)
local ac=e:GetLabel()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,hg)
......
......@@ -5,6 +5,7 @@ function c43711255.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c43711255.target)
e1:SetOperation(c43711255.activate)
c:RegisterEffect(e1)
--forbidden
local e2=Effect.CreateEffect(c)
......@@ -32,6 +33,11 @@ function c43711255.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,564)
local ac=Duel.AnnounceCard(tp)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
function c43711255.activate(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
e:SetLabel(ac)
e:GetHandler():SetHint(CHINT_CARD,ac)
end
......@@ -15,14 +15,16 @@ function c72403299.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,0)
local ac=Duel.AnnounceCard(tp)
e:SetLabel(ac)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
function c72403299.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:GetCode()==e:GetLabel() and tc:IsAbleToHand() then
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if tc:IsCode(ac) and tc:IsAbleToHand() then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
......
......@@ -581,6 +581,7 @@ CATEGORY_DICE =0x2000000 --骰子效果
CATEGORY_LEAVE_GRAVE =0x4000000 --离开墓地效果
CATEGORY_LVCHANGE =0x8000000 --改变等级效果
CATEGORY_NEGATE =0x10000000 --使发动无效效果
CATEGORY_ANNOUNCE =0x20000000 --宣言效果
--Hint
HINT_EVENT =1
HINT_MESSAGE =2
......@@ -696,3 +697,5 @@ ACTIVITY_FLIPSUMMON =4 --
ACTIVITY_ATTACK =5 --
ACTIVITY_BATTLE_PHASE =6 -- not available in custom counter
ACTIVITY_CHAIN =7 -- only available in custom counter
--announce type(宣言类型,CATEGORY_ANNOUNCE的OperationInfo的target_param)
ANNOUNCE_CARD =1 --宣言卡片
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