Commit 145062d8 authored by VanillaSalt's avatar VanillaSalt

fix

parent 6defb73f
......@@ -1489,15 +1489,15 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
return false;
}
void ClientField::GetHoverField(int x, int y) {
irr::core::recti sfRect(396, 504, 880, 600);
irr::core::recti ofRect(506, 135, 795, 191);
irr::core::recti sfRect(393, 504, 875, 600);
irr::core::recti ofRect(501, 135, 790, 191);
irr::core::position2di pos(x, y);
if(sfRect.isPointInside(pos)) {
int hc = hand[0].size();
if(hc == 0)
hovered_location = 0;
else if(hc < 7) {
int left = 396 + 82 * (6 - hc) / 2;
int left = 393 + 82 * (6 - hc) / 2;
if(x < left)
hovered_location = 0;
else {
......@@ -1512,17 +1512,17 @@ void ClientField::GetHoverField(int x, int y) {
} else {
hovered_controler = 0;
hovered_location = LOCATION_HAND;
if(x >= 829)
if(x >= 804)
hovered_sequence = hc - 1;
else
hovered_sequence = (x - 416) * (hc - 1) / 413;
hovered_sequence = (x - 393) * (hc - 1) / 411;
}
} else if(ofRect.isPointInside(pos)) {
int hc = hand[1].size();
if(hc == 0)
hovered_location = 0;
else if(hc < 7) {
int left = 506 + 49 * (6 - hc) / 2;
int left = 501 + 49 * (6 - hc) / 2;
if(x < left)
hovered_location = 0;
else {
......@@ -1537,10 +1537,10 @@ void ClientField::GetHoverField(int x, int y) {
} else {
hovered_controler = 1;
hovered_location = LOCATION_HAND;
if(x >= 756)
if(x >= 748)
hovered_sequence = 0;
else
hovered_sequence = hc - 1 - (x - 516) * (hc - 1) / 247;
hovered_sequence = hc - 1 - (x - 501) * (hc - 1) / 247;
}
} else {
double screenx = x / 1024.0 * 1.25 - 0.81;
......
......@@ -273,7 +273,7 @@ uint32 card::get_type() {
return assume_value;
if(!(current.location & 0x1e))
return data.type;
if((current.location == LOCATION_SZONE) && (current.position >= 6))
if((current.location == LOCATION_SZONE) && (current.sequence >= 6))
return TYPE_PENDULUM + TYPE_SPELL;
if (temp.type != 0xffffffff)
return temp.type;
......
......@@ -3325,9 +3325,7 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret
target->overlay_target->xyz_remove(target);
move_card(playerid, target, location, target->temp.sequence);
target->current.position = returns.ivalue[0];
if ((target->get_type() & TYPE_TRAPMONSTER) ||
((target->get_type() & TYPE_TRAP) && (target->current.location == LOCATION_MZONE) && (location == LOCATION_SZONE))
)
if((target->previous.location & LOCATION_ONFIELD) && (location & LOCATION_ONFIELD))
target->set_status(STATUS_LEAVE_CONFIRMED, FALSE);
else
target->set_status(STATUS_LEAVE_CONFIRMED | STATUS_ACTIVATED, FALSE);
......
......@@ -11,7 +11,7 @@ function c50323155.initial_effect(c)
c:RegisterEffect(e1)
end
function c50323155.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
return tp~=ep and eg:GetCount()==1 and Duel.GetCurrentChain()==0
end
function c50323155.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -21,7 +21,7 @@ function c71564252.initial_effect(c)
c:RegisterEffect(e2)
end
function c71564252.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
return tp~=ep and eg:GetCount()==1 and Duel.GetCurrentChain()==0
end
function c71564252.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
......@@ -34,11 +34,11 @@ function c91078716.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c91078716.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c91078716.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg:GetFirst())
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c91078716.condition2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -27,10 +27,10 @@ function c98069388.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c98069388.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c98069388.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg:GetFirst())
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
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