Commit acb4a2d9 authored by argon.sun's avatar argon.sun

fix

parent 1fca74fe
......@@ -1621,7 +1621,7 @@ int32 scriptlib::card_is_can_be_fusion_material(lua_State *L) {
return 1;
}
int32 scriptlib::card_is_can_be_synchro_material(lua_State *L) {
check_param_count(L, 2);
check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1);
card* scard = 0;
......
......@@ -1634,7 +1634,8 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
core.ntpchain.clear();
for (auto clit = core.flip_chain.begin(); clit != core.flip_chain.end(); ++clit) {
if(clit->triggering_effect->is_chainable(clit->triggering_player)
&& clit->triggering_effect->is_activateable(clit->triggering_player, clit->evt, TRUE)) {
&& clit->triggering_effect->is_activateable(clit->triggering_player, clit->evt, TRUE)
&& ((clit->triggering_location & 0x3) || !(clit->triggering_effect->handler->current.location & 0x3))) {
if(clit->triggering_player == infos.turn_player)
core.tpchain.push_back(*clit);
else
......@@ -1668,7 +1669,8 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
}
uint8 tp = clit->triggering_player;
bool act = true;
if(peffect->is_chainable(tp) && peffect->is_activateable(tp, clit->evt, TRUE)) {
if(peffect->is_chainable(tp) && peffect->is_activateable(tp, clit->evt, TRUE)
&& ((clit->triggering_location & 0x3) || !(peffect->handler->current.location & 0x3))) {
if(peffect->flag & EFFECT_FLAG_CHAIN_UNIQUE) {
if(tp == infos.turn_player) {
for(auto tpit = core.tpchain.begin(); tpit != core.tpchain.end(); ++tpit) {
......@@ -1746,7 +1748,8 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
auto clit = core.new_ochain_s.begin();
uint8 tp = clit->triggering_player;
bool act = true;
if(clit->triggering_effect->is_chainable(tp) && clit->triggering_effect->is_activateable(tp, clit->evt, TRUE)) {
if(clit->triggering_effect->is_chainable(tp) && clit->triggering_effect->is_activateable(tp, clit->evt, TRUE)
&& ((clit->triggering_location & 0x3) || !(clit->triggering_effect->handler->current.location & 0x3))) {
if(tp == infos.turn_player) {
for(auto tpit = core.tpchain.begin(); tpit != core.tpchain.end(); ++tpit) {
if(!(clit->triggering_effect->flag & EFFECT_FLAG_MULTIACT_HAND)) {
......
......@@ -24,7 +24,7 @@ function c14507213.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function c14507213.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c14507213.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c14507213.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14507213.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c14507213.filter,tp,0,LOCATION_MZONE,1,1,nil)
......
......@@ -23,7 +23,7 @@ function c33034646.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33034646.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33034646.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c33034646.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SelectTarget(tp,c33034646.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c33034646.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -14,7 +14,7 @@ function c72892473.target(e,tp,eg,ep,ev,re,r,rp,chk)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if e:GetHandler():IsLocation(LOCATION_HAND) then h1=h1-1 end
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
return (h1>0 or h2>0) and (h1==0 or Duel.IsPlayerCanDraw(tp,h1)) and (h2==0 or Duel.IsPlayerCanDraw(1-tp))
return (h1>0 or h2>0) and Duel.IsPlayerCanDraw(tp,(h1 > 0) and h1 or 1) and Duel.IsPlayerCanDraw(1-tp,1)
end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
......
......@@ -51,7 +51,8 @@ function c74064212.eqop(e,tp,eg,ep,ev,re,r,rp)
end
function c74064212.atkcon(e)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL
local ec=e:GetHandler():GetEquipTarget()
return ec and (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and ec:IsRelateToBattle()
end
function c74064212.eqlimit(e,c)
return c:GetControler()==e:GetHandler():GetControler()
......
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