ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Sat Dec 07, 2019 12:09 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Oct 25, 2019 6:50 pm 
Offline
Higher

Joined: Wed Jun 06, 2018 10:53 am
Posts: 61
Auto-use can extend duration of resource-draining sustains.

Short description.

Auto-use feature can be used to prevent resource-draining sustains from turning off when a resource reaches 0.

Actual result.

Resource-draining sustain does not deactivate when a resource reaches 0.

Expected result.

Resource-draining sustain deactivates when a resource reaches 0.

Steps to reproduce.

1. Start a new game in Developer Mode and create a Mindslayer character.
2. Use a console to get levels (game.player:forceLevelup(50)) and select Forcefield talent on Levelup screen.
3. Set life regeneration to 100 (game.player.life_regen = 100).
4. Gather 3 or more enemies. Move to a tile with at least 3 enemies standing on adjacent tiles.
5. Right click on Forcefield talent and select "Request confirmation before using this talent".
6. Right click on Forcefield talent and select "Auto-use when enemies are visible and adjacent". Confirm your selection.
7. Skip a turn.
8. Confirm 3 "Talent Use Confirmation" dialogs. Cancel the rest if there are more then 3 dialogs.

Game version.

1.5.10 for windows from ToME site.

Comment.

The number of "Talent Use Confirmation" dialogs seems to be the same as the number of adjacent enemies.
/mod/class/Player.lua => function _M:automaticTalents() (line 891) => for loop (line 914) => if statement (line 915).
If I understand the code correctly, it executes the code for every adjacent enemy.
I guess that exiting the loop when condition becomes True should prevent many dialogs situation.
Code:
for fid, foe in pairs(spotted) do
   if foe.x >= self.x-1 and foe.x <= self.x+1 and foe.y >= self.y-1 and foe.y <= self.y+1 then
      uses[#uses+1] = {name=t.name, turns_used=turns_used, cd=cd, fct=function() self:useTalent(tid) end}
        break
   end
end


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group