Skip to content

Commit

Permalink
Merge branch 'main' into docs-geneffectid
Browse files Browse the repository at this point in the history
  • Loading branch information
Echoring authored Oct 29, 2024
2 parents 6f95637 + f02a1bc commit a133e75
Show file tree
Hide file tree
Showing 7 changed files with 265 additions and 56 deletions.
2 changes: 1 addition & 1 deletion resources/hunt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ const data: HuntMap = {
'Sally the Sweeper': {
'id': '13435',
'name': {
'cn': '清除者萨利',
'cn': '清扫者萨莉',
'de': [
'Sally der Fegerin',
'Sally die Fegerin',
Expand Down
5 changes: 5 additions & 0 deletions resources/zone_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9370,6 +9370,7 @@ const data: ZoneInfoType = {
'en': 'Memory of Embers',
'fr': 'Flammes primordiales',
'ja': '炎影の旅路',
'ko': '염영의 여로',
},
'offsetX': 0,
'offsetY': 0,
Expand Down Expand Up @@ -10012,6 +10013,7 @@ const data: ZoneInfoType = {
'contentType': 5,
'exVersion': 5,
'name': {
'cn': '阿卡狄亚登天斗技场 轻量级1',
'de': 'Arkadion - Halbschwergewicht R1',
'en': 'AAC Light-heavyweight M1',
'fr': 'Poids mi-lourds CCA - match 1',
Expand Down Expand Up @@ -10040,6 +10042,7 @@ const data: ZoneInfoType = {
'contentType': 5,
'exVersion': 5,
'name': {
'cn': '阿卡狄亚登天斗技场 轻量级2',
'de': 'Arkadion - Halbschwergewicht R2',
'en': 'AAC Light-heavyweight M2',
'fr': 'Poids mi-lourds CCA - match 2',
Expand Down Expand Up @@ -10068,6 +10071,7 @@ const data: ZoneInfoType = {
'contentType': 5,
'exVersion': 5,
'name': {
'cn': '阿卡狄亚登天斗技场 轻量级3',
'de': 'Arkadion - Halbschwergewicht R3',
'en': 'AAC Light-heavyweight M3',
'fr': 'Poids mi-lourds CCA - match 3',
Expand Down Expand Up @@ -10096,6 +10100,7 @@ const data: ZoneInfoType = {
'contentType': 5,
'exVersion': 5,
'name': {
'cn': '阿卡狄亚登天斗技场 轻量级4',
'de': 'Arkadion - Halbschwergewicht R4',
'en': 'AAC Light-heavyweight M4',
'fr': 'Poids mi-lourds CCA - match 4',
Expand Down
29 changes: 29 additions & 0 deletions ui/raidboss/data/07-dt/raid/r1n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,35 @@ const triggerSet: TriggerSet<Data> = {
'Shockwave': '衝撃波',
},
},
{
'locale': 'cn',
'replaceSync': {
'Black Cat': '黑猫',
'Copy Cat': '模仿猫',
},
'replaceText': {
'(?<! )Black Cat Crossing': '交叉尖甲',
'(?<! )One-two Paw': '二连尖甲',
'Biscuit Maker': '踩奶',
'Bloody Scratch': '血腥抓挠',
'Clawful': '重爪爆发',
'Copycat': '模仿之猫',
'Elevate and Eviscerate': '腾身开膛',
'Grimalkin Gale': '猫怪突风',
'Impact': '冲击',
'Leaping Black Cat Crossing': '猫跳交叉尖甲',
'Leaping One-two Paw': '猫跳二连尖甲',
'Mouser': '捕鼠',
'Overshadow': '超暗影',
'Predaceous Pounce': '迅猫急袭',
'Shockwave': '冲击波',
'\\(cast\\)': '(咏唱)',
'\\(damage\\)': '(伤害)',
'\\(hits\\)': '(命中)',
'\\(jump\\)': '(跳)',
'\\(telegraphs\\)': '(预兆)',
},
},
],
};

Expand Down
25 changes: 25 additions & 0 deletions ui/raidboss/data/07-dt/raid/r2n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,31 @@ const triggerSet: TriggerSet<Data> = {
'Tempting Twist': 'ハニーツイスター',
},
},
{
'locale': 'cn',
'replaceSync': {
'Honey B. Lovely': '蜂蜂小甜心',
},
'replaceText': {
'Alarm Pheromones': '告警信息素',
'Blinding Love': '盲目的爱',
'Blow Kiss': '飞吻',
'Call Me Honey': '甜言蜜语',
'Drop of Venom': '毒液滴落',
'Fracture': '炸裂',
'Heart-struck': '心震',
'Heartsick': '心病',
'Heartsore': '心伤',
'Honey B. Finale': '蜂蜂落幕曲',
'Honey B. Live': '蜂蜂演唱会',
'Honey Beeline': '甜心烈风',
'Honeyed Breeze': '甜心突风',
'Love Me Tender': '温柔地爱我',
'Loveseeker': '求爱',
'Splash of Venom': '毒液雨',
'Tempting Twist': '甜心旋风',
},
},
],
};

Expand Down
28 changes: 28 additions & 0 deletions ui/raidboss/data/07-dt/raid/r3n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,34 @@ const triggerSet: TriggerSet<Data> = {
'Self-destruct': '自爆',
},
},
{
'locale': 'cn',
'replaceSync': {
'Brute Bomber': '野蛮爆弹',
'Lit Fuse': '引线爆弹怪',
},
'replaceText': {
'\\(cast\\)': '(咏唱)',
'\\(cones\\)': '(锥形)',
'\\(damage\\)': '(伤害)',
'\\(long\\)': '(长)',
'\\(short\\)': '(短)',
'Barbarous Barrage': '野蛮爆炸',
'Brutal Burn': '野蛮灼烧',
'Brutal Impact': '野蛮碎击',
'Brutal Lariat': '野蛮碎颈臂',
'Doping Draught': '打药',
'Explosion': '爆炸',
'Explosive Rain': '爆弹雨',
'Fire Spin': '野蛮旋火',
'Fuses of Fury': '引线爆弹',
'Infernal Spin': '超华丽野蛮旋火',
'Knuckle Sandwich': '拳面猛击',
'Lariat Combo': '碎颈臂连击',
'Murderous Mist': '致命毒雾',
'Self-destruct': '自爆',
},
},
],
};

Expand Down
144 changes: 118 additions & 26 deletions ui/raidboss/data/07-dt/raid/r4n.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Outputs from '../../../../../resources/outputs';
import { callOverlayHandler } from '../../../../../resources/overlay_plugin_api';
import { Responses } from '../../../../../resources/responses';
import { Directions } from '../../../../../resources/util';
import { DirectionOutput8, Directions } from '../../../../../resources/util';
import ZoneId from '../../../../../resources/zone_id';
import { RaidbossData } from '../../../../../types/data';
import { PluginCombatantState } from '../../../../../types/event';
Expand All @@ -23,10 +23,14 @@ type B9AMapKeys = keyof typeof effectB9AMap;
type B9AMapValues = typeof effectB9AMap[B9AMapKeys];

const directionOutputStrings = {
...Directions.outputStringsCardinalDir,
...Directions.outputStrings8Dir,
unknown: Outputs.unknown,
goLeft: Outputs.left,
goRight: Outputs.right,
stay: {
en: 'Stay',
},
num2: Outputs.num2,
separator: {
en: ' => ',
de: ' => ',
Expand All @@ -35,6 +39,17 @@ const directionOutputStrings = {
cn: ' => ',
ko: ' => ',
},
intercardStay: {
en: '${dir} => Stay',
},
numHits: {
en: '${dir} x${num}',
de: '${dir} x${num}',
fr: '${dir} x${num}',
ja: '${dir} x${num}',
cn: '${dir} x${num}',
ko: '${dir} x${num}',
},
combo: {
en: '${dirs}',
de: '${dirs}',
Expand All @@ -45,16 +60,18 @@ const directionOutputStrings = {
},
} as const;

type StoredCleave = {
id: number;
dir: 'left' | 'right';
};

export interface Data extends RaidbossData {
expectedBlasts: 0 | 3 | 4 | 5;
storedBlasts: B9AMapValues[];
// expectedCleaves is either 1 or 5, due to the amount of time between the first
// and second clone cleaves at the start of the encounter
expectedCleaves: 1 | 5;
storedCleaves: {
id: number;
dir: 'left' | 'right';
}[];
storedCleaves: StoredCleave[];
actors: PluginCombatantState[];
sidewiseSparkCounter: number;
storedWitchHuntCast?: NetMatches['StartsUsingExtra'];
Expand All @@ -78,6 +95,39 @@ const isEffectB9AValue = (value: string | undefined): value is B9AMapValues => {
return Object.values<string>(effectB9AMap).includes(value);
};

const getCleaveDirs = (
actors: PluginCombatantState[],
storedCleaves: StoredCleave[],
): DirectionOutput8[] => {
const dirs: DirectionOutput8[] = storedCleaves.map((entry) => {
const actor = actors.find((actor) => actor.ID === entry.id);
if (actor === undefined)
return 'unknown';
const actorFacing = Directions.hdgTo4DirNum(actor.Heading);
const offset = entry.dir === 'left' ? 1 : -1;
return Directions.outputFromCardinalNum((actorFacing + 4 + offset) % 4);
});

if (dirs.length === 1)
return dirs;

// Check if all directions lead to the same intercard. If so, there's no
// reason to call a sequence. We don't need to check the cardinals,
// because it will only be true either when there is exactly one element,
// or in the extremely unlikely event that every clone pointed in the same
// direction.
if (dirs.every((dir) => ['dirN', 'dirE'].includes(dir)))
return ['dirNE'];
if (dirs.every((dir) => ['dirS', 'dirE'].includes(dir)))
return ['dirSE'];
if (dirs.every((dir) => ['dirS', 'dirW'].includes(dir)))
return ['dirSW'];
if (dirs.every((dir) => ['dirN', 'dirW'].includes(dir)))
return ['dirNW'];

return dirs;
};

const npcYellData = {
// Offsets: 456920,494045,510794
'43D4': {
Expand Down Expand Up @@ -190,16 +240,14 @@ const triggerSet: TriggerSet<Data> = {
durationSeconds: 7.3,
suppressSeconds: 1,
infoText: (data, _matches, output) => {
const dirs = data.storedCleaves.map((entry) => {
const actor = data.actors.find((actor) => actor.ID === entry.id);
if (actor === undefined)
return output.unknown!();
const actorFacing = Directions.hdgTo4DirNum(actor.Heading);
const offset = entry.dir === 'left' ? 1 : -1;
return Directions.outputFromCardinalNum((actorFacing + 4 + offset) % 4);
}).map((dir) => output[dir]!());
const dirs = getCleaveDirs(data.actors, data.storedCleaves);
const mappedDirs = dirs.map((dir) => output[dir]!());

return output.combo!({ dirs: dirs.join(output.separator!()) });
/* if we collapsed the callout to intercard, include x2 */
if (mappedDirs.length === 1 && data.storedCleaves.length === 2)
return output.numHits!({ dir: mappedDirs[0], num: output.num2!() });

return output.combo!({ dirs: mappedDirs.join(output.separator!()) });
},
run: (data) => {
if (data.expectedCleaves === 1)
Expand Down Expand Up @@ -257,20 +305,31 @@ const triggerSet: TriggerSet<Data> = {
netRegex: { id: ['92BC', '92BE', '92BD', '92BF'], source: 'Wicked Thunder', capture: true },
durationSeconds: 7.3,
infoText: (data, matches, output) => {
const cleaveDir = ['92BC', '92BE'].includes(matches.id) ? 'right' : 'left';
const actorID = parseInt(matches.sourceId, 16);

// If this is the first cleave, it's boss relative because boss isn't fixed north
if (data.sidewiseSparkCounter === 0)
return ['92BC', '92BE'].includes(matches.id) ? output.goLeft!() : output.goRight!();

const dirs = data.storedCleaves.map((entry) => {
const actor = data.actors.find((actor) => actor.ID === entry.id);
if (actor === undefined)
return output.unknown!();
const actorFacing = Directions.hdgTo4DirNum(actor.Heading);
const offset = entry.dir === 'left' ? 1 : -1;
return Directions.outputFromCardinalNum((actorFacing + 4 + offset) % 4);
if (data.storedCleaves.length === 0)
return cleaveDir === 'right' ? output.goLeft!() : output.goRight!();

data.storedCleaves.push({
dir: cleaveDir,
id: actorID,
});

dirs.push(['92BC', '92BE'].includes(matches.id) ? 'dirW' : 'dirE');
// If we got 5 hits, the first 2 were already called out while
// collecting the clone hits. Don't repeat them.
const remainingHits = data.storedCleaves.length === 5
? data.storedCleaves.slice(-3)
: data.storedCleaves;

const dirs: DirectionOutput8[] = getCleaveDirs(data.actors, remainingHits);

if (dirs.length === 1) {
const dir = dirs[0]!;
const mappedDir = output[dir]!();
return output.intercardStay!({ dir: mappedDir });
}

const mappedDirs = dirs.map((dir) => output[dir]!());

Expand Down Expand Up @@ -646,6 +705,39 @@ const triggerSet: TriggerSet<Data> = {
'Wrath of Zeus': 'ラス・オブ・ゼウス',
},
},
{
'locale': 'cn',
'replaceSync': {
'Wicked Replica': '狡雷的幻影',
'Wicked Thunder': '狡雷',
},
'replaceText': {
'Left Roll': '左列',
'Right Roll': '右列',
'west--': '西--',
'--east': '--东',
'\\(cast\\)': '(咏唱)',
'\\(clone\\)': '(幻影)',
'\\(damage\\)': '(伤害)',
'Bewitching Flight': '魔女回翔',
'Burst': '爆炸',
'Fivefold Blast': '五重加农炮',
'Fourfold Blast': '四重加农炮',
'Shadows\' Sabbath': '黑色安息日',
'Sidewise Spark': '侧方电火花',
'Soaring Soulpress': '碎魂跃',
'Stampeding Thunder': '奔雷炮',
'Threefold Blast': '三重加农炮',
'Thunderslam': '雷炸',
'Thunderstorm': '雷暴',
'Wicked Bolt': '狡诡落雷',
'Wicked Cannon': '狡诡加农炮',
'Wicked Hypercannon': '狡诡聚能加农炮',
'Wicked Jolt': '狡诡摇荡',
'Witch Hunt': '猎杀女巫',
'Wrath of Zeus': '宙斯之怒',
},
},
],
};

Expand Down
Loading

0 comments on commit a133e75

Please sign in to comment.