Important 341 updates

Although the 341 borg was up and running, there are lots of fixes that need to be added. The game has changed quite a bit from 320 and each of those changes need some accommodating. Here are a few updates from the last couple of days:

  • Throwing Painful Objects needed an update to their dd and ds, as well as their range of attacks.
  • The accented characters (like the é in Sméagol) were causing a crash in borg_note().
  • Flasks needed to be sold to the general store.
  • In borg_play_step(), even poor diggers needed to be able to excavate rubble.
  • The Remove Curse spells were removed from the priest books. This necessitated a movement of the spell addresses throughout the code.
  • Level Feeling Messages were changed.
  • Teleport Other is now a bolt instead of a beam.
  • The Enchant spells needed default to the equipment screen instead of the inventory.
  • The quiver slots needed support for the MAX_STACK_SIZE.
  • Changes in the artifact lights needed some adaptation.
  • Slight change to how the borg will count up items that need to be sold.

You can download this working source code here.

Posted in Angband (Vanillia) | Tagged , , , , | Leave a comment

Began work on VBorg 341

With the help of David Barr, I now have a working copy of a Visual Studio solution for Angband 341.  I have updated the fairly successful 320 borg into 341.  I have been testing it out the past few days and correcting game errors along the way.  It might be a few weeks before the 341 is working great, but it is working and only make mistakes related to the game play changes (k’rushing items no longer works the same, inventory stack sizes limit set to 40 instead of 99).

  • Update to not destroy our torches or flasks which might leave us dark.  Its ok to crush them if we have a no_fuel light source.
  • Borg is now required to drop items to the floor instead of crushing them.  Because he tracks bad items dropped to the floor, he must not drop items while standing on a doorway or stair (since doing so will move the item to an adjacent grid).
  • Refueling of torches managed.
  • MAX_STACK_SIZE implemented for borg inventory.
  • I had to address a specific event which happens early in the game. The borg might have infravision,a torch, and see a monster a few grids away.  That monster might be in a unlit region of the dungeon.  The borg only sees the monster because of the infravision. The lower half of the LOS() routine would return a FALSE in this case because the grids 2 or 3 spaces away from the borg are not lit by the torch nor dungeon illuminated.  If the game is allowing the borg to see the monster, then it must be LOS().
  • Illuminating room prior to resting acting goofy.  He not reading the illuminated grids correctly.
  • Crushing items needed to be switched to d’ropping them since the game no long has a k’rush command.  This poses a problem when the borg wants to crush a single item (like 1 arrow in a stack of 35).  The k command will squelch the entire stack, but dropping 1 arrows litters the dungeon floor.
  • Couple of changes to how the borg will use his has_effect and activate_effect command.
    • Some items need to be ID’d before he is allowed to know what they do.
    •   make sure item is ID’d or aware
    •   update the EFF_<list>
    •   <to do>make sure the heal1,2,3 are all used.
    •   <to do>Review that all EFF_s are used, including Restore_Item

341borg source code

Posted in Angband (Vanillia) | Tagged | Leave a comment

June Updates for Vborg

Yep, the Vborg has some updates.  I thought I would work on it since it has been so long.  I did not make any progress on the 340 or 330 borgs so I worked on the 320 borg.  There is a long list of improvements for this month.  Many improvements are around the endgame.  I watched him closely and tweaked his algorithms a bit.  That borg even won the game.

  • Rogues will not crush their Phase Door scrolls (same as warriors)
  • The weight of the swap items is considered in its valuation.  Heavy ones are penalized.
  • The minimal threshold for quality of the swap was boosted to 5000 points.
  • Only spell casters with at least 50 mana will be concerned with holding Restore Mana potions in the inventory.
  • The reward for using carrying the deep dungeon spellbooks will now consider the clevel and mana requirements.  It is not a good idea for a rogue to carry Raal’s around when the mana requirements are so far over the rogue mana level.
  • +5 speed requirement for depth 46 is met is the borg has +speed effect.
  • Warriors will not crush Wand of Stone to Mud since they can be handy when fighting summoners.
  • Added improved monster flow routines.  Instead of borrowing the borg’s flow (and rule set), the monsters have their own.
  • Added demons and dragons to a list of special types of monsters for which the borg will track the swap-weapon damage.  If the damage is higher and the danger is close to the same, then the borg will swap in the weapon in order to do higher damage.
  • Borg will have decreased fear of sleeping monsters when higher level.
  • Removed the AC-based reduction in the danger of RBE_SHATTER, the monster attack method which causes earthquakes.
  • If super rich, items have a decreased value and he won’t chase down certain takes.
  • Before leaving the stairs to chase down an item in munchkin mode, he will rest to regain any lost HP/SP
  • If the borg needs to power climb due to a restock issue, and he does not have recall, he will use the munchkin mode to climb up.
  • If in munchkin mode and off the stair, the borg might try to fight his way back to the stair.  He needed to do a check on the neighboring grids to make sure he was not surrounded by monsters.  Fighting one monster is OK, but 2 or 3 is not a good idea if he is in munchkin mode.
  • Borgs in munchkin mode will be a lot more careful about leaving the stair to chase down loot if monsters are detected on the level.  Too many monsters are waking up and attacking the borg when he leaves the stairs.  The borg will add up the danger of the known monsters, and flee the level if their total danger is greater then his HP.
  • Recharge scrolls will be carried by munchkin starters if they carry a wand of MM or Stinking Cloud.
  • Wands won’t be used to attack town monsters until clevel 15.
  • Recharge function did not recharge wands. Now, it will do certain wands. It will also recharge items with are unID’d and “{empty}”. Doing so helps low level borgs survive because they need wands of MM.
  • Borg will not be allowed to sell his last wand of MM (even if it is empty), until clevel 20 or so.
  • Munchkin Mode will be allowed to use borg_crush_hole(). This will allow him to upgrade the items he is selling. We would not want the borg to pass up a wand of MM lying on the floor because he failed to crush a Slime Mold.
  • When determining the value loss of a crushed item, the borg was not figuring the value of a whole stack. When he crushes an item, he crushes the whole stack so the value needed to consider the total value of the stack.
  • The borg will now estimate which items were dropped from a unique or questor monster. He has not yet learned how to apply that to his inventory. So for now, he just knows that an item on the ground might be better than average.
  • In munchkin mode, the borg will wait until he returns to the stairs before doing certain mid-level functions, like resting to recover, ID’ing, crushing, etc.
  • In munchking mode, the borg will only pick up items which are found on depths with are at least maxclevel – 10. This will keep him from filling up with leather gloves from depth 1 when he is clevel 15.
  • The borg will be rewarded slightly higher if he uses a sleep attack or a slow attack on monsters if the borg is in a hallway. This will allow him to setup a strategic retreat.
  • I started the first stage of doing more accurate monster flow patterns. This can be helpful in planning escapes and knowning if a monster can actually get to the borg. Think of a line of orcs in a hallway and the closest one is asleep. The orcs stacked up behind are not a threat to the borg.
  • Borgs can recharge wands while in munchkin mode.
  • Borg_projectable_pure() was not returning the proper danger on some bolt damage calculations.  The bolts were believed to stop at the monster casting the bolt.  It should have been ‘stop at another monster.’  This is a bug fix.  It was never a problem until the borg began to estimate damage of bolts cast from other monsters.
  • Borgs in munchkin mode have had a ratio of depth to value, meaning they won’t pick up items in the shallow depths, if they like to bounce at deeper depths.  This keeps them from filling up on lame gear at depth 1.  But is also means that the borg will not pick up torches/lanterns/food– even if needed.  I added a check to have him pick up these items if he is low on them regardless of the item depth.
  • Borgs will not crush items of any value if in town or in munchkin mode.
  • The borg might not flow to an object correctly if the goal_less was set and he was standing on a stair.  If he happened to set his goal_less flag and crossed over a stair, on the way some place, he would take the stairs.  The was very evident in the borg in munchkin-mode.  He would only leave the stair to fetch items if he was standing on a down-stair.
  • The borg will be minimally penalized for choosing to flow through walls.  This will allow him to flow through the walls if he needs to, but will also encourage him to select the floor grids when the distance is about the same.
  • The borg was not enchanting his gear or swap if it had an extreme native negative to_hit or to_dam.  (like Calris)
  • He might also crush enchant scrolls when he ought to keep them.  He only enchants items in town, so he tended to crush the scrolls before he got to town.
  • The penalty of being cursed with aggravation was reduced to only 8000.  Which can help the borg with certain ‘lie in wait’ routines.
  • Borg will buy enchant scrolls for his swap item.
  • Borg needed an update to the money_scum shopping.  He was missing some of the purchases and calling an early end to his shopping trip.
  • In borg_caution() the borg will make strategic retreats.  But he was retreating when the danger was only 2% improvement, not worth the effort.  I added a 20% danger improvement threshold.
  • The borg will grant his current weapon a special tag so that he does not dump it after swapping in the backup.
  • Slight rework on how the borg will use his healing.  He has been calculating his percent HP loss since the new spells heal a percent of the HP.  He will also now consider the HP loss as part of that equation.
  • The priest spell of Banish Evil was not being called if the danger was < 90% of the borgs HP.  That level is too high.  Lowered it to about 70%.  This will make him more likely to use the spell.  But there are still some checks to make sure he does not use it on wounded uniques.
  • It was possible for the borg to not look in the #8 or #9 keyboard direction for a monster when swapping his gear.
  • Warriors and Paladins will be giving a 20% boost to the meleee damage score. This will enccourage them to conserve their spells for ranged attacks and healing.
  • The spell Orb of Draining had been given a boost in damage for uniques, but it needed to be evil uniques.
  • When the borg considers using Banishment against uniques, he is not rewarded for uniques that are injured.  But sometimes he would use the spell anyways because there was some benefit.  I added a penalty if an injured unique was booted.
  • The borg might engage his munchkin mode when deep in the dungeon in order to safely power climb to a comfortable depth.  There was a chance that he might forego his borg_caution() routine which would leave him vulnerable.  I had the borg leave the munchkin mode if there are any monsters near by.  This will allow him to act normally, and safely while looking for stairs.
  • The borg will try to hold on to artifact items while in the dungeon.  He will just hold on to them for a few extra rounds.  It will give him a better chance to evaluate them and see if they should be swapped into his equipment.
  • Borg will hold onto a couple of Rods of Light in order to use them later in the game.
  • Borg will attempt to illuminate wall grids which have possibly been excavated by tunneling monsters.  This will allow him to fire on the monsters sooner.
  • Began scaling back all the borg_equips_xxx() routines and moving to a single borg_has_effect().  This will clean the code up and make it easier on inventory management.
  • Added the use of monster flow checks into the function borg_check_rest().  Previously, he would check for distance between himself and a dangerous monster.  If that distance was less than 4 grids, the borg would get worried.  But the situation might present as a borg and monster on opposite sides of a long wall.  In which case, the monster could not get to the borg.  So he will now check how many steps it takes for the monster to reach him.  The result of this will allow him to rest to recharge his SP/HP more intelligently.
  • Borg will collect more Rods of Healing (he used to stop at 3).
  • In borg_heal(), the borg likes to conserve his potions from depth 98 onward.  We will allow him to stay in the fight if he has lots of rods of healing.
  • The borg must have a speed of +15 to dive deeper than depth 80.  But sometimes at depth 99, after he has collected his hoard of potions, he might be overweight.  Then he will not want to dive to 99 to fight Sauron.  So the +15 speed requirement is lifted if the borg’s max depth is >=99.
  • A long time ago, I added some equipment checks to make sure the borg would not swap out a +STR item if he was encumbered.  Doing this helped to reduce some equipment swaps.  But in doing so, it also reduced the borg’s ability to trade out a +STR ring for Rings of Speed.  I corrected that so he will be allowed to trade in a Ring of Speed.
  • In trying to reduce the weight and encumbrance issues, the borg will not carry more than 2 copies of spell books.  He has some escape checks if one copy gets burned.
  • Borg has not crushed items due to being encumbered unless his speed was under 110.  That is great for shallow depths.  But deeper, that speed should be increased.  I added a speed 130 check for depths >= 85.
  • White Dragonscale Armor was being over-valued as a swap item because it’s activation is cold_ball100, same as Ringil.  The borg is given a bonus for Ringil, so I made sure that no artifact activation bonus is given to tv_drag_amour.
  • Changes to how the borg handles the borg_morgoth_position.  Since it is no longer advantageous to cast a full sea of runes, he needed to perform a lie-in-wait check with a smaller radius (8 vs 24 grids)
  • The check for borg_fighting_<type of monster> needed to have a pass_wall and kill_wall check.
  • Modified the way the borg is calculating damage from a blast radius in borg_launch_bolt_aux().  He will use a borg_offset_projectable() which will assume that all unknown grids are floors.  This will encourage him to use the offset attacks.
  • In borg_attack(), there was a check to make sure the borg was not shooting through walls at a creature.  This check interfered with the borg doing any offset-ball attacks if the monster was behind a known wall and adjacent to an unknown grid (which could be targeted).
  • in borg_launch_bolt(), the borg was not allowed to target an unknown grid when using offset attacks.  He should he allowed to do so.  The projection path routines will take care of any wall grids in the pathway.
  • Slight rework on the healing during questor combat.  I wanted to focus on using the rods and appropriate spells based on hp loss before getting gorged on drinking too many potions.
  • Increased the number or Restore Mana potions the borg will need for the endgame battle.
  • The borg might crush good equipment if his inventory is full.  I watched him crush a ring of speed +11 instead of replacing his +8.  I told the borg not to crush_junk() RoS which have a pval >= 0.
  • The borg has two Tport Other defence routines.  One is used just for normal functions and that one needed to be modified during questor combat.  We don’t want him using it if he has a chance to use an offset ball attack on Morgoth.
  • Leave a level if Morgoth and a vault appear together.  Morgoth might get stuck in a vault and it causes the borg to consume potion resources excessively.  Morgoth might be teleported into the vault where he can rest and heal while the borg waits for him.  Meantime, the borg consumed lots of potions and resources trying to kill Morgoth.
  • Slight rework on how the borg will restore his mana while fighting Morgoth.  We don’t want him drinking them too quickly so I have him wait until his mana is under 40 points.  The old number was closer to 70.
  • To conserve mana during the endfight, the borg will not use offset attacks on creatures while in the borg_morgoth_postion.  He will just end up using Teleport Other on them as soon as they become LOS.  So casting offset ball attacks is a total waste of mana.
Posted in Angband (Vanillia) | Tagged , , , , , | Leave a comment

May Updates for Zborg

  • borg_wear_stuff(): Borg was correctly swapping for a backup but the next round he would return to his old armor.  I added a brief delay to keep him from looping.
  • borg_update_map() when old_wall != new_wall: While tunneling, the borg was overwriting cost of borg_data_flow->data[y][x] when he discovered a new wall grid.  This effectively caused him to cease his tunneling and forced him to create a new overlapping tunnel.  This bug might also be in the vanilla borg.
  • borg_defend_aux_glyph():  Borg needed to be able to cast a glyph if sitting in an A-S corridor, waiting for a monster.  The borg_defend_aux_rest() was returning a 200 point value, so the glyph needed to be higher than that.
  • borg_update_map(): the borg was looping on glyph creating when the ‘object resists the spell,’ and the object was an item.  This was, in part, due to the borg stealing his grid info from the game (if he were not blind).  So the FEAT_BROKEN was bring overwritten by the actual grid FEAT.  The FEAT_BROKEN was allowed to persist.
  • borg_perma_aux_glyph(): borg was casting glyphs in normal corridors.  This routine is specific for A-S corridors, so I added a goal check to make sure GOAL_DIGGING was active.
  • borg_defend_aux_rest(): if the borg had been sitting on the level for a while, and he was in the proper A-S corridor, he might bug out of the corridor.  Fixed that.
  • Borg found the sword ‘Twightlight’ and kept trying to decurse it.  It has the TY_CURSE so it can’t be decursed.
  • The borg knows how to use the town shops to enchant his gear.  He will now use those shops to enchant his swap items as well.  The current gear has priority over his swap items.
  • The borg was not recognizing the artifact flags for the randart items.
  • I try not to change the settings for the actual game, just the borg.  But I found that a character with Wraithform can be crushed by an earthquake.  That should not be so.  I corrected that game bug.
  • Had to fix a game crash bug where the game was calling an out of bounds grid during update_view().  I added a bounds check.
  • I added better support for the borg recognizing items dropped by a quest monster.  He will treat them as better items and try to ID them promptly and not crush them until they are ID’d.

 

Posted in Zangband 240 | Tagged , | 4 Comments

April Updates for Zborg

More improvements for Life Realm and PASS_WALLing borg.

  • In borg_think(), the borg needed to do his borg_notice() before borg_update() because some of his my_stat_ind[] were not being loaded on time.  This would have him believe that he had no spells available as well as other problems with his attributes.  This was only a problem on his very first pass through borg_think() and only showed up if there was a monster on-screen.  Imagine a screen-saver initiating with a monster on-screen.  The borg would not have proper knowledge of his attributes that first round.
  • I needed to add the borg_notice() and borg_hidden() to the begining of borg_think() as well as at the end because some of the variables looked at during borg_think() were not populated yet.  In particular, borg_cheat_spell() uses some of the borg_skill[], but those are empty when borg_cheat_spell() is called.
  • I added a structure member called ‘avoid’ to the structure borg_kills[]. This will tell the borg to avoid flowing to this monster.  It is a hard to kill monster (borg lacks strong attacks against it) and he should not pick a fight with this guy.  I also added ‘cautious’ which means the monster is hard to kill and it will take at least 7 rounds to kill it.
  • Borg_flow_kill_corridor_2() needed a fix.  It was looking at the wrong monster.  It was using monster ‘i’ instead of ‘borg_kills_summoner’.  ooops.
  • I needed to add a monster flow version of borg_data_hard in order to help the borg understand monster flow patterns better.  He was believing the monsters could not flow on a grid unless the grid was a known grid.
  • borg_flow_spread_m() needed a rework.  Additionally it had some variable naming problems, like ‘i’ being used in a loop, when it was previously assigned to be the monster id#.  Some monsters can move through doors.
  • borg_flow_commit_m() needed a correction. It was looking at cost of flowing to the wrong grid and needed to look at the 0 vs 255 cost differently.
  • Reduced the danger from bolts to zero when the borg has Reflection flag.
  • Reduced the amount of time the borg would rest on a grid waiting for a monster to approach.  He would wait for up to 350 turns, that was dropped to 75.
  • Passwalling borgs might try to cast Glyph while in the walls.
  • The flow for anti-summon corridors (type 2) was using goal type GOAL_KILL when GOAL_DIGGING is a better fit.  There is better handling of GOAL_DIGGING in borg_play_step().
  • The type 2 anti-summon corridor will be used only on never_move monsters.
    A passwalling borg might get twitchy if he was dark-exploring and was parked on a closed stair.
  • The game message “You tunnel into the granite wall” was causing the tunneling borg to reset his goals.  This is not a good idea since he was tunneling to begin with.  The message is helpful to keep the borg from looping.  But I added a check to not reset the goal if goal == GOAL_DIGGING.  The negative effect of this bug was that the borg was not completing his anti-summon corridors.
  • The ‘sneak’ used in borg_flow_committ() should not look at the borgs own grid; he is leaving that grid.
  • Updated borg_flow_old() so that he is penalized for trying to flow through a monster.
    Borg_play_step() needed a bounds check on the section that deals with orbing the loot on the floor.
  • Borg_defend_aux_rest() was improved by incorporating the improved borg_flow code.
    I taught the borg to flow to an ‘unreachable’ grid.  The borg will select a grid which is safe from melee combat but also affords the borg a good ranged attack position.  For example, he will flow to deep water, to keep land-lubbers from attacking him.
  • The borg needed to know the extra terrains could not hold a glyph of warding.
  • The borg will now be allowed to shoot spells into walls to attack PASS_WALL guys.  Previously, all ranged attacks were forbidden if the PASS_WALL was sitting in the wall.  The game will allow a spell to hit the monster but not a thrown/fired ammo.
  • Borg should not attempt to flee a battle in order to flow to a recovery grid.  There is a check in place now to make sure there are no adjacent monsters.
  • Borg was bouncing on grids trying to get to a take.  He thought his pet was on the take and he could not flow through his pet. Pets had been exempted from the I-haven’t-seen-you-in-a-while expiration.  But they will be added back in.
  • Also in borg_flow_old() the borg will be allowed to flow through his pets/friendlies.

 

 

Posted in Zangband 240 | Tagged , , , , , | Leave a comment

March updates for Zborg

  • Borg will not attempt to flow to a recover grid if a tunneling monster is too close.  They tend to follow him.
  • If flowing to a stair, the borg will consider the ‘breeder_level’ as much as ‘unique_on_level’.   This will help him to escape the breeder levels a little better.
  • Increased the danger for Blindness, and Confusion attacks against the borg.
  • The attack method, Resting for monster, needed a fix.  He might rest for a monster when another was too close.
  • The radius of the Life spell Call Light needed a fix.
  • The borg was not reading the enchant scrolls if an item was at +8. He needes to do so up to +9.
  • Due to the limited range of vision over water, the borg needed to better use the fear_regional[y][x] in order to calculate danger due to monsters.
  • The danger applied from spells in fear_regional[y][x] will be doubled.  This is danger from an unseen monster who is casting spells at the borg.
  • Borg_projectable_pure() was not returning the proper danger on some bolt damage calculations.  The bolts were believed to stop at the monster casting the bolt.  It should have been ‘stop at another monster.’  This is a bug fix.
  • Borg will be careful to not cast Orb of Draining on objects (which he does to destroy cursed items in the stack) if a vulnerable pet is in the blast radius.
  • If the borg had been sitting on the level for a while, he would delete the list of monsters.  This might happen if monsters were nearby.   That action could allow the borg to not calculate danger correctly (since all the monsters get deleted).
  • The defense spell Day of the Dove was a little over generous is predicting its protection value.
  • Needed some help pushing past my pets in a hallway.  There was a problem if the borg was passwalling through a closed door and tried to swap positions with a pet.
  • Borg_activate_item() was returning false if the item was recharging.  It should be set to ‘continue’ since the borg might have two items and the first one might be recharging.  Think of two Rings of Flames.
  • The borg will not passwall through a door if a monster is on the opposite side and adjacent to the door.  He will open the door instead.  That allows the monster to come to him.
Posted in Zangband 240 | Tagged , , , | Leave a comment

February Updates for Zborg

This month, I began to implement some support for the passwall ability.  It is part of some spells but also innate for spectres.  It might take a while to hammer out all the benefits for the ability.  So far, it seems to work better as a method of escape.  There is a lot of damage taken by hiding in wall grids.

  • Improvement to how the borg will look at strategically backing up.  Specifically, he will consider the speed differential between himself and threatening monsters as he backs up.
  • Corrected an error which made Fruit Bats always trigger the scary_guy flag, regardless of the borg’s clevel.
  • Certain attack spells were not being cast because their mana cost was greater than the damage done.  Which is not a huge problem except if you are a Life High Mage and have only one attack spell.
  • When considering a strategic retreat, the borg will skip it, if it might be a better idea to use a sleep spell on a monster.  This is called from borg_caution() which is before borg_attack().
  • Borg_projectable_pure() needed to consider the passwall skill of the borg.
  • A spectre borg in danger will consider backing into a wall to hide and wait for a recall.  He will use recall if sitting in the walls.
  • Borg_flow_recover() should have the ‘sneak’ flag set in order to avoid grids near monsters.
  • If in a hallway and down on HP, the borg will try to use Sleep spells as a defence maneuver.
Posted in Zangband 240 | Tagged , , | Leave a comment

January Updates for Zborg

  • Borgs in munchkin mode needed to use the borg_eat_food_any() function.
  • Non-food-eating borgs needed to finish the borg_eat_food_any() function, they were failing out before the potions (which do provide some nourishment points).
  • If a borg was in the middle of a town move and became twitchy, he would forget about being in the move, then loop in the forest. As part of the twitch, he would forget all his acquired knowledge of the level, thus forcing him to relearn everything— breaking the twitch. Forgetting that he was in a move can be fatal, so it was corrected by not allowing him to reset all his knowledge if he was in a move.
  • Added a new borg_skill[] variable called BI_NOEAT which will replace all the calls to borg_race() for the races which do not eat regular food.
    Added a new borg_skill[] variable called BI_VAMPIRE which will help clean-up the code related to the blood-sucker race and mutation.
  • The Domination spell won’t be given any points if the monster is already affected.
    Since the borg wont enchant items that are not ID’d, I told him not to buy enchant scrolls for an item that’s unID’d
  • Improvements to how the borg will calculate the need to illuminate the dungeon rooms. Including a bugfix in borg8.c
  • “growls angrily” needed to be added as a pain response.
    Some help to the borg fighting under boosted_bravery and when fighting in a stressed munchkin mode.
  • The borg was missing a few of the pain messages monsters make. This lead him to believe that some attack pathways were not effective.
  • Borg won’t flow_kill in town unless clevel 15 or a hungry vampire.
  • Just started to implement the Spectre’s passwall ability. He currently knows that he can flow through walls if he is fleeing a level. He can also flow though rubble and doors.
  • Munchkin starters will not carry the Phase Door scroll until a bit later.
    Recharge scrolls will be carried by munchkin starters if they carry a wand of MM or Stinking Cloud.
  • Recharge function did not recharge wands. Now, it will do certain wands. It will also recharge items with are unID’d and “{empty}”. Doing so helps low level borgs survive because they need wands of MM.
  • Wands won’t be used to attack town monsters until clevel 15.
  • For spectres, doors are not considered “interesting” for purposes of dungeon exploration if he has already walked through it.
  • Since spectres are allowed to flow through rock, even rock right next to a open floor grid, there is a modest flow penalty for choosing the rock. The penalty should keep him choosing open floor over rock if the distance cost is the same.
  • The borg will no longer save the game when he dies. This will help with debugging since I can have the borg replay the steps which lead to the buggy behavior.
  • The borg uses a variable-length leash to stay close to stairs when exploring the dungeon. That leash has just been shorted for certain race/class combos. The leash had been clevel*3+9. It will be clevel*1+9 for weak combos.
  • Borg will not be allowed to sell his last wand of MM (even if it is empty), until clevel 20 or so.
  • If the borg is escaping the dungeon and (1)has nothing of value to sell, (2)has enough food, then he won’t risk exploring town. Instead he will just re-enter the dungeon.
  • When in munchkin mode, the borg will be allowed to perform some immediate selling — as opposed to having to visit all shops before selling.
  • The enchant to hit and enchant to dam scrolls will not be purchased by low level high mages. The do not use their weapons much and their money is better spent elsewhere.
  • The borg will not purchase weapons that have an enchantment until he is at least level 35 if he is a primary spell caster.
  • Munchkin Mode will be allowed to use borg_crush_hole(). This will allow him to upgrade the items he is selling. We would not want the borg to pass up a wand of MM lying on the floor because he failed to crush a Slime Mold.
  • When determining the value loss of a crushed item, the borg was not figuring the value of a whole stack. When he crushes an item, he crushes the whole stack so the value needed to consider the total value of the stack.
  • While using the passwall ability, the borg will not attempt to flow to a recovery grid to heal the damage induced by passwalling.
  • While using passwall, the borg will attempt to use a heal spell to repair some of the passwall damage. He will try to heal just before he exits the walls.
  • The borg will now estimate which items were dropped from a unique or questor monster. He has not yet learned how to apply that to his inventory. So for now, he just knows that an item on the ground might be better than average.
  • In munchkin mode, the borg will wait until he returns to the stairs before doing certain mid-level functions, like resting to recover, ID’ing, crushing, etc.
  • In munchking mode, the borg will only pick up items which are found on depths with are at least maxclevel – 10. This will keep him from filling up with leather gloves from depth 1 when he is clevel 15.
  • Borg_projectable() needed to be modified to allow for a passwall borg sitting in a wall or door grid.
  • Rubble is not considered ‘interesting’ if the borg has passwall.
  • Passwalling will be limited to borgs with ESP. It is far too dangerous to run through walls without knowing where the monsters are.
  • Passwalling can lead to the borg sitting in a wall while fighting a monster on a floor grid. This will lead to the borg taking damage from the walls. Now the borg will sacrifice his attack and step out of the wall to fight on floor grids.
  • The borg will not perform certain low-reward defense maneuvers in sitting in a wall grid.
  • If the borg recalls down to dungeon, then engages the munchkin mode, he will behave normally (and sanely) until a stair is located, then he might make decisions which could lead to an early death. He skips borg_caution(), for borg_think_dungeon_munchkin(). I set a rule so that if the stair is further than 18 grids, he will exit munchkin mode and stay with the safe mode until he gets closer to the stair.
  • The defense spell of Bless won’t be used if the borg is high mage, mage, or mindcrafter.
  • The borg will no longer add the fear_region[][] to the total fear of a grid when considering the danger of a grid for purposes of determing a Phase Door escape. The regional fear is fear of an area based on an invisible monster. Since the phase will still keep him in the same region, there is no benefit for using the fear_region[][].
  • The borg likes to collect attack rods, but he won’t carry too many if his strength is low.
  • The borg was not keeping correct track of his last several steps. The borg does remember his last 75 steps, and he uses that information for calculating several things.
  • Sometimes the game will not allow the player to switch places with a pet. The borg is careful to not step into a grid with a pet and mistakenly attack it. Accommodations needed to be added to play_step() to make sure the borg does not loop if the pets won’t move out of the way.
  • More efficient use of the town enchanting shops. Borg will loop inside the shop until he gets all the enchanting done,  instead of only enchanting 1 point then leaving.  Which is what he was doing before.
  • The borg will be rewarded slightly higher if he uses a sleep attack or a slow attack on monsters if the borg is in a hallway. This will allow him to setup a strategic retreat.
  • I started the first stage of doing more accurate monster flow patterns. This can be helpful in planning escapes and knowning if a monster can actually get to the borg. Think of a line of orcs in a hallway and the closest one is asleep. The ones stacked up behind are not a threat to the borg.
Posted in Zangband 240 | Tagged , , , , , , , | Leave a comment

December Updates for Zborg

  • If illuminating a hallway near the edge of a panel, the borg might loop zapping the rod of light.  He will now make sure the grid 2 grids outside the light radius is on the panel.
  • The borg will sometimes wait on a grid for a monster to approach.  One of those steps was upgraded to check for flow_depth to see if the monster _could_ approach.
  • Borg will not excavate mineral veins if he has more than $100,000 in-pocket.
  • Borg will attempt to use Dimension Door to navigate the dungeon instead of walking everywhere.  There are some restrictions to make sure it is worth the mana cost.
  • The time place holder, track_land_when[], was incorrectly set at a byte instead of s16b. It was not keeping the correct time and that left some problems with the tracking  of bad Dim Door landing grids.
  • The function to jump into a pit needed to ignore the friendlies, otherwise he would bounce in the Ent pit.
  • When the borg tries to estimate the monster’s flow movements, he needed to exclude the NEVER_MOVE ones.  Also when he was waiting for monsters to approach, he needed to exclude the NEVER_MOVE, pets, and friendlies.
    Immediate shopping for food,located in think_shop_buy_aux(), needed a correction for the races which do not eat food.
  • If the immediate shopping fails (as in the shop not selling food/?SH), then the goal_shop needed to be reset to -1 at the end of borg_think_shop_buy_aux().
  • A starving vampire in town needed some special handling in order to hunt the townspeople as food.  This included limiting ranged attacks, using DimDoor to jump onto townspeople, and flowing to them.
  • I have not played the other non-food-eating races much so I’m not sure how much special handling they need.
  • Blind Mindcrafters thought they could not cast spells.
  • Low Level spell casters are more likely to rest on stairs to gain mana. And a correction to borg_recover() for munchkin borgs resting on stairs.  When checking to make sure he was standing on a stair before resting, he was mistakenly checking only for up-stairs.
  • Phantom Warriors will be considered scaryguys until clevel 25.  There concern is the pass-wall and they appear in groups.
Posted in Zangband 240 | Tagged , , , , , | Leave a comment

November Updates

  • Upgrade to how the borg will fear regional.  He was not adding fear to icky grids.  It was supposed to be vault grids, but it inadvertently included lava and water grids.  That needed to be repaired.
  • When the borg has >$200,000, items have decreased value.  That way he won’t fill up with junk to sell in town.  The money means nothing to him at that point.
  • Borg was resting too much, waiting for monsters, while in a vault.  The monsters might not be able to get to him since the FEAT_INNER_PERMA would hinder their movement.  He would wait ad nosium for a monster which could not approach.
  • Some improvements to how the borg will wait for monsters to approach him (skipping sleeping ones, skipping ones in vaults)
  • Vampire borgs over clevel 20 will not need to carry ?SatifyHunger unless hungry
  • Borgs who are digging will not ‘walk into’ a monster.
  • Borgs were valuing certain items to not crush them, but at deep depths, even the boost in value was allowing the borg to crush items which should not be crushed.  I had him entirely skip certain items from the crush-consideration.
  • *Enchant* scrolls will carried if there is a specific need.
  • The borg will generally avoid waking sleeping monsters but not if he is clevel 50
  • Floor grids, which are not already defined, and which contain an object will be considered FEAT_FLOOR.
  • Sometimes the borg will sell ?teleport, even when he ought to hold onto them.  Corrected that.
  • The borg needed to fear RBE_SHATTER more.  The earthquakes can be devastating.
  • No flow_take() if a monster is near a low level borg.
  • borg_flow_old() will now fail if a monster is adjacent to a low level borg if it is in munchkin_mode.
  • I had to add the White Horse Inn proprietor as a bad shop for the borg.  He needs to recognize that he is in a bad shop and how to exit it.
  • Before leaving the stairs to chase down an item in munchkin mode, he will rest to regain any lost HP/SP
  • Searching while walking will be disengaged if a scaryguy is on the level.  This will allow the borg to exit the stairs sooner.
  • Mindcrafter borgs were not using there Major Displacement to break being twitchy.  Other forms of teleport were being considered, but the Major Displacement was omitted.
  • If the borg needs to power climb due to a restock issue, and he does not have recall, he will use the munchkin mode to climb up.
  • If in munchkin mode and off the stair, the borg might try to fight his way back to the stair.  He needed to do a check on the neighboring grids to make sure he was not surrounded by monsters.  Fighting one monster is OK, but 2 or 3 is not a good idea if he is in munchkin mode.
  • Borgs in munchkin mode will be a lot more careful about leaving the stair to chase down loot if monsters are detected on the level.  Too many monsters are waking up and attacking the borg when he leaves the stairs.  The borg will add up the danger of the known monsters, and flee the level if their total danger is greater then his HP.

 

Posted in Zangband 240 | Tagged , , | 2 Comments