Jump to content

the Special effects of the new Three hat in beta


Recommended Posts

there is three kind of hat that newly added in the game and i dont see one post their effects (wish i'm right).

the first one is called Pirate's Bandana whose prefab.name is called monkey_smallhat. and in the file hat.lua, it states in line 1940:

    local function monkey_small_equip(inst,owner)
        _onequip(inst, owner)
        owner:AddTag("master_crewman")
    end

    local function monkey_small_unequip(inst,owner)
        _onunequip(inst, owner)
        owner:RemoveTag("master_crewman")
    end

the character who dress in the Pirate's Bandana could get a tag "master_crewman" which states in anchor.lua that:

function Anchor:AddAnchorRaiser(doer)
    if self.inst:HasTag("burnt") then
        return false
    end

    if not self.is_anchor_transitioning then
        self.inst:AddTag("anchor_transitioning")
        self.is_anchor_transitioning = true
    end
    self.inst:PushEvent("raising_anchor")
    self.rasing = true
    if not self.raisers[doer] then
        self.numberofraisers = self.numberofraisers +1
    end

    self.raisers[doer] = (doer.components.expertsailor ~= nil and doer.components.expertsailor:GetAnchorRaisingSpeed() or 1) * ( doer:HasTag("master_crewman") and 2 or 1)	-- raise units/second

    self.currentraiseunits = self.currentraiseunits + self.raisers[doer]
    return true
end

 

that means if one in the Pirate's Bandana. he could just shorten the time of raising the anchor to half like this test video shows:

 

likewise, the Captain's Tricorn would give the player a tag "boat_health_buffer" in the line 1977 of the file named hats.lua

the tag was used to reduce the damage of boat when it crash on an obstacle, which states in the line 131 to line 201 in the file hullhealth.lua

 

and the effects of Polly Roger's Hat is easiest to see, which produce a parrot to gather items for players.

 

so, the results are:

the Pirate's Bandana shorten the time of raising the anchors to half.

the Captain's Tricorn reduce the damage of boat suffered from a crash on the obstacle.

the Polly Roger's produce a parrot to pick up items.

8 hours ago, dish-order man said:

the Captain's Tricorn reduce the damage of boat suffered from a crash on the obstacle.

2 questions;

1. How much reduction?
2. Does the captain’s tricorn hat also reduce damage that bumpers receive?

Thanks.

For the tricorn, is it when it crash or when it take damage ? I want to know if it can be usefull against Crab King or maybe Malbatross or whatever.

Edit: It seem to be on colision but it also reduce damage you take when you're leaking or for the grass boat (if I understood correctly)

Spoiler

function HullHealth:GetDamageMult(cat)
	-- This is a function to collect things that will protect the boat from various effects
	-- cat "degradedamage" sets teh multiplier on the time it takes to take a point of damage.
	-- cat "collide" sets mulitplier on colission damage
	local mult = 1

	-- look for the pirate hat
	if ents and #ents > 0 then
		for i,ent in ipairs(ents)do
			if ent:GetCurrentPlatform() and ent:GetCurrentPlatform() == self.inst then
				if ent:HasTag("boat_health_buffer") then
					print("found defence")
					if cat == "degradedamage" then
						mult = 2
						break
					elseif cat == "collide" then
						mult = 0.5
						break
					end
				end
			end
		end
	end
	return mult
end

 

 

8 hours ago, goatt said:

2 questions;

1. How much reduction?
2. Does the captain’s tricorn hat also reduce damage that bumpers receive?

Thanks.

i have tested that and get to know the answer of first question.

the lose of boat health when crash on the coastal should be:

in Captain's Tricorn = 30 health:

2075269150_QQ20220618145337.thumb.png.aa66ab2680751275f6b4d69d48788e24.png

not in Captain's Tricorn  =  almost 60 health.

1384751267_QQ20220618145333.thumb.png.b60a1af146ef699ebddfe7415e3e293e.png

so I think the reduction of Captain's Tricorn is half.

 

and i cant answer you the second question because when i use three Mast's sail to crash on the coastal, The bumper at the contact area is completely destroyed, even taking 30 damage with the Captain's Tricorn on head still destroys the bumper, so I don't know how to answer your question, but I think the hat shouldn't work on bumper.

 

 

8 hours ago, kuroite said:

For the tricorn, is it when it crash or when it take damage ? I want to know if it can be usefull against Crab King or maybe Malbatross or whatever.

Edit: It seem to be on colision but it also reduce damage you take when you're leaking or for the grass boat (if I understood correctly)

i have just tested the crab claws and find out that the damage that it does to the boat keep 35 whether i wear the hat or not. i didnt try a waterspout but guess results are the same.

i think the hat dont work on the battle against crab king.

and the code you list point out that the tag "boat_health_buffer" just influence the function self:GetDamageMult(inst), and in the line 193 to 199 of hullhealth.lua said:

        if hit_adjacent_speed > TUNING.BOAT.OARS.MALBATROSS.FORCE then
            local velocity_damage_percent = math.min(hit_adjacent_speed / TUNING.BOAT.MAX_ALLOWED_VELOCITY, 1)

            velocity_damage_percent = velocity_damage_percent * self:GetDamageMult("collide")

		    self.inst.components.health:DoDelta(-1 * math.floor(TUNING.BOAT.MAX_HULL_HEALTH_DAMAGE * velocity_damage_percent))
        end

the function self:GetDamageMult(inst) is only used here for colision and it needs the boat to have a velocity.

so, again, i think the hat dont work on the battle against crab king.

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...