Jump to content

nani

Community Members
  • Posts

    778
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by nani

  1. With a quick lookup

    If ranged:

    /**
    * Take damage according to the entity's armor.
    * @param {Object} strengths - { "hack": number, "pierce": number, "crush": number } or something like that.
    * @param {number} multiplier - the damage multiplier.
    * Returns object of the form { "killed": false, "change": -12 }.
    */
    Armour.prototype.TakeDamage = function(strengths, multiplier = 1)
    {
        if (this.invulnerable)
            return { "killed": false, "change": 0 };
     
        // Adjust damage values based on armour; exponential armour: damage = attack * 0.9^armour
        var armourStrengths = this.GetArmourStrengths();
     
        // Total is sum of individual damages
        // Don't bother rounding, since HP is no longer integral.
        var total = 0;
        for (let type in strengths)
            total += strengths[type] * multiplier * Math.pow(0.9, armourStrengths[type] || 0);
     
        // Reduce health
        var cmpHealth = Engine.QueryInterface(this.entity, IID_Health);
        return cmpHealth.Reduce(total);
    };

    strengths[type] *multiplier *(0.9^armourStrengths)

    • Like 3
  2. 2 hours ago, wowgetoffyourcellphone said:

    Perhaps catapults could lose a little bit of health for every shot.

    How about catapults  each projectile costs 10 stone ?

    For bolts could be 10 wood 5 metal.

    *Having a starting 10(?) projectiles for each siege unit.

    • Like 4
  3. version 0.2.10

    Added:

    • Now works for host with different language (will auto-assign civ in the language the host has set).
    • Will also work with custom civs names (no vanilla civs) if most JavaScript code is compatible/unchanged.
    • Bug fix : start word won't set civ as "spartan". @thankforpie
    • ???
    • Profit.
  4. This bug exist because 0ad doesn't take into account the units momentum, light units should have more maneuverability and  heavy ones lower. Knowing that, I don't know any RTS that takes army or units momentum to the mechanics of the game, would look cool and also realistic but the implementation would be not straightforward.

     

     

    • Like 1
  5. On 10/3/2018 at 10:46 AM, Agora_0AD said:

    Hi guys, just wanted to announce that my series of videos on the 0 A.D. Champions Cup is finally finished. So we have a nice archive with all the matches of the championship in this playlist below. I remember that before starting my channel I searched for some videos of competitions of 0 A.D. and found none, so now I gladly leave this as a resource for the future players and the community as a whole.

    The spoken language is Portuguese, but there are English subtitles for all videos. The most important matches (final, semi-final, etc.) have commentary, but most videos don't (except in between matches, when I make a short summary of what happened in the previous match). Hope you all enjoy, thanks for all who watched and @PrincessChristmas for the great initiative!

    Great work, gameplay commentary is hard and tedious, greatly appreciated!

×
×
  • Create New...