Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed rendering crashes when enchanting (caused by optimisation to re…

…ndering equipment layers), new quest marks quest menu as unvisited, quest completion walks out of quest menu and sets selection to 0, fixed teleported Horror crashing game, Horror now unaffected by gates, fixed potential error in polymorph effect, fixed potential error from use of xp effect via chaos rune, bricked eating chaos runes in areas, fixed drop option becoming locked after viewing cursed item, bricked chaos armour activity in areas, healing creates blood-type coloured sparks that rise up, fixed multiple invisible armours eating each other's image buffers, items dropped inside a wall are teleported out to a random location (a message is printed in the console), xp rune can now be used at level 20 to simply effect a quickening (previously unusable at level 20), added sanity checks to Horror AI to avoid null-target bugs, overridden applyDamage and applyStun on Gate and Horror - just in case, Gates no longer allow enchantment from missile weapons, konami code lives now reset on full reset, fixed inventory duplication when quitting to title screen, Lore unlocked now cleared on hard reset, end game checks for the husband now depend purely on UserData.settings.husband instead of checking against the minion's current form (which could have been polymorphed somehow), completion count only raised by spawning golems when the level is not completed, fixed throwing weapon stats not being applied when thrown, balrog now takes half damage from quickening, elite monsters now take half damage from holy runes, holy explosions now deal half the health of the target as the initial damage instead of full, fear enchanted missiles now black and drop crawling drips
  • Loading branch information...
commit a50b8f1f55b486dc46a094fc9be48f00213cf11e 1 parent 0d80f59
st33d authored
10 TODO.txt
View
@@ -1,6 +1,8 @@
-Change log: quests not being loaded when starting a new game - fixed, moved version number to title menu, changed immortal begin text to white, fixed grammar in auto-sort help, shared object flush wrapped in try/catch to send users to manage their shared object settings if saving is blocked, link to redrogue.net in credits menu
+Change log: fixed rendering crashes when enchanting (caused by optimisation to rendering equipment layers), new quest marks quest menu as unvisited, quest completion walks out of quest menu and sets selection to 0, fixed teleported Horror crashing game, Horror now unaffected by gates, fixed potential error in polymorph effect, fixed potential error from use of xp effect via chaos rune, bricked eating chaos runes in areas, fixed drop option becoming locked after viewing cursed item, bricked chaos armour activity in areas, healing creates blood-type coloured sparks that rise up, fixed multiple invisible armours eating each other's image buffers, items dropped inside a wall are teleported out to a random location (a message is printed in the console), xp rune can now be used at level 20 to simply effect a quickening (previously unusable at level 20), added sanity checks to Horror AI to avoid null-target bugs, overridden applyDamage and applyStun on Gate and Horror - just in case, Gates no longer allow enchantment from missile weapons, konami code lives now reset on full reset, fixed inventory duplication when quitting to title screen, Lore unlocked now cleared on hard reset, end game checks for the husband now depend purely on UserData.settings.husband instead of checking against the minion's current form (which could have been polymorphed somehow), completion count only raised by spawning golems when the level is not completed, fixed throwing weapon stats not being applied when thrown, balrog now takes half damage from quickening, elite monsters now take half damage from holy runes, holy explosions now deal half the health of the target as the initial damage instead of full, fear enchanted missiles now black and drop crawling drips
Bug hunt
- weapon on player and minion disappearing
- possible fix applied
-
+ pocket dungeon errors
+ unreproducible
+ re-entering: setLevel() 709, init() 519, reset() 584, TitleMenu.launchGame() 205
+ portal opened by chaos spell is broken - reported as opened by altar
+ unreproducible
BIN  bin/game.swf
View
Binary file not shown
25 obj/gameConfig.old
View
@@ -2,7 +2,9 @@
<!--This Adobe Flex compiler configuration file was generated by a tool.-->
<!--Any modifications you make may be lost.-->
<flex-config>
- <target-player>10.0.0</target-player>
+ <target-player>10.0</target-player>
+ <benchmark>false</benchmark>
+ <static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
<compiler>
<define append="true">
<name>CONFIG::debug</name>
@@ -14,18 +16,31 @@
</define>
<define append="true">
<name>CONFIG::timeStamp</name>
- <value>'02/12/2012'</value>
+ <value>'26/12/2012'</value>
</define>
+ <define append="true">
+ <name>CONFIG::air</name>
+ <value>false</value>
+ </define>
+ <define append="true">
+ <name>CONFIG::mobile</name>
+ <value>false</value>
+ </define>
+ <define append="true">
+ <name>CONFIG::desktop</name>
+ <value>false</value>
+ </define>
+ <verbose-stacktraces>true</verbose-stacktraces>
<source-path append="true">
- <path-element>C:\Users\st33d\Documents\rogue\1.0.1\src</path-element>
+ <path-element>C:\Users\st33d\Documents\rogue\1.0.3\src</path-element>
<path-element>C:\Program Files (x86)\FlashDevelop\Library\AS3\classes</path-element>
</source-path>
<include-libraries>
- <library>C:\Users\st33d\Documents\rogue\1.0.1\src\assets\assets.swc</library>
+ <library>C:\Users\st33d\Documents\rogue\1.0.3\src\assets\assets.swc</library>
</include-libraries>
</compiler>
<file-specs>
- <path-element>C:\Users\st33d\Documents\rogue\1.0.1\src\Preloader.as</path-element>
+ <path-element>C:\Users\st33d\Documents\rogue\1.0.3\src\Preloader.as</path-element>
</file-specs>
<default-background-color>#FFFFFF</default-background-color>
<default-frame-rate>30</default-frame-rate>
25 obj/gameConfig.xml
View
@@ -2,7 +2,9 @@
<!--This Adobe Flex compiler configuration file was generated by a tool.-->
<!--Any modifications you make may be lost.-->
<flex-config>
- <target-player>10.0.0</target-player>
+ <target-player>10.0</target-player>
+ <benchmark>false</benchmark>
+ <static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
<compiler>
<define append="true">
<name>CONFIG::debug</name>
@@ -14,18 +16,31 @@
</define>
<define append="true">
<name>CONFIG::timeStamp</name>
- <value>'02/12/2012'</value>
+ <value>'26/12/2012'</value>
</define>
+ <define append="true">
+ <name>CONFIG::air</name>
+ <value>false</value>
+ </define>
+ <define append="true">
+ <name>CONFIG::mobile</name>
+ <value>false</value>
+ </define>
+ <define append="true">
+ <name>CONFIG::desktop</name>
+ <value>false</value>
+ </define>
+ <verbose-stacktraces>true</verbose-stacktraces>
<source-path append="true">
- <path-element>C:\Users\st33d\Documents\rogue\1.0.1\src</path-element>
+ <path-element>C:\Users\st33d\Documents\rogue\1.0.3\src</path-element>
<path-element>C:\Program Files (x86)\FlashDevelop\Library\AS3\classes</path-element>
</source-path>
<include-libraries>
- <library>C:\Users\st33d\Documents\rogue\1.0.1\src\assets\assets.swc</library>
+ <library>C:\Users\st33d\Documents\rogue\1.0.3\src\assets\assets.swc</library>
</include-libraries>
</compiler>
<file-specs>
- <path-element>C:\Users\st33d\Documents\rogue\1.0.1\src\Preloader.as</path-element>
+ <path-element>C:\Users\st33d\Documents\rogue\1.0.3\src\Preloader.as</path-element>
</file-specs>
<default-background-color>#FFFFFF</default-background-color>
<default-frame-rate>30</default-frame-rate>
16 src/Game.as
View
@@ -75,7 +75,7 @@
public class Game extends Sprite {
- public static const VERSION_NUM:Number = 1.01;
+ public static const VERSION_NUM:Number = 1.03;
public static const TEST_BED_INIT:Boolean = false;
public static const ONLINE:Boolean = true;
@@ -485,6 +485,7 @@
frameCount = 1;
deepestLevelReached = 1;
+ livesAvailable = new HiddenInt(UserData.settings.livesAvailable);
lives.value = 0;
// LISTS
@@ -571,6 +572,8 @@
world = null;
lightMap = null;
mapTileManager = null;
+ livesAvailable.value += lives.value;
+ lives.value = 0;
if(newGame){
UserData.initGameState();
UserData.push();
@@ -825,7 +828,7 @@
console.print(player.nameToString() + " reverts to human form");
player.changeName(Character.ROGUE, new RogueColMC);
if(minion){
- if(minion.name == Character.HUSBAND || UserData.gameState.husband){
+ if(UserData.gameState.husband){
if(minion.name != Character.HUSBAND)
console.print(minion.nameToString() + " reverts to human form");
minion.changeName(Character.HUSBAND, new AtColMC);
@@ -851,7 +854,8 @@
// revert to black and white rogue
if(Player.previousLevel == Map.OVERWORLD){
player.changeName(Character.ROGUE, new RogueMC);
- // technically we wouldn't get here because of the ending triggering
+ // technically we wouldn't get here because of the ending triggering,
+ // this code is here to keep things consistent during debugging if the ending is disabled
if(minion){
if(minion.name == Character.HUSBAND){
minion.changeName(Character.HUSBAND, new AtMC);
@@ -892,7 +896,7 @@
if(
gameMenu.inventoryList.getItem(Item.YENDOR, Item.ARMOUR) &&
minion &&
- minion.name != Character.HUSBAND
+ !UserData.settings.husband
){
endGameEvent = true;
for(i = 0; i < entities.length; i++){
@@ -906,7 +910,7 @@
// check for yendor or husband
if(
gameMenu.inventoryList.getItem(Item.YENDOR, Item.ARMOUR) ||
- (minion && minion.name == Character.HUSBAND)
+ (minion && UserData.settings.husband)
){
endGameEvent = true;
}
@@ -1396,11 +1400,11 @@
gameMenu.addDebugOption();
if(fpsText) fpsText.visible = true;
}
+ /*
if(Key.isDown(Key.T)){
var portal:Portal = Portal.createPortal(Portal.MINION, game.player.mapX, game.player.mapY);
portal.setCloneTemplate();
}
- /*
if(Key.isDown(Key.T)){
if(balrog) balrog.death();
}
11 src/com/robotacid/ai/HorrorBrain.as
View
@@ -1,5 +1,6 @@
package com.robotacid.ai {
import com.robotacid.engine.Character;
+ import com.robotacid.phys.Collider;
/**
* Mind state object for Horror characters
@@ -41,6 +42,16 @@ package com.robotacid.ai {
}
}
+ /* Standard Brain clearing nulls the target - causing a crash */
+ override public function clear():void {
+ altNode = null;
+ // drop from ladder
+ if(char.collider.state == Collider.HOVER){
+ char.collider.state = Collider.FALL;
+ char.collider.divorce();
+ }
+ }
+
}
}
4 src/com/robotacid/engine/ChaosWall.as
View
@@ -342,6 +342,10 @@ package com.robotacid.engine {
game.mapTileManager.converter.convertIndicesToObjects(mapX, mapY, monster);
renderer.createDebrisExplosion(collider, 10, 80, Renderer.STONE);
renderer.createDebrisRect(collider, 0, 60, Renderer.STONE);
+ if(game.map.completionCount){
+ game.map.completionCount++;
+ game.map.completionTotal++;
+ }
} else {
renderer.createDebrisRect(collider, 0, 100, Renderer.STONE);
}
19 src/com/robotacid/engine/Character.as
View
@@ -660,7 +660,10 @@
ty = node.collider.y + node.collider.height * 0.5;
}
if(game.lightning.strike(renderer.lightningShape.graphics, game.world.map, p.x, p.y, tx, ty) && node && enemy(node.collider.userData)){
- node.applyDamage(game.random.value() * QUICKENING_PER_LEVEL * level, "quickening");
+ node.applyDamage(
+ game.random.value() * QUICKENING_PER_LEVEL * level * (node.name == BALROG ? 0.5 : 1),
+ "quickening"
+ );
if(node.brain) node.brain.flee(this);
renderer.createDebrisSpurt(tx, ty, 5, 5, node.debrisType);
}
@@ -686,7 +689,10 @@
ty = node.collider.y + node.collider.height * 0.5;
}
if(game.lightning.strike(renderer.lightningShape.graphics, game.world.map, p.x, p.y, tx, ty) && node && enemy(node.collider.userData)){
- node.applyDamage(game.random.value() * QUICKENING_PER_LEVEL * level, "quickening");
+ node.applyDamage(
+ game.random.value() * QUICKENING_PER_LEVEL * level * (node.name == BALROG ? 0.5 : 1),
+ "quickening"
+ );
if(node.brain) node.brain.flee(this);
renderer.createDebrisSpurt(tx, ty, -5, 5, node.debrisType);
}
@@ -966,7 +972,10 @@
public function finishQuicken():void{
state = WALKING;
gfx.transform.colorTransform = new ColorTransform();
- if(this is Player) game.console.print("welcome to level " + level + " " + nameToString());
+ if(this is Player) {
+ if(level < Game.MAX_LEVEL) game.console.print("welcome to level " + level + " " + nameToString());
+ else game.console.print(nameToString() + " has reached maximum level");
+ }
}
/* Used to auto-center when climbing */
@@ -1144,10 +1153,10 @@
}
/* Determine if we have hit another character */
- public function hit(character:Character, range:int):int{
+ public function hit(character:Character, range:int, item:Item = null):int{
if(indifferent) return MISS;
var attackRoll:Number = game.random.value();
- var item:Item = lungeState == LUNGE_FORWARD ? weapon : throwable;
+ if(!item) item = lungeState == LUNGE_FORWARD ? weapon : throwable;
if(attackRoll >= CRITICAL_HIT)
return CRITICAL | STUN;
else if(attackRoll <= CRITICAL_MISS)
26 src/com/robotacid/engine/Effect.as
View
@@ -131,7 +131,8 @@
dismiss();
}
}
- } else if(name == HEAL){
+ } else if(name == HEAL) {
+ if((game.frameCount & 1) == 0) renderer.createSparkRect(target.collider, 1, 0, -1, target.debrisType);
if(source == EATEN || source == THROWN || source == WEAPON){
if(count){
count--;
@@ -305,9 +306,13 @@
// chaos armour is similar to teleport armour in that casts chaos on the target periodically
if(count) count--;
else {
- if(target.state == Character.WALKING){
- var effect:Effect = new Effect(CHAOS, game.random.rangeInt(Game.MAX_LEVEL), EATEN, target);
+ if(target.state == Character.WALKING) {
count = (20 - game.random.rangeInt(level)) * ARMOUR_COUNTDOWN_STEP;
+
+ // we can't risk banned area effects being called in areas, so chaos armour will do nothing there
+ if(game.map && game.map.type == Map.AREA) return;
+
+ var effect:Effect = new Effect(CHAOS, game.random.rangeInt(Game.MAX_LEVEL), EATEN, target);
}
}
}
@@ -660,6 +665,7 @@
var newName:int;
// limit change by exploration - no infinite loop to catch here, there are two options from the start
var nameRange:int = game.deepestLevelReached + 1;
+ if(nameRange > Content.monsterNameDeck.length) nameRange = Content.monsterNameDeck.length;
if(target.armour && target.armour.name == Item.FACE){
// when the character is wearing face armour, we only need change the race underneath
newName = (target.armour as Face).previousName;
@@ -676,10 +682,14 @@
} else if(name == XP){
// all characters except the player will get a level up, the player gets xp to their next level
- if(target is Player){
- (target as Player).addXP(1 + (Content.xpTable[(target as Player).level] - (target as Player).xp));
+ if(target.level < Game.MAX_LEVEL){
+ if(target is Player){
+ (target as Player).addXP(1 + (Content.xpTable[(target as Player).level] - (target as Player).xp));
+ } else {
+ target.levelUp();
+ }
} else {
- target.levelUp();
+ target.quicken();
}
return;
@@ -1083,8 +1093,8 @@
}
} else {
// obliterate the target
- if(game.random.coinFlip()) target.smite((target.looking & Collider.RIGHT) ? Collider.LEFT : Collider.RIGHT, target.totalHealth);
- else var explosion:Explosion = new Explosion(0, target.mapX, target.mapY, 5, target.totalHealth, game.player, null, game.player.missileIgnore);
+ if(game.random.coinFlip()) target.smite((target.looking & Collider.RIGHT) ? Collider.LEFT : Collider.RIGHT, target.totalHealth * (target.rank == Character.ELITE ? 0.5 : 1));
+ else var explosion:Explosion = new Explosion(0, target.mapX, target.mapY, 5, target.totalHealth * 0.5 * (target.rank == Character.ELITE ? 0.5 : 1), game.player, null, game.player.missileIgnore);
}
game.soundQueue.playRandom(["Prayer01", "Prayer02", "Prayer03"]);
}
10 src/com/robotacid/engine/Gate.as
View
@@ -89,7 +89,7 @@
}
override public function createCollider(x:Number, y:Number, properties:int, ignoreProperties:int, state:int = 0, positionByBase:Boolean = true):void {
- collider = new Collider(x, y, Game.SCALE, Game.SCALE, Game.SCALE, Collider.CHARACTER | Collider.SOLID | Collider.GATE, Collider.CORPSE | Collider.ITEM | Collider.WALL | Collider.CHAOS | Collider.GATE, Collider.HOVER);
+ collider = new Collider(x, y, Game.SCALE, Game.SCALE, Game.SCALE, Collider.CHARACTER | Collider.SOLID | Collider.GATE, Collider.CORPSE | Collider.ITEM | Collider.WALL | Collider.CHAOS | Collider.GATE | Collider.HORROR, Collider.HOVER);
collider.userData = this;
collider.pushDamping = 0;
collider.dampingX = collider.dampingY = 1;
@@ -226,6 +226,14 @@
} else return;
}
+ /* Just in case */
+ override public function applyStun(delay:Number):void {
+ return;
+ }
+ override public function applyWeaponEffects(item:Item):void {
+ return;
+ }
+
public function open():void{
if(!callMain){
callMain = true;
18 src/com/robotacid/engine/Horror.as
View
@@ -74,24 +74,24 @@ package com.robotacid.engine {
collider.userData = this;
mapX = (collider.x + collider.width * 0.5) * Game.INV_SCALE;
mapY = (collider.y + collider.height * 0.5) * Game.INV_SCALE;
- collider.ignoreProperties |= Collider.CHARACTER | Collider.MONSTER_MISSILE | Collider.PLAYER_MISSILE | Collider.HORROR;
+ collider.ignoreProperties |= Collider.CHARACTER | Collider.MONSTER_MISSILE | Collider.PLAYER_MISSILE | Collider.HORROR | Collider.GATE | Collider.MISSILE;
collider.properties |= Collider.HORROR;
}
override public function main():void {
tileCenter = (mapX + 0.5) * SCALE;
- if(state == WALKING) brain.main();
+ if(state == WALKING && brain.target) brain.main();
super.main();
- renderer.addDripFX(spawnRect, 3, debrisType);
+ renderer.createDrips(spawnRect, 3, debrisType);
if(!victim.indifferent && spawnRect.intersects(victim.collider)){
victim.applyDamage(damage, "horror", 0, false, this, false);
renderer.createDebrisRect(victim.collider, 0, 2, victim.debrisType);
}
- if(!victim.active){
+ if(!victim.active || !brain.target){
count = 0;
if(state == SPAWNING) state = WALKING;
}
@@ -113,9 +113,17 @@ package com.robotacid.engine {
}
+ /* Just in case */
+ override public function applyStun(delay:Number):void {
+ return;
+ }
+ override public function applyWeaponEffects(item:Item):void {
+ return;
+ }
+
override public function death(cause:String = "crushing", decapitation:Boolean = false, aggressor:Character = null):void{
active = false;
- renderer.addDripFX(spawnRect, 40, debrisType);
+ renderer.createDrips(spawnRect, 40, debrisType);
if(!active && collider.world) collider.world.removeCollider(collider);
}
10 src/com/robotacid/engine/Item.as
View
@@ -1,5 +1,6 @@
package com.robotacid.engine {
import com.robotacid.ai.Brain;
+ import com.robotacid.geom.Pixel;
import com.robotacid.level.Map;
import com.robotacid.engine.Entity;
import com.robotacid.gfx.ItemMovieClip;
@@ -362,6 +363,15 @@
if(active){
game.items.push(this);
game.world.restoreCollider(collider);
+ // resolve being dropped inside a wall by teleporting out
+ if(game.world.map[mapY][mapX] & Collider.WALL){
+ renderer.createSparkRect(collider, 20, 0, -1);
+ var dest:Pixel = Effect.getTeleportTarget(mapX, mapY, game.world.map, game.mapTileManager.mapRect, Boolean(Surface.fragmentationMap));
+ collider.x = (dest.x + 0.5) * Game.SCALE;
+ collider.y = (dest.y + 1) * Game.SCALE;
+ renderer.createSparkRect(collider, 20, 0, -1);
+ game.console.print("the " + nameToString() + " became displaced");
+ }
}
}
18 src/com/robotacid/engine/Missile.as
View
@@ -50,6 +50,9 @@
public static const DART:int = 3;
public static const CHAOS:int = 4;
+ // debris types
+ public static const DRIP:int = 3;
+
public static const LIGHTNING_SOUNDS:Array = ["lightning1", "lightning2", "lightning3", "lightning4"];
public function Missile(
@@ -127,6 +130,10 @@
else if(effectName == Item.BLEED){
debris = true;
debrisType = Renderer.BLOOD;
+ } else if(effectName == Item.FEAR){
+ gfx.transform.colorTransform = new ColorTransform(0, 0, 0);
+ debris = true;
+ debrisType = -1;
}
}
@@ -183,7 +190,7 @@
){
reflect(target);
} else {
- var hitResult:int = sender.hit(target, Item.MISSILE | Item.THROWN);
+ var hitResult:int = sender.hit(target, Item.MISSILE | Item.THROWN, item);
if(hitResult){
hitCharacter(target, hitResult);
} else {
@@ -232,7 +239,10 @@
collider.ignoreProperties &= ~(Collider.SOLID);
// debris?
- if(debris) renderer.createDebrisRect(collider, -dx, 2, debrisType);
+ if(debris) {
+ if(debrisType < 0) renderer.createDrips(collider, 1, Renderer.STONE);
+ else renderer.createDebrisRect(collider, -dx, 2, debrisType);
+ }
if(sender && sender.active){
// lightning and xp runes cast quickening lightning
@@ -349,7 +359,7 @@
// would help if the player can see what they're doing to the target
if(sender is Player) sender.victim = character;
if(hitResult & Character.CRITICAL) renderer.shake(0, 5);
- if(item.effects && character.active && !(character.type & Character.STONE)){
+ if(item.effects && character.active && !(character.type & (Character.STONE | Character.GATE))){
character.applyWeaponEffects(item);
}
// knockback
@@ -542,7 +552,7 @@
ty = node.collider.y + node.collider.height * 0.5;
}
if(game.lightning.strike(renderer.lightningShape.graphics, game.world.map, p.x, p.y, tx, ty) && node && sender.enemy(node.collider.userData)){
- node.applyDamage(game.random.value() * LIGHTNING_DAMAGE_RATIO * item.damage, "lightning");
+ node.applyDamage(game.random.value() * LIGHTNING_DAMAGE_RATIO * item.damage * (node.name == Character.BALROG ? 0.5 : 1), "lightning");
renderer.createDebrisSpurt(tx, ty, 5, i == 0 ? -5 : 5, node.debrisType);
}
}
4 src/com/robotacid/engine/Monster.as
View
@@ -140,7 +140,9 @@
}
Brain.monsterCharacters.splice(Brain.monsterCharacters.indexOf(this), 1);
- if(--game.map.completionCount == 0) game.levelComplete();
+ if(game.map.completionCount){
+ if(--game.map.completionCount == 0) game.levelComplete();
+ }
}
override public function remove():void {
12 src/com/robotacid/engine/Player.as
View
@@ -725,9 +725,15 @@
for(var i:int = 0; i < disarmableTraps.length; i++){
trap = disarmableTraps[i];
var expertise:String = "";
- if(disarmTrapCount) expertise = "poorly";
- else if(!trap.revealed) expertise = "expertly";
- game.console.print(Trap.getName(trap.type) + " trap " + expertise + " disarmed");
+ var xpBonus:String = " +xp";
+ if(disarmTrapCount){
+ expertise = "poorly";
+ xpBonus = "";
+ } else if(!trap.revealed){
+ expertise = "expertly";
+ xpBonus = " ++xp";
+ }
+ game.console.print(Trap.getName(trap.type) + " trap " + expertise + " disarmed" + xpBonus);
disarmableTraps[i].disarm();
}
disarmableTraps.length = 0;
10 src/com/robotacid/engine/Portal.as
View
@@ -120,6 +120,10 @@
} else if(type == MONSTER){
clone = Content.XMLToEntity(mapX, mapY, cloneTemplate);
Brain.monsterCharacters.push(clone);
+ if(game.map.completionCount){
+ game.map.completionCount++;
+ game.map.completionTotal++;
+ }
}
game.entities.push(clone);
clone.enterLevel(this);
@@ -140,7 +144,7 @@
rect.y + rect.height > game.player.collider.y
){
game.player.applyHealth(game.player.totalHealth * UNDEAD_HEAL_RATE);
- renderer.createSparkRect(game.player.collider, 5, 0, -1);
+ renderer.createSparkRect(game.player.collider, 5, 0, -1, character.debrisType);
}
var character:Character;
for(var i:int = 0; i < game.entities.length; i++){
@@ -155,7 +159,7 @@
rect.y + rect.height > character.collider.y
){
character.applyHealth(character.totalHealth * UNDEAD_HEAL_RATE);
- renderer.createSparkRect(character.collider, 5);
+ renderer.createSparkRect(character.collider, 5, 0, -1, character.debrisType);
}
}
// resurrect the minion if dead
@@ -252,8 +256,6 @@
cloneTemplate.@characterNum = -1;
// strip the monster of items - this is not an item farm
delete cloneTemplate.item;
- game.map.completionCount += cloneTotal;
- game.map.completionTotal += cloneTotal;
}
cloneTotal = 1 + game.map.zone;
cloneEntryCount = CLONE_ENTRY_DELAY;
4 src/com/robotacid/engine/Stone.as
View
@@ -216,7 +216,7 @@
if(!revealed){
// give experience for not using search skill
game.player.addXP(SECRET_XP_REWARD * Content.getLevelXp(game.map.level));
- game.console.print("secret expertly discovered");
+ game.console.print("secret expertly discovered +xp");
reveal();
}
super.applyDamage(n, source, 0, critical, aggressor, defaultSound);
@@ -253,7 +253,7 @@
if(!active) return;
active = false;
renderer.createDebrisRect(collider, 0, 100, debrisType);
- game.console.print("secret revealed");
+ game.console.print("secret revealed +xp");
renderer.shake(0, 3);
game.soundQueue.addRandom("stoneDeath", DEATH_SOUNDS);
game.player.addXP(SECRET_XP_REWARD * Content.getLevelXp(game.map.level));
2  src/com/robotacid/engine/characterStats.json
View
@@ -165,7 +165,7 @@
"scavenge chest items, butcher bonus", "infravision", "damage reflection", "theft attack", "life steal, undead",
"infectious, insane", "form steal", "bleed attack", "stupefy attack", "confuse attack",
"superior defence", "fear attack, undead", "wall walk, undead", "xp steal", "chaos attack",
- "superior combat skills, soul devourer", "bleed immune, undead", "x2 backstab damage, superior search skill"
+ "superior combat skills, quickening resistant, soul devourer", "bleed immune, undead", "x2 backstab damage, superior search skill"
],
"descriptions":[
"widow to the rogue named @", "reptile goblin", "true goblin", "greater goblin", "goblin protector",
6 src/com/robotacid/gfx/ItemMovieClip.as
View
@@ -25,9 +25,9 @@ package com.robotacid.gfx {
public var gfx:DisplayObject;
public var buffer:BitmapData;
+ public var bitmapData:BitmapData;
private var bufferLoaded:Boolean;
- public static var bitmapData:BitmapData;
public static var characterMask:BitmapData;
public static var point:Point = new Point();
public static var rect:Rectangle;
@@ -72,6 +72,7 @@ package com.robotacid.gfx {
addChild(gfx);
} else if(name == Item.INVISIBILITY){
buffer = new BitmapData(CAPTURE_WIDTH, CAPTURE_HEIGHT, true, 0x0);
+ bitmapData = new BitmapData(CAPTURE_WIDTH, CAPTURE_HEIGHT, true, 0x0);
bufferLoaded = false;
} else if(name == Item.INDIFFERENCE){
gfx = new IndifferenceMC();
@@ -110,7 +111,6 @@ package com.robotacid.gfx {
public static function init():void{
characterMask = new BitmapData(CAPTURE_WIDTH, CAPTURE_HEIGHT, true, 0x0);
- bitmapData = new BitmapData(CAPTURE_WIDTH, CAPTURE_HEIGHT, true, 0x0);
rect = new Rectangle(0, 0, CAPTURE_WIDTH, CAPTURE_HEIGHT);
dx = -CAPTURE_WIDTH * 0.5;
dy = -CAPTURE_HEIGHT + 1;
@@ -175,6 +175,8 @@ package com.robotacid.gfx {
/* Called by the wielding Character.render() to apply the special animations the item requires */
public function render(character:Character, characterMc:MovieClip):void{
+ if(!parent || (gfx && !gfx.parent)) return;
+
var mc:MovieClip = gfx as MovieClip;
if(_type == Item.ARMOUR){
2  src/com/robotacid/gfx/Renderer.as
View
@@ -1 +1 @@
-package com.robotacid.gfx {
+package com.robotacid.gfx {
5 src/com/robotacid/phys/Collider.as
View
@@ -783,7 +783,10 @@ package com.robotacid.phys {
}
/* Pushes a collider out of any map surfaces it overlaps - used to resolve changing a collider's shape */
- public function resolveMapInsertion():void{
+ public function resolveMapInsertion(world:CollisionWorld = null):void{
+ world = world || this.world;
+ if(!world) return;
+
var mapX:int, mapY:int;
mapY = (y + height * 0.5) * world.invScale;
30 src/com/robotacid/ui/menu/GameMenu.as
View
@@ -205,9 +205,9 @@
portalTeleportOption.recordable = false;
giveDebugEquipmentOption = new MenuOption("give debug equipment");
giveDebugEquipmentOption.help = "gives items for investigating bugs.";
- saveSettingsFileOption = new MenuOption("save state to file");
+ saveSettingsFileOption = new MenuOption("save settings to file");
saveSettingsFileOption.help = "save settings to file.";
- loadSettingsFileOption = new MenuOption("load state from file");
+ loadSettingsFileOption = new MenuOption("load settings from file");
loadSettingsFileOption.help = "load settings from file. requires restarting the whole game.";
stairsUpPortalOption = new MenuOption("stairs up");
@@ -484,23 +484,16 @@
else inventoryList.eatOption.active = true;
if(!hotKeyMapRecord) inventoryList.feedMinionOption.active = Boolean(game.minion) && game.minion.health < game.minion.totalHealth;
else inventoryList.feedMinionOption.active = true;
+ inventoryList.dropOption.active = true;
} else if(item.type == Item.RUNE){
inventoryList.throwRuneOption.active = game.player.canMenuAction;
inventoryList.eatOption.active = true;
inventoryList.feedMinionOption.active = Boolean(game.minion);
- if(item.name == Effect.XP){
- if(game.minion) inventoryList.feedMinionOption.active = game.minion.level < Game.MAX_LEVEL;
- inventoryList.eatOption.active = game.player.level < Game.MAX_LEVEL;
- } else if(item.name == Effect.PORTAL){
+ inventoryList.dropOption.active = true;
+ if(item.name == Effect.PORTAL || item.name == Effect.POLYMORPH || item.name == Effect.IDENTIFY || item.name == Effect.CHAOS){
inventoryList.eatOption.active = game.map.type != Map.AREA;
if(game.minion) inventoryList.feedMinionOption.active = inventoryList.eatOption.active;
- } else if(item.name == Effect.POLYMORPH){
- inventoryList.eatOption.active = !(game.map.type == Map.AREA && game.map.level == Map.OVERWORLD);
- if(game.minion) inventoryList.feedMinionOption.active = inventoryList.eatOption.active;
- } else if(item.name == Effect.IDENTIFY){
- inventoryList.eatOption.active = (game.map.type != Map.AREA);
- if(game.minion) inventoryList.feedMinionOption.active = inventoryList.eatOption.active;
}
}
@@ -655,6 +648,7 @@
if(item.name == Character.KOBOLD) health += Character.stats["health levels"][item.name] * game.player.level * game.random.value();
health *= Item.HEALTH_PER_HEART;
game.player.applyHealth(health);
+ Game.renderer.createSparkRect(game.player.collider, 20, 0, -1, game.player.debrisType);
game.soundQueue.playRandom(["Munch01", "Munch02", "Munch03"]);
} else if(item.type == Item.RUNE){
@@ -674,6 +668,7 @@
if(item.name == Character.KOBOLD) health += Character.stats["health levels"][item.name] * game.minion.level * game.random.value();
health *= Item.HEALTH_PER_HEART;
game.minion.applyHealth(health);
+ Game.renderer.createSparkRect(game.minion.collider, 20, 0, -1, game.minion.debrisType);
game.soundQueue.playRandom(["Munch01", "Munch02", "Munch03"]);
} else if(item.type == Item.RUNE){
@@ -703,7 +698,7 @@
"you will lose all progress since you entered the level. are you sure.",
function():void{
game.state = Game.TITLE;
- game.reset(false);
+ reset(false, false);
},
Dialog.emptyCallback
);
@@ -1291,8 +1286,11 @@
}
/* Resets the game and the GameMenu for a new play session */
- public function reset(hard:Boolean = false):void{
- if(hard) UserData.reset();
+ public function reset(hard:Boolean = false, newGame:Boolean = true):void{
+ if(hard) {
+ loreList.reset();
+ UserData.reset();
+ }
game.trackEvent("reset game");
if(listInBranch(inventoryList)){
while(branch.length > 1) stepLeft();
@@ -1303,7 +1301,7 @@
inventoryList.reset();
loreList.questsList.reset();
actionsOption.active = false;
- game.reset();
+ game.reset(newGame);
}
/* Requires public variable "url" to be set before calling */
21 src/com/robotacid/ui/menu/LoreMenuList.as
View
@@ -138,6 +138,27 @@ package com.robotacid.ui.menu {
}
}
+ /* Locks all of the Lore (called on a hard reset) */
+ public function reset():void {
+ // note that the rogue's lore stays unlocked
+ var option:MenuOption, i:int, unlocked:Boolean;
+ for(i = 1; i < racesList.options.length; i++){
+ option = racesList.options[i];
+ option.hidden = true;
+ option.active = false;
+ }
+ for(i = 0; i < weaponsList.options.length; i++){
+ option = weaponsList.options[i];
+ option.hidden = true;
+ option.active = false;
+ }
+ for(i = 0; i < armourList.options.length; i++){
+ option = armourList.options[i];
+ option.hidden = true;
+ option.active = false;
+ }
+ }
+
/* Callback for mapInfo rendering */
private function renderMap():void{
var textBuffer:BitmapData;
9 src/com/robotacid/ui/menu/QuestMenuList.as
View
@@ -90,6 +90,7 @@ package com.robotacid.ui.menu {
game.map.completionCount += option.num;
game.map.completionTotal += option.num;
}
+ game.gameMenu.loreList.questsOption.visited = false;
if(!Game.dialog){
Game.dialog = new Dialog(
"new quest",
@@ -133,8 +134,9 @@ package com.robotacid.ui.menu {
// menu may be sitting on this option, resolve
if(menu.currentMenuList == this){
menu.stepLeft();
- selection = 0;
}
+ selection = 0;
+ menu.update();
var str:String;
if(option.type == QuestMenuOption.COLLECT){
str = "collect quest completed";
@@ -147,10 +149,11 @@ package com.robotacid.ui.menu {
}
game.console.print(str);
game.player.addXP(option.xpReward);
+ trace(option.xpReward);
if(!Game.dialog){
- var completionMsg:String = "\n@'s love for you is justified";
+ var completionMsg:String = "\n@'s love for you is justified\n+xp";
if(option.commissioner == "rng"){
- completionMsg = "\nrng is pleased with this pointless errand";
+ completionMsg = "\nrng is pleased with this pointless errand\n+xp";
}
Game.dialog = new Dialog(
"quest complete",
2  src/com/robotacid/ui/menu/TitleMenu.as
View
@@ -39,7 +39,7 @@ package com.robotacid.ui.menu {
optionsOption = new MenuOption("options", optionsList);
optionsOption.help = "configure settings.";
var versionOption:MenuOption = new MenuOption("v " + Game.versionToString(), null, false);
- optionsOption.help = "current version.";
+ versionOption.help = "current version.";
actionRPGOption = new MenuOption("action rpg");
actionRPGOption.help = "standard play mode. preferable to those who like action role playing games.";
Please sign in to comment.
Something went wrong with that request. Please try again.