Fix hair, dick around with new game screen.
[18plus-7leafadventure.git] / src / org / sevenchan / dongs / screens / WinnerScreen.as
blob58605b7d2f969495ba72b71d4a94414d8367f60b
1 package org.sevenchan.dongs.screens
3 import org.sevenchan.AdventureController;
4 import org.sevenchan.dongs.Creature;
5 import org.sevenchan.dongs.Screen;
6 import org.sevenchan.dongs.Item;
8 /**
9 * ...
10 * @author Harbinger
12 public class WinnerScreen extends Screen
14 public static var immediatelyConsume:Boolean = false;
15 private var player:Creature;
16 private var loser:Creature;
19 public static function push(ply:Creature, loser:Creature):void {
20 AdventureController.screenQueue.write(new WinnerScreen(ply, loser));
22 public function WinnerScreen(ply:Creature,loser:Creature)
24 player = ply;
25 this.loser = loser;
26 clearButtons();
27 lustCost = 1;
28 setButton(NEXT_BUTTON, "Next");
31 override public function getScreenText():String
33 var text:String = "<h2>You won!</h2><p>You received:<ul>";
34 trace("LOSER INVENTORY");
35 for each (var item:Item in loser.inventory) {
36 if(player.inventoryUpdate(item,true)) {
37 text += "<li>" + item.amount + "x " + item.name + "</li>";
38 player.addToInventory(item);
41 text += "<li>" + loser.gold + " gold</li>";
42 text += "<li>" + (6+((player.level - loser.level)*1)) + " XP</li>";
43 text+="</ul></p> ";
44 //player.gold += loser.gold;
45 return text;