- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
private static const COST_DELTA:Array = [
{d:5,c:0},
{d:10,c:500},
{d:15,c:1000},
{d:20,c:2000},
{d:25,c:3500},
{d:30,c:5000},
{d:35,c:7500},
{d:40,c:10000},
{d:45,c:15000}
];
private var _cost:int = -1;
private static const HARDCODED_FRIENDS:Set = new Set(['yorick']);
override public function get cost():int {
if (HARDCODED_FRIENDS.find(this.id)) {
return 0;
}
var playerLevel:int = Player.instance.playerLevel;
var delta:int = Math.max(this.level - playerLevel, 0);
for each (var cost:Object in COST_DELTA) {
var num:int = cost['d'];
if (num > delta) {
break;
}
}
return cost['c'];
}
// Player
public function get playerLevel() : int {
return 0;//this.getResource(Resources.LEVEL).quantity;
}