Commit ea94431a authored by VanillaSalt's avatar VanillaSalt

fix

lua_tointeger(98645731+0x80000000)==0x80000000
lua_tointeger(98645731-0x80000000)==98645731
parent f4cf0513
......@@ -2084,12 +2084,14 @@ int32 card::is_capable_cost_to_grave(uint8 playerid) {
return FALSE;
if(!is_capable_send_to_grave(playerid))
return FALSE;
uint32 op_param = operation_param;
operation_param = dest << 8;
if(current.location & LOCATION_ONFIELD)
redirect = leave_field_redirect(REASON_COST) & 0xffff;
if(redirect) dest = redirect;
redirect = destination_redirect(dest, REASON_COST) & 0xffff;
if(redirect) dest = redirect;
operation_param = op_param;
if(dest != LOCATION_GRAVE)
return FALSE;
return TRUE;
......@@ -2105,12 +2107,14 @@ int32 card::is_capable_cost_to_hand(uint8 playerid) {
return FALSE;
if(!is_capable_send_to_hand(playerid))
return FALSE;
uint32 op_param = operation_param;
operation_param = dest << 8;
if(current.location & LOCATION_ONFIELD)
redirect = leave_field_redirect(REASON_COST) & 0xffff;
if(redirect) dest = redirect;
redirect = destination_redirect(dest, REASON_COST) & 0xffff;
if(redirect) dest = redirect;
operation_param = op_param;
if(dest != LOCATION_HAND)
return FALSE;
return TRUE;
......@@ -2126,12 +2130,14 @@ int32 card::is_capable_cost_to_deck(uint8 playerid) {
return FALSE;
if(!is_capable_send_to_deck(playerid))
return FALSE;
uint32 op_param = operation_param;
operation_param = dest << 8;
if(current.location & LOCATION_ONFIELD)
redirect = leave_field_redirect(REASON_COST) & 0xffff;
if(redirect) dest = redirect;
redirect = destination_redirect(dest, REASON_COST) & 0xffff;
if(redirect) dest = redirect;
operation_param = op_param;
if(dest != LOCATION_DECK)
return FALSE;
return TRUE;
......@@ -2147,12 +2153,14 @@ int32 card::is_capable_cost_to_extra(uint8 playerid) {
return FALSE;
if(!is_capable_send_to_deck(playerid))
return FALSE;
uint32 op_param = operation_param;
operation_param = dest << 8;
if(current.location & LOCATION_ONFIELD)
redirect = leave_field_redirect(REASON_COST) & 0xffff;
if(redirect) dest = redirect;
redirect = destination_redirect(dest, REASON_COST) & 0xffff;
if(redirect) dest = redirect;
operation_param = op_param;
if(dest != LOCATION_DECK)
return FALSE;
return TRUE;
......
......@@ -6,7 +6,7 @@ function c269012.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--cannot be target
local e=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......@@ -53,7 +53,7 @@ function c269012.target(e,c)
end
function c269012.damcon(e,tp,eg,ep,ev,re,r,rp)
local des=eg:GetFirst()
local rc=des:GetReasonCard()==eqc
local rc=des:GetReasonCard()
return des:IsLocation(LOCATION_GRAVE) and des:IsType(TYPE_MONSTER) and rc:IsRelateToBattle() and rc:IsLevelAbove(10)
end
function c269012.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -2,7 +2,7 @@
function c34507039.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c34507039.condition)
......@@ -17,7 +17,7 @@ function c34507039.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function c34507039.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -646,7 +646,7 @@ GLOBALFLAG_MUST_BE_SMATERIAL =0x20
GLOBALFLAG_SPSUMMON_COUNT =0x40
GLOBALFLAG_XMAT_COUNT_LIMIT =0x80
--
EFFECT_COUNT_CODE_OATH =0x80000000
EFFECT_COUNT_CODE_OATH =-0x80000000
EFFECT_COUNT_CODE_SINGLE =0x1
--
DUEL_TEST_MODE =0x01
......
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