Mindduel split and indent buffer lines
This commit is contained in:
@@ -1466,18 +1466,18 @@ void do_mindduel(short pc_num,cCreature *monst) {
|
|||||||
r2 = get_ran(1,1,6);
|
r2 = get_ran(1,1,6);
|
||||||
if(r1 < 30) {
|
if(r1 < 30) {
|
||||||
sout << " " << univ.party[pc_num].name << " is drained " << r2 << '.';
|
sout << " " << univ.party[pc_num].name << " is drained " << r2 << '.';
|
||||||
add_string_to_buf(sout.str());
|
add_string_to_buf(sout.str(), 4);
|
||||||
monst->mp += r2;
|
monst->mp += r2;
|
||||||
balance++;
|
balance++;
|
||||||
if(univ.party[pc_num].cur_sp == 0) {
|
if(univ.party[pc_num].cur_sp == 0) {
|
||||||
univ.party[pc_num].status[eStatus::DUMB] += 2;
|
univ.party[pc_num].status[eStatus::DUMB] += 2;
|
||||||
sout.str("");
|
sout.str("");
|
||||||
sout << " " << univ.party[pc_num].name << " is dumbfounded.";
|
sout << " " << univ.party[pc_num].name << " is dumbfounded.";
|
||||||
add_string_to_buf(sout.str());
|
add_string_to_buf(sout.str(), 4);
|
||||||
if(univ.party[pc_num].status[eStatus::DUMB] > 7) {
|
if(univ.party[pc_num].status[eStatus::DUMB] > 7) {
|
||||||
sout.str("");
|
sout.str("");
|
||||||
sout << " " << univ.party[pc_num].name << " is killed!";
|
sout << " " << univ.party[pc_num].name << " is killed!";
|
||||||
add_string_to_buf(sout.str());
|
add_string_to_buf(sout.str(), 4);
|
||||||
kill_pc(univ.party[pc_num],eMainStatus::DEAD);
|
kill_pc(univ.party[pc_num],eMainStatus::DEAD);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1488,7 +1488,7 @@ void do_mindduel(short pc_num,cCreature *monst) {
|
|||||||
}
|
}
|
||||||
if(r1 > 70) {
|
if(r1 > 70) {
|
||||||
sout << " " << univ.party[pc_num].name << " drains " << r2 << '.';
|
sout << " " << univ.party[pc_num].name << " drains " << r2 << '.';
|
||||||
add_string_to_buf(sout.str());
|
add_string_to_buf(sout.str(), 4);
|
||||||
univ.party[pc_num].cur_sp += r2;
|
univ.party[pc_num].cur_sp += r2;
|
||||||
balance--;
|
balance--;
|
||||||
if(monst->mp == 0) {
|
if(monst->mp == 0) {
|
||||||
|
@@ -29,7 +29,7 @@ void damaged_message(short damage,eMonstMelee type);
|
|||||||
std::string print_monster_going(mon_num_t m_num,short ap);
|
std::string print_monster_going(mon_num_t m_num,short ap);
|
||||||
void print_nums(short a,short b,short c);
|
void print_nums(short a,short b,short c);
|
||||||
short print_terrain(location space);
|
short print_terrain(location space);
|
||||||
void add_string_to_buf(std::string str, unsigned short indent); // Set second paramater to nonzero to auto-split the line if it's too long
|
void add_string_to_buf(std::string str, unsigned short indent); // Set second parameter to nonzero to auto-split the line if it's too long
|
||||||
void add_string_to_buf(std::string str);
|
void add_string_to_buf(std::string str);
|
||||||
void init_buf();
|
void init_buf();
|
||||||
void print_buf () ;
|
void print_buf () ;
|
||||||
|
Reference in New Issue
Block a user