Jump to content
  • 0

How is Block intended to work?


Worldofjimmy
 Share

Question

3 answers to this question

Recommended Posts

  • 0
1 hour ago, Worldofjimmy said:

As the title, what is the Block function supposed to do? I don't really see any kind of Blocking happening? Just like freezing the walking animation :o

 

The map attribute 'Block' prevents movement on that tile.

The 'Shield' function for a spell attribute reduces damage taken for the time allotted.

EDIT: Just realized you were referring to the block function for the action key. This reduces damage taken but slows movement and prevents attacking.

Link to comment
Share on other sites

  • 0

From my understanding it was intended for the player to use a shield to block projectiles/attacks using right click. I remember seeing screenshots of someone using this in the past they were blocking rocks thrown at them or something but when I last checked the code I didn't see blocking actually doing anything if I'm not mistaken. Maybe someone should open a pull request add some function for it if it is not already there. You can change the speed though with this ""BlockingSlow": 30," in the config file.

 

Ok it does look like some function is added it does only seem to run though if you have a shield equipped. Not sure exactly what it is calculating though. May be incomplete? Hopefully someone more familiar with it can help. Would be good to know what exactly it should be doing.

 

 public void TryBlock(bool blocking)
        {
            if (AttackTimer < Globals.Timing.Milliseconds)
            {
                if (blocking && !Blocking && AttackTimer < Globals.Timing.Milliseconds)
                {
                    Blocking = true;
                    PacketSender.SendEntityAttack(this, -1);
                }
                else if (!blocking && Blocking)
                {
                    Blocking = false;
                    AttackTimer = Globals.Timing.Milliseconds + CalculateAttackTime();
                    PacketSender.SendEntityAttack(this, 0);
                }

Link to comment
Share on other sites

 Share

×
×
  • Create New...