Skip to content

Commit 2ef6c1a

Browse files
committed
wip
1 parent a428ae9 commit 2ef6c1a

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

src/data/producer-items.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,7 +1817,12 @@ export const producerItemsAsConst = [
18171817
effects: [
18181818
{
18191819
kind: "getModifier",
1820-
modifier: { kind: "motivation", amount: 3 },
1820+
modifier: { kind: "positiveImpression", amount: 3 },
1821+
},
1822+
{
1823+
kind: "drainModifier",
1824+
modifierKind: "motivation",
1825+
value: 1,
18211826
},
18221827
],
18231828
times: 3,
@@ -1834,7 +1839,12 @@ export const producerItemsAsConst = [
18341839
effects: [
18351840
{
18361841
kind: "getModifier",
1837-
modifier: { kind: "motivation", amount: 3 },
1842+
modifier: { kind: "positiveImpression", amount: 3 },
1843+
},
1844+
{
1845+
kind: "drainModifier",
1846+
modifierKind: "motivation",
1847+
value: 1,
18381848
},
18391849
],
18401850
times: 4,

src/text-generation.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,11 @@ describe("generateEffectText", () => {
649649
expected: "体力減少1",
650650
name: "drainLife",
651651
},
652+
{
653+
args: [{ kind: "drainModifier", modifierKind: "motivation", value: 1 }],
654+
expected: "{{やる気減少}}1",
655+
name: "drainModifier - motivation",
656+
},
652657
{
653658
args: [{ kind: "drawCards", amount: 1 }],
654659
expected: "スキルカードを引く",
@@ -1407,6 +1412,15 @@ describe("generateProducerItemDescription", () => {
14071412
"(レッスン内3回)",
14081413
].join("\n"),
14091414
},
1415+
{
1416+
producerItemId: "sutairisshumodo",
1417+
enhanced: true,
1418+
expected: [
1419+
"ターン開始時{{やる気}}が3以上の場合、{{好印象}}+3",
1420+
"{{やる気減少}}1",
1421+
"(レッスン内4回)",
1422+
].join("\n"),
1423+
},
14101424
];
14111425
test.each(testParameters)(
14121426
'$producerItemId => "$expected"',

src/text-generation.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ const globalKeywords = {
104104
delayedEffect: metaModifierDictioanry.delayedEffect.label,
105105
doubleEffect: metaModifierDictioanry.doubleEffect.label,
106106
doubleLifeConsumption: metaModifierDictioanry.doubleLifeConsumption.label,
107+
drainMotivationModifier: "やる気減少",
107108
enhanceHand: "レッスン中強化",
108109
excellentCondition: metaModifierDictioanry.excellentCondition.label,
109110
fixedValueVitality: "固定元気",
@@ -434,6 +435,9 @@ const generateEffectWithoutConditionText = (effect: Effect): string => {
434435
switch (effect.kind) {
435436
case "drainLife":
436437
return `体力減少${effect.value}`;
438+
case "drainModifier":
439+
// TODO: 現状はやる気だけなので決め打ち
440+
return `${kwd("drainMotivationModifier")}${effect.value}`;
437441
case "drawCards":
438442
return effect.amount === 1
439443
? "スキルカードを引く"

src/types.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,18 @@ export type EffectWithoutCondition = Readonly<
609609
kind: "drainLife";
610610
value: number;
611611
}
612+
| {
613+
/**
614+
* 状態修正を減少する
615+
*
616+
* - 原文の構文は、「{modifierKind}減少{value}」
617+
* - 「スタイリッシュモード」は、「やる気減少1」
618+
* - 現状はスキルカードには存在しない効果
619+
*/
620+
kind: "drainModifier";
621+
modifierKind: "motivation";
622+
value: number;
623+
}
612624
| {
613625
/**
614626
* スキルカードを引く

0 commit comments

Comments
 (0)