Files
wizard-council-automation/scripts/update_world.ts

14 lines
470 B
TypeScript

import { readFileSync, writeFileSync } from 'fs';
function updateWorld() {
const state = JSON.parse(readFileSync('world_state.json', 'utf8'));
state.tower.energy = Math.min(100, state.tower.energy + 5);
state.matrix.stability = Math.min(1.0, state.matrix.stability + 0.01);
state.last_updated = new Date().toISOString();
writeFileSync('world_state.json', JSON.stringify(state, null, 2));
console.log('World state updated successfully.');
}
updateWorld();