Skip to content

Commit

Permalink
Adjust giant fruit effect (#726)
Browse files Browse the repository at this point in the history
* adjust raiud modifier

* Update config.json

* Add id to effect

* Run make generate protos

* Change id type form string to uint64

---------

Co-authored-by: Marco <[email protected]>
Co-authored-by: tvillegas98 <[email protected]>
  • Loading branch information
3 people authored Jul 5, 2024
1 parent 5e847f8 commit d6fd5ba
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 37 deletions.
1 change: 1 addition & 0 deletions apps/arena/lib/arena/serialization/messages.pb.ex
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ defmodule Arena.Serialization.Effect do

field(:name, 1, type: :string)
field(:duration_ms, 2, type: :uint32, json_name: "durationMs")
field(:id, 3, type: :uint64)
end

defmodule Arena.Serialization.Item do
Expand Down
56 changes: 21 additions & 35 deletions apps/arena/priv/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -900,9 +900,7 @@
"radius": 450.0,
"range": 1200.0,
"activation_delay": 400,
"effects_to_apply": [
"singularity"
]
"effects_to_apply": ["singularity"]
}
}
],
Expand Down Expand Up @@ -955,9 +953,7 @@
"radius": 500.0,
"range": 1200.0,
"activation_delay": 250,
"effects_to_apply": [
"denial_of_service"
]
"effects_to_apply": ["denial_of_service"]
}
}
],
Expand Down Expand Up @@ -1074,9 +1070,7 @@
}
}
],
"effects_to_apply": [
"invisible"
]
"effects_to_apply": ["invisible"]
},
{
"name": "uma_sneak",
Expand Down Expand Up @@ -1159,33 +1153,25 @@
{
"name": "golden_clock",
"radius": 200.0,
"effects": [
"golden_clock_effect"
],
"effects": ["golden_clock_effect"],
"mechanics": {}
},
{
"name": "magic_boots",
"radius": 200.0,
"effects": [
"magic_boots_effect"
],
"effects": ["magic_boots_effect"],
"mechanics": {}
},
{
"name": "mirra_blessing",
"radius": 200.0,
"effects": [
"mirra_blessing_effect"
],
"effects": ["mirra_blessing_effect"],
"mechanics": {}
},
{
"name": "giant",
"radius": 200.0,
"effects": [
"giant_effect"
],
"effects": ["giant_effect"],
"mechanics": {}
}
],
Expand Down Expand Up @@ -1254,7 +1240,7 @@
"consume_projectile": true,
"effect_mechanics": {
"buff_pool": {
"stat_multiplier": 0.10,
"stat_multiplier": 0.1,
"additive_duration_add_ms": 1000,
"effect_delay_ms": 0,
"execute_multiple_times": false
Expand Down Expand Up @@ -1326,17 +1312,17 @@
},
{
"name": "giant_effect",
"duration_ms": 8000,
"duration_ms": 9000,
"remove_on_action": false,
"one_time_application": true,
"effect_mechanics": {
"modify_radius": {
"modifier": 1.0,
"modifier": 0.4,
"effect_delay_ms": 0,
"execute_multiple_times": false
},
"damage_change": {
"modifier": 0.2,
"modifier": 0.25,
"effect_delay_ms": 0,
"execute_multiple_times": true
},
Expand All @@ -1346,7 +1332,7 @@
"execute_multiple_times": false
},
"defense_change": {
"modifier": 0.3,
"modifier": 0.4,
"effect_delay_ms": 0,
"execute_multiple_times": true
}
Expand All @@ -1367,7 +1353,7 @@
"health": 250,
"vertices": [],
"amount_of_power_ups": 1,
"power_up_spawn_delay_ms": 300
"power_up_spawn_delay_ms": 300
},
{
"position": {
Expand All @@ -1379,7 +1365,7 @@
"health": 250,
"vertices": [],
"amount_of_power_ups": 1,
"power_up_spawn_delay_ms": 300
"power_up_spawn_delay_ms": 300
},
{
"position": {
Expand All @@ -1391,7 +1377,7 @@
"health": 250,
"vertices": [],
"amount_of_power_ups": 1,
"power_up_spawn_delay_ms": 300
"power_up_spawn_delay_ms": 300
},
{
"position": {
Expand All @@ -1403,7 +1389,7 @@
"health": 250,
"vertices": [],
"amount_of_power_ups": 1,
"power_up_spawn_delay_ms": 300
"power_up_spawn_delay_ms": 300
},
{
"position": {
Expand All @@ -1415,7 +1401,7 @@
"health": 250,
"vertices": [],
"amount_of_power_ups": 1,
"power_up_spawn_delay_ms": 300
"power_up_spawn_delay_ms": 300
},
{
"position": {
Expand All @@ -1427,7 +1413,7 @@
"health": 250,
"vertices": [],
"amount_of_power_ups": 1,
"power_up_spawn_delay_ms": 300
"power_up_spawn_delay_ms": 300
},
{
"position": {
Expand All @@ -1439,7 +1425,7 @@
"health": 250,
"vertices": [],
"amount_of_power_ups": 1,
"power_up_spawn_delay_ms": 300
"power_up_spawn_delay_ms": 300
},
{
"position": {
Expand All @@ -1451,7 +1437,7 @@
"health": 250,
"vertices": [],
"amount_of_power_ups": 1,
"power_up_spawn_delay_ms": 300
"power_up_spawn_delay_ms": 300
},
{
"position": {
Expand All @@ -1463,7 +1449,7 @@
"health": 250,
"vertices": [],
"amount_of_power_ups": 1,
"power_up_spawn_delay_ms": 300
"power_up_spawn_delay_ms": 300
}
],
"traps": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ defmodule ArenaLoadTest.Serialization.Effect do

field(:name, 1, type: :string)
field(:duration_ms, 2, type: :uint32, json_name: "durationMs")
field(:id, 3, type: :uint64)
end

defmodule ArenaLoadTest.Serialization.Item do
Expand Down
1 change: 1 addition & 0 deletions apps/bot_manager/lib/protobuf/messages.pb.ex
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ defmodule BotManager.Protobuf.Effect do

field(:name, 1, type: :string)
field(:duration_ms, 2, type: :uint32, json_name: "durationMs")
field(:id, 3, type: :uint64)
end

defmodule BotManager.Protobuf.Item do
Expand Down
32 changes: 31 additions & 1 deletion apps/game_client/assets/js/protobuf/messages_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -6997,7 +6997,8 @@ proto.Effect.prototype.toObject = function(opt_includeInstance) {
proto.Effect.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
durationMs: jspb.Message.getFieldWithDefault(msg, 2, 0)
durationMs: jspb.Message.getFieldWithDefault(msg, 2, 0),
id: jspb.Message.getFieldWithDefault(msg, 3, 0)
};

if (includeInstance) {
Expand Down Expand Up @@ -7042,6 +7043,10 @@ proto.Effect.deserializeBinaryFromReader = function(msg, reader) {
var value = /** @type {number} */ (reader.readUint32());
msg.setDurationMs(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setId(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -7085,6 +7090,13 @@ proto.Effect.serializeBinaryToWriter = function(message, writer) {
f
);
}
f = message.getId();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
};


Expand Down Expand Up @@ -7124,6 +7136,24 @@ proto.Effect.prototype.setDurationMs = function(value) {
};


/**
* optional uint64 id = 3;
* @return {number}
*/
proto.Effect.prototype.getId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
* @param {number} value
* @return {!proto.Effect} returns this
*/
proto.Effect.prototype.setId = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};





Expand Down
1 change: 1 addition & 0 deletions apps/game_client/lib/game_client/protobuf/messages.pb.ex
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ defmodule GameClient.Protobuf.Effect do

field(:name, 1, type: :string)
field(:duration_ms, 2, type: :uint32, json_name: "durationMs")
field(:id, 3, type: :uint64)
end

defmodule GameClient.Protobuf.Item do
Expand Down
3 changes: 2 additions & 1 deletion apps/serialization/messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ message Player {
message Effect {
string name = 1;
uint32 duration_ms = 2;
uint64 id = 3;
}

message Item {
Expand Down Expand Up @@ -346,7 +347,7 @@ message BountyInfo {
string id = 1;
string description = 2;
string quest_type = 3;
CurrencyReward reward = 4;
CurrencyReward reward = 4;
}

message CurrencyReward {
Expand Down

0 comments on commit d6fd5ba

Please sign in to comment.