mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
YASC codes work better if killed on a 10+ tile
This commit is contained in:
parent
fdf83820f2
commit
a650fe7faf
@ -399,6 +399,11 @@ EX void create_yasc_message() {
|
|||||||
println(hlog, "YASC_MESSAGE: ", yasc_message);
|
println(hlog, "YASC_MESSAGE: ", yasc_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int yasc_recode(int x) {
|
||||||
|
if(cwt.at->type < 10 || x == 0) return x;
|
||||||
|
return yasc_recode(x / 10) * 100 + (x % 10);
|
||||||
|
};
|
||||||
|
|
||||||
EX void checkmove() {
|
EX void checkmove() {
|
||||||
|
|
||||||
if(dual::state == 2) return;
|
if(dual::state == 2) return;
|
||||||
@ -443,7 +448,7 @@ EX void checkmove() {
|
|||||||
|
|
||||||
yasc_code = 0;
|
yasc_code = 0;
|
||||||
for(int i=0; i<cwt.at->type; i++)
|
for(int i=0; i<cwt.at->type; i++)
|
||||||
yasc_code += move_issues[i].type;
|
yasc_code += yasc_recode(move_issues[i].type);
|
||||||
|
|
||||||
if(!canmove && bow::crossbow_mode() && !items[itCrossbow]) canmove = bow::have_bow_target();
|
if(!canmove && bow::crossbow_mode() && !items[itCrossbow]) canmove = bow::have_bow_target();
|
||||||
|
|
||||||
|
13
quit.cpp
13
quit.cpp
@ -32,6 +32,17 @@ EX string getgametime_s(int timespent IS(getgametime())) {
|
|||||||
|
|
||||||
EX bool display_yasc_codes;
|
EX bool display_yasc_codes;
|
||||||
|
|
||||||
|
string formatted_yasc_code() {
|
||||||
|
if(yasc_code < 100000) return its(yasc_code);
|
||||||
|
int y = yasc_code;
|
||||||
|
string out;
|
||||||
|
while(y >= 100) {
|
||||||
|
out = "-" + its(y%100) + out;
|
||||||
|
y /= 100;
|
||||||
|
}
|
||||||
|
return its(y) + out;
|
||||||
|
}
|
||||||
|
|
||||||
string timeline() {
|
string timeline() {
|
||||||
string s;
|
string s;
|
||||||
if(shmup::on)
|
if(shmup::on)
|
||||||
@ -39,7 +50,7 @@ string timeline() {
|
|||||||
else {
|
else {
|
||||||
s = XLAT("%1 turns (%2)", its(turncount), getgametime_s());
|
s = XLAT("%1 turns (%2)", its(turncount), getgametime_s());
|
||||||
if(display_yasc_codes)
|
if(display_yasc_codes)
|
||||||
s+= XLAT(" YASC code: ") + its(yasc_code);
|
s+= XLAT(" YASC code: ") + formatted_yasc_code();
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user