buffer witchess_fights(buffer page) {
record reward {
string match_text;
item it;
string type;
string additional_text;
};
static {
reward [8] witch_pieces;
witch_pieces[0] = new reward("<b>Pawn</b></a>", $item[armored prawn], "Spleen", "Init +50");
witch_pieces[1] = new reward("<b>Knight</b></a>", $item[jumping horseradish], "Food", "Meat +100%");
witch_pieces[2] = new reward("<b>Bishop</b></a>", $item[Sacramento wine], "Booze", "Item +50%");
witch_pieces[3] = new reward("<b>Rook</b></a>", $item[Greek fire], "Potion", "ML +25, Exp +10");
witch_pieces[4] = new reward("<b>Ox</b></a>", $item[ox-head shield], "Shield", "Max HP +100, DR +26, Fites +8, Never Fumble, Prismatic Res +2");
witch_pieces[5] = new reward("<b>King</b></a>", $item[dented scepter], "Club", "Mus Exp +5, HP Regen 5-10, Mus +50%, Wpn Dmg +50%, Critical Hit +10%, Single Equip");
witch_pieces[6] = new reward("<b>Witch</b></a>", $item[battle broom], "Accessory", "Myst Exp +5, MP Regen 5-10, Myst +50%, Spell Dmg +100%, Spell Critical +10%, Single Equip");
witch_pieces[7] = new reward("<b>Queen</b></a>", $item[very pointy crown], "Hat", "Mox Exp +5, Adv +5, Mox +50%, Combat Rate -5");
}
foreach i, s in witch_pieces {
buffer rep;
rep.append(s.match_text);
rep.append("<br><center><table><tr><td><img src='/images/itemimages/");
rep.append(s.it.image);
rep.append("' class='hand' onClick='javascript:descitem(");
rep.append(s.it.descid);
rep.append(")'></td><td><a onClick='javascript:descitem(");
rep.append(s.it.descid);
rep.append(")'><b>");
rep.append(s.type);
rep.append("</a></b></td></tr></table></center><div style="color:blue; font-size:75%">");
rep.append(s.additional_text);
rep.append("</div>");
page.replace_string(s.match_text, rep);
}
return page;
}
buffer witchess_fights(buffer page) {
record reward {
string match_text;
item it;
string type;
string additional_text;
};
static {
reward [8] witch_pieces;
witch_pieces[0] = new reward("<b>Pawn</b></a>", $item[armored prawn], "Spleen", "Init +50");
witch_pieces[1] = new reward("<b>Knight</b></a>", $item[jumping horseradish], "Food", "Meat +100%");
witch_pieces[2] = new reward("<b>Bishop</b></a>", $item[Sacramento wine], "Booze", "Item +50%");
witch_pieces[3] = new reward("<b>Rook</b></a>", $item[Greek fire], "Potion", "ML +25<br>Exp +10");
witch_pieces[4] = new reward("<b>Ox</b></a>", $item[ox-head shield], "Shield", "Max HP +100<br>DR +26<br>Prismatic Res +2<br>Rollover Fites +8<br>Never Fumble");
witch_pieces[5] = new reward("<b>King</b></a>", $item[dented scepter], "Club", "Mus Exp +5<br>HP Regen 5-10<br>Mus +50%<br>Wpn Dmg +50%<br>Critical Hit +10%");
witch_pieces[6] = new reward("<b>Witch</b></a>", $item[battle broom], "Accessory", "Myst Exp +5<br>MP Regen 5-10<br>Myst +50%<br>Spell Dmg +100%<br>Spell Critical +10%");
witch_pieces[7] = new reward("<b>Queen</b></a>", $item[very pointy crown], "Hat", "Mox Exp +5<br>Rollover Adv +5<br>Mox +50%<br>Combat Rate -5<br>Critical Hit Delevel");
}
foreach i, s in witch_pieces {
buffer rep;
rep.append(s.match_text);
rep.append("<br><center><table><tr><td><img src='/images/itemimages/");
rep.append(s.it.image);
rep.append("' class='hand' onClick='javascript:descitem(");
rep.append(s.it.descid);
rep.append(")'></td><td><a onClick='javascript:descitem(");
rep.append(s.it.descid);
rep.append(")'><b>");
rep.append(s.type);
rep.append("</a></b></td></tr></table></center><div style=\"color:blue; font-size:75%\">");
rep.append(s.additional_text);
rep.append("</div>");
page.replace_string(s.match_text, rep);
}
// Line up the pieces neatly.
page.replace_string('<div style="display:inline-block; text-align: center; width: 120px">', '<div style="vertical-align:top; display:inline-block; text-align: center; width: 120px">');
return page;
}
buffer witchess_fights(buffer page) {
record reward {
string match_text;
item it;
string type;
string additional_text;
};
static {
reward [8] witch_pieces;
witch_pieces[0] = new reward("<b>Pawn</b></a>", $item[armored prawn], "Spleen", "Init +50%");
witch_pieces[1] = new reward("<b>Knight</b></a>", $item[jumping horseradish], "Food", "Meat +100%");
witch_pieces[2] = new reward("<b>Bishop</b></a>", $item[Sacramento wine], "Booze", "Item +50%");
witch_pieces[3] = new reward("<b>Rook</b></a>", $item[Greek fire], "Potion", "ML +25<br>Exp +10");
witch_pieces[4] = new reward("<b>Ox</b></a>", $item[ox-head shield], "Shield", "Max HP +100<br>DR +26<br>Prismatic Res +2<br>Rollover Fites +8<br>Never Fumble");
witch_pieces[5] = new reward("<b>King</b></a>", $item[dented scepter], "Club", "Mus Exp +5<br>HP Regen 5-10<br>Mus +50%<br>Wpn Dmg +50%<br>Critical Hit +10%");
witch_pieces[6] = new reward("<b>Witch</b></a>", $item[battle broom], "Accessory", "Myst Exp +5<br>MP Regen 5-10<br>Myst +50%<br>Spell Dmg +100%<br>Spell Critical +10%");
witch_pieces[7] = new reward("<b>Queen</b></a>", $item[very pointy crown], "Hat", "Mox Exp +5<br>Rollover Adv +5<br>Mox +50%<br>Combat Rate -5<br>Critical Hit Delevel");
}
foreach i, s in witch_pieces {
buffer rep;
rep.append(s.match_text);
rep.append("<br><center><table><tr title='");
rep.append(s.it);
rep.append(" (have ");
rep.append(available_amount(s.it));
rep.append(")");
if($items[ox-head shield, dented scepter, battle broom, very pointy crown] contains s.it)
rep.append("\nWill disappear at the end of day");
rep.append("'><td><img src='/images/itemimages/");
rep.append(s.it.image);
rep.append("' class='hand' onClick='javascript:descitem(");
rep.append(s.it.descid);
rep.append(")'></td><td><a onClick='javascript:descitem(");
rep.append(s.it.descid);
rep.append(")'><b>");
rep.append(s.type);
rep.append("</a></b></td></tr></table></center><div style=\"color:blue; font-size:75%\">");
rep.append(s.additional_text);
rep.append("</div>");
page.replace_string(s.match_text, rep);
}
// Line up the pieces neatly.
page.replace_string('<div style="display:inline-block; text-align: center; width: 120px">', '<div style="vertical-align:top; display:inline-block; text-align: center; width: 120px">');
return page;
}