Commit a22512b5 authored by VanillaSalt's avatar VanillaSalt

fix

parent f41e9828
......@@ -1376,7 +1376,7 @@ int32 scriptlib::card_is_chain_attackable(lua_State *L) {
|| attacker->current.controler != pduel->game_field->infos.turn_player
|| attacker->fieldid_r != pduel->game_field->core.pre_field[0]
|| !attacker->is_capable_attack_announce(pduel->game_field->infos.turn_player)
|| attacker->announce_count >= ac) {
|| (ac != 0 && attacker->announce_count >= ac)) {
lua_pushboolean(L, 0);
return 1;
}
......
......@@ -28,7 +28,7 @@ function c51435705.filter(c)
and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c51435705.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then returnDuel.IsExistingMatchingCard(c51435705.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c51435705.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function c51435705.shop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -38,20 +38,22 @@ function c69757518.atkval(e,c)
end
function c69757518.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0
return Duel.GetAttacker()==c and c:IsChainAttackable(0,true)
end
function c69757518.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c69757518.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ChainAttack()
local e1=Effect.CreateEffect(e:GetHandler())
if c:IsHasEffect(EFFECT_CANNOT_DIRECT_ATTACK) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
c:RegisterEffect(e1)
end
function c69757518.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -19,10 +19,7 @@ function c88033975.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c88033975.aclimit)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c88033975.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)
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