Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Hot spring mood recovery setting #3171

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 45 additions & 15 deletions config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"HpControl": {
"UseHpBalance": false,
Expand Down Expand Up @@ -203,11 +205,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"HpControl": {
"UseHpBalance": false,
Expand Down Expand Up @@ -277,11 +281,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"HpControl": {
"UseHpBalance": false,
Expand Down Expand Up @@ -413,11 +419,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"HpControl": {
"UseHpBalance": false,
Expand Down Expand Up @@ -487,11 +495,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"HpControl": {
"UseHpBalance": false,
Expand Down Expand Up @@ -548,11 +558,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"Storage": {
"Storage": {}
Expand Down Expand Up @@ -595,11 +607,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"Storage": {
"Storage": {}
Expand Down Expand Up @@ -672,11 +686,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"HpControl": {
"UseHpBalance": false,
Expand Down Expand Up @@ -750,11 +766,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"HpControl": {
"UseHpBalance": false,
Expand Down Expand Up @@ -828,11 +846,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"HpControl": {
"UseHpBalance": false,
Expand Down Expand Up @@ -906,11 +926,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"HpControl": {
"UseHpBalance": false,
Expand Down Expand Up @@ -984,11 +1006,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"HpControl": {
"UseHpBalance": false,
Expand Down Expand Up @@ -1058,11 +1082,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"HpControl": {
"UseHpBalance": false,
Expand Down Expand Up @@ -1118,11 +1144,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"Storage": {
"Storage": {}
Expand Down Expand Up @@ -1165,11 +1193,13 @@
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet1Onsen": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
"Fleet2Oath": false,
"Fleet2Onsen": false
},
"Storage": {
"Storage": {}
Expand Down
4 changes: 4 additions & 0 deletions module/campaign/campaign_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ def _disable_tasks(self, tasks):
keys = f'{task}.Scheduler.Enable'
logger.info(f'Disable task `{task}`')
self.config.cross_set(keys=keys, value=False)
keys = f'{task}.Emotion.Fleet1Onsen'
self.config.cross_set(keys=keys, value=False)
keys = f'{task}.Emotion.Fleet2Onsen'
self.config.cross_set(keys=keys, value=False)

for task in ['GemsFarming']:
name = self.config.cross_get(keys=f'{task}.Campaign.Name', default='2-4')
Expand Down
11 changes: 11 additions & 0 deletions module/combat/emotion.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'dormitory_floor_2': 150,
}
OATH_RECOVER = 10
ONSEN_RECOVER = 10


class FleetEmotion:
Expand Down Expand Up @@ -87,6 +88,14 @@ def oath(self):
"""
return getattr(self.config, f'Emotion_Fleet{self.fleet}Oath')

@property
def onsen(self):
"""
Returns:
bool: If all ships onsen.
"""
return getattr(self.config, f'Emotion_Fleet{self.fleet}Onsen')

@property
def speed(self):
"""
Expand All @@ -96,6 +105,8 @@ def speed(self):
speed = DIC_RECOVER[self.recover]
if self.oath:
speed += OATH_RECOVER
if self.onsen:
speed += ONSEN_RECOVER
return speed // 10

@property
Expand Down
Loading